libwd/0030-uadk-sched-fix-async-mode-ctx-id.patch
JangShui Yang e072f742a4 libwd: update the source code
(cherry picked from commit dc42b3a676205c1a1c922628a993887e1ad2988f)
2024-04-07 18:59:45 +08:00

35 lines
1.0 KiB
Diff

From 6ab956dc04c04849d2650e08d59b9722522eb201 Mon Sep 17 00:00:00 2001
From: Weili Qian <qianweili@huawei.com>
Date: Sat, 23 Mar 2024 17:56:17 +0800
Subject: [PATCH 30/44] uadk/sched: fix async mode ctx id
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)
--
2.25.1