From: Alexander Duyck <aduyck@mirantis.com>
To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org
Cc: jeffrey.t.kirsher@intel.com
Subject: [net PATCH 1/3] i40e: Fix handling of napi budget
Date: Tue, 22 Sep 2015 14:35:29 -0700 [thread overview]
Message-ID: <20150922213529.2774.42390.stgit@ahduyck-vm-fedora22> (raw)
In-Reply-To: <20150922213002.2774.37924.stgit@ahduyck-vm-fedora22>
The polling routine for i40e was rounding up the budget for Rx cleanup to
1. This is incorrect as netpoll will call is expecting no Rx to be
processed as the budget passed was 0.
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 738aca68f665..4ca73a4be4b3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1923,6 +1923,10 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
arm_wb |= ring->arm_wb;
}
+ /* Handle case where we are called by netpoll with a budget of 0 */
+ if (budget <= 0)
+ goto tx_only;
+
/* We attempt to distribute budget to each Rx queue fairly, but don't
* allow the budget to go below 1 because that would exit polling early.
*/
@@ -1939,6 +1943,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
/* If work not completed, return budget and polling will return */
if (!clean_complete) {
+tx_only:
if (arm_wb)
i40e_force_wb(vsi, q_vector);
return budget;
next prev parent reply other threads:[~2015-09-22 21:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 21:35 [net PATCH 0/3] netpoll fixes for Intel drivers Alexander Duyck
2015-09-22 21:35 ` Alexander Duyck [this message]
2015-09-24 4:54 ` [net PATCH 1/3] i40e: Fix handling of napi budget Jeff Kirsher
2015-09-22 21:35 ` [net PATCH 2/3] fm10k: Fix handling of napi budget when multiple queues are enabled per vector Alexander Duyck
2015-10-27 17:06 ` [Intel-wired-lan] " Singh, Krishneil K
2015-09-22 21:35 ` [net PATCH 3/3] ixgbe: " Alexander Duyck
2015-10-30 14:55 ` William Dauchy
2015-10-30 16:11 ` Alexander Duyck
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=20150922213529.2774.42390.stgit@ahduyck-vm-fedora22 \
--to=aduyck@mirantis.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/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