[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612988911-10799-2-git-send-email-bupadhaya@marvell.com>
Date: Wed, 10 Feb 2021 12:28:29 -0800
From: Bhaskar Upadhaya <bupadhaya@...vell.com>
To: <netdev@...r.kernel.org>, <kuba@...nel.org>, <aelior@...vell.com>,
<irusskikh@...vell.com>
CC: <davem@...emloft.net>, <bupadhaya@...vell.com>
Subject: [PATCH v3 net-next 1/3] qede: add netpoll support for qede driver
handle netpoll case when qede_poll is called by
netpoll layer with budget 0
Signed-off-by: Bhaskar Upadhaya <bupadhaya@...vell.com>
Signed-off-by: Igor Russkikh <irusskikh@...vell.com>
Signed-off-by: Ariel Elior <aelior@...vell.com>
---
drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index 70c8d3cd85c0..8c47a9d2a965 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1450,7 +1450,8 @@ int qede_poll(struct napi_struct *napi, int budget)
rx_work_done = (likely(fp->type & QEDE_FASTPATH_RX) &&
qede_has_rx_work(fp->rxq)) ?
qede_rx_int(fp, budget) : 0;
- if (rx_work_done < budget) {
+ /* Handle case where we are called by netpoll with a budget of 0 */
+ if (rx_work_done < budget || !budget) {
if (!qede_poll_is_more_work(fp)) {
napi_complete_done(napi, rx_work_done);
--
2.17.1
Powered by blists - more mailing lists