From: Govindarajulu Varadarajan <_govind@gmx.com>
To: davem@davemloft.net, netdev@vger.kernel.org, ariel.elior@qlogic.com
Cc: ssujith@cisco.com, benve@cisco.com,
Govindarajulu Varadarajan <_govind@gmx.com>
Subject: [PATCH net 2/2] bnx2x: fix napi poll return value for repoll
Date: Tue, 20 Jan 2015 18:46:16 +0530 [thread overview]
Message-ID: <1421759776-376-3-git-send-email-_govind@gmx.com> (raw)
In-Reply-To: <1421759776-376-1-git-send-email-_govind@gmx.com>
With the commit d75b1ade567ffab ("net: less interrupt masking in NAPI") napi repoll
is done only when work_done == budget. When in busy_poll is we return 0 in
napi_poll. We should return budget. Also do not return workdone > budget.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 1d1147c..ebcbe92 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -3175,7 +3175,7 @@ static int bnx2x_poll(struct napi_struct *napi, int budget)
}
#endif
if (!bnx2x_fp_lock_napi(fp))
- return work_done;
+ return budget;
for_each_cos_in_tx_queue(fp, cos)
if (bnx2x_tx_queue_has_work(fp->txdata_ptr[cos]))
@@ -3187,7 +3187,7 @@ static int bnx2x_poll(struct napi_struct *napi, int budget)
/* must not complete if we consumed full budget */
if (work_done >= budget) {
bnx2x_fp_unlock_napi(fp);
- break;
+ return budget;
}
}
--
2.2.2
next prev parent reply other threads:[~2015-01-20 13:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 13:16 [PATCH net 0/2] fix napi return value Govindarajulu Varadarajan
2015-01-20 13:16 ` [PATCH net 1/2] enic: fix rx napi poll " Govindarajulu Varadarajan
2015-01-25 6:39 ` David Miller
2015-01-20 13:16 ` Govindarajulu Varadarajan [this message]
2015-01-20 14:51 ` [PATCH net 2/2] bnx2x: fix napi poll return value for repoll Eric Dumazet
2015-01-20 14:54 ` Eric Dumazet
2015-01-20 15:26 ` Govindarajulu Varadarajan
2015-01-20 15:24 ` Govindarajulu Varadarajan
2015-01-20 15:44 ` Eric Dumazet
2015-01-25 6:40 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421759776-376-3-git-send-email-_govind@gmx.com \
--to=_govind@gmx.com \
--cc=ariel.elior@qlogic.com \
--cc=benve@cisco.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ssujith@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).