40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From a2904158df65b9af7a85ff0af94cad81df164231 Mon Sep 17 00:00:00 2001
|
|
From: Weili Qian <qianweili@huawei.com>
|
|
Date: Sat, 12 Oct 2024 11:11:27 +0800
|
|
Subject: [PATCH 34/39] uadk/v1: not check hardware status when BD not
|
|
processed
|
|
|
|
If the CQE status is not updated during packet receiving,
|
|
the hardware has not processed the packet. In this case,
|
|
0 can be returned without checking the hardware status.
|
|
If a fault occurs, the hardware status will be checked
|
|
when the user attempts to receive packets next time.
|
|
|
|
Signed-off-by: Weili Qian <qianweili@huawei.com>
|
|
Signed-off-by: Qi Tao <taoqi10@huawei.com>
|
|
---
|
|
v1/drv/hisi_qm_udrv.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/v1/drv/hisi_qm_udrv.c b/v1/drv/hisi_qm_udrv.c
|
|
index ea4b199..731492b 100644
|
|
--- a/v1/drv/hisi_qm_udrv.c
|
|
+++ b/v1/drv/hisi_qm_udrv.c
|
|
@@ -727,8 +727,12 @@ int qm_recv(struct wd_queue *q, void **resp, __u32 num)
|
|
}
|
|
}
|
|
|
|
- if (i)
|
|
+ if (i) {
|
|
qm_rx_update(info, i);
|
|
+ } else {
|
|
+ wd_unspinlock(&info->rc_lock);
|
|
+ return 0;
|
|
+ }
|
|
|
|
wd_unspinlock(&info->rc_lock);
|
|
ret = check_ds_rx_base(info, resp, num, 0);
|
|
--
|
|
2.25.1
|
|
|