netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next  07/11] ixgbevf: have clean_rx_irq return total_rx_packets cleaned
Date: Tue, 29 Oct 2013 05:02:27 -0700	[thread overview]
Message-ID: <1383048151-15002-8-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1383048151-15002-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jacob Keller <jacob.e.keller@intel.com>

Rather than return true/false indicating whether there was budget left, return
the total packets cleaned. This currently has no use, but will be used in a
following patch which enables CONFIG_NET_RX_BUSY_POLL support in order to track
how many packets were cleaned during the busy poll as part of the extended
statistics.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index a2cc6bb..06e29bd 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -410,9 +410,9 @@ static inline void ixgbevf_irq_enable_queues(struct ixgbevf_adapter *adapter,
 	IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, qmask);
 }
 
-static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
-				 struct ixgbevf_ring *rx_ring,
-				 int budget)
+static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
+				struct ixgbevf_ring *rx_ring,
+				int budget)
 {
 	struct ixgbevf_adapter *adapter = q_vector->adapter;
 	struct pci_dev *pdev = adapter->pdev;
@@ -540,7 +540,7 @@ next_desc:
 	q_vector->rx.total_packets += total_rx_packets;
 	q_vector->rx.total_bytes += total_rx_bytes;
 
-	return !!budget;
+	return total_rx_packets;
 }
 
 /**
@@ -572,8 +572,9 @@ static int ixgbevf_poll(struct napi_struct *napi, int budget)
 
 	adapter->flags |= IXGBE_FLAG_IN_NETPOLL;
 	ixgbevf_for_each_ring(ring, q_vector->rx)
-		clean_complete &= ixgbevf_clean_rx_irq(q_vector, ring,
-						       per_ring_budget);
+		clean_complete &= (ixgbevf_clean_rx_irq(q_vector, ring,
+							per_ring_budget)
+				   < per_ring_budget);
 	adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;
 
 	/* If all work not completed, return budget and keep polling */
-- 
1.8.3.1

  parent reply	other threads:[~2013-10-29 12:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 12:02 [net-next 00/11][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-10-29 12:02 ` [net-next 01/11] vxlan: Have the NIC drivers do less work for offloads Jeff Kirsher
2013-10-29 12:02 ` [net-next 02/11] net: add might_sleep() call to napi_disable Jeff Kirsher
2013-10-29 12:02 ` [net-next 03/11] ixgbe: fix qv_lock_napi call in ixgbe_napi_disable_all Jeff Kirsher
2013-10-29 12:02 ` [net-next 04/11] ixgbe: show <2% for encoding loss on PCIe Gen3 Jeff Kirsher
2013-10-29 12:02 ` [net-next 05/11] ixgbe: remove unnecessary duplication of PCIe bandwidth display Jeff Kirsher
2013-10-29 12:02 ` [net-next 06/11] ixgbevf: add ixgbevf_rx_skb Jeff Kirsher
2013-10-29 12:02 ` Jeff Kirsher [this message]
2013-10-29 12:02 ` [net-next 08/11] ixgbevf: implement CONFIG_NET_RX_BUSY_POLL Jeff Kirsher
2013-10-29 12:02 ` [net-next 09/11] ixgbevf: add BP_EXTENDED_STATS for CONFIG_NET_RX_BUSY_POLL Jeff Kirsher
2013-10-29 12:02 ` [net-next 10/11] ixgbevf: Add zero_base handler to network statistics Jeff Kirsher
2013-10-29 12:02 ` [net-next 11/11] i40e: fix error return code in i40e_probe() Jeff Kirsher
2013-10-29 17:05   ` Joe Perches
2013-10-29 22:57     ` David Miller
2013-10-29 23:02       ` Joe Perches
2013-10-29 22:58 ` [net-next 00/11][pull request] Intel Wired LAN Driver Updates 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=1383048151-15002-8-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).