From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: netdev@vger.kernel.org, nic_swsd@realtek.com
Cc: intel-wired-lan@lists.osuosl.org, davem@davemloft.net
Subject: [net PATCH 1/3] fm10k: Do not assume budget will never be 0 for NAPI
Date: Fri, 01 May 2015 10:34:38 -0700 [thread overview]
Message-ID: <20150501173438.1029.2870.stgit@ahduyck-vm-fedora22> (raw)
In-Reply-To: <20150501173049.1029.54421.stgit@ahduyck-vm-fedora22>
The netpoll path will call napi->poll with a budget of 0 in order to clean
the Tx rings only. This change updates the fm10k driver so that it will
correctly support that instead of cleaning 1 Rx frame if a budget of 0 is
received.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 4eafdad318b4..982fdcdc795b 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -584,7 +584,7 @@ static bool fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
unsigned int total_bytes = 0, total_packets = 0;
u16 cleaned_count = fm10k_desc_unused(rx_ring);
- do {
+ while (likely(total_packets < budget)) {
union fm10k_rx_desc *rx_desc;
/* return some buffers to hardware, one at a time is too slow */
@@ -633,7 +633,7 @@ static bool fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
/* update budget accounting */
total_packets++;
- } while (likely(total_packets < budget));
+ }
/* place incomplete frames back on ring for completion */
rx_ring->skb = skb;
next prev parent reply other threads:[~2015-05-01 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 17:34 [net PATCH 0/3] Clean-up some bits related to netpoll Alexander Duyck
2015-05-01 17:34 ` Alexander Duyck [this message]
2015-05-01 17:34 ` [net PATCH 2/3] r8169: Do not use dev_kfree_skb in xmit path Alexander Duyck
2015-05-01 17:34 ` [net PATCH 3/3] ixgbevf: Use dev_kfree_skb_any in xmit path, not dev_kfree_skb Alexander Duyck
2015-05-04 4:07 ` [net PATCH 0/3] Clean-up some bits related to netpoll 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=20150501173438.1029.2870.stgit@ahduyck-vm-fedora22 \
--to=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.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).