In the single scheduler scenario, ctx id 1 is asynchronous ctx, but the function sched_single_poll_policy() uses ctx id 0. As a result, packets fail to be received. Change the value of ctx id to 1.
Signed-off-by: Weili Qian qianweili@huawei.com --- wd_sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wd_sched.c b/wd_sched.c index b43834d..6766872 100644 --- a/wd_sched.c +++ b/wd_sched.c @@ -428,9 +428,9 @@ static int sched_single_poll_policy(handle_t h_sched_ctx, }
while (loop_times > 0) { - /* Default async mode use ctx 0 */ + /* Default async mode use ctx 1 */ loop_times--; - ret = sched_ctx->poll_func(0, 1, &poll_num); + ret = sched_ctx->poll_func(1, 1, &poll_num); if ((ret < 0) && (ret != -EAGAIN)) return ret; else if (ret == -EAGAIN)