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, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, guru.anbalagane@oracle.com,
	Paolo Abeni <pabeni@redhat.com>,
	Venkatesh Srinivas <venkateshs@google.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 06/14] fm10k: NAPI polling routine must return actual work done
Date: Mon, 29 Aug 2016 02:13:38 -0700	[thread overview]
Message-ID: <1472462026-42133-7-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1472462026-42133-1-git-send-email-jeffrey.t.kirsher@intel.com>

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

When fm10k_poll fully cleans rings it returns 0. This is incorrect as it
messes up the budget accounting in the core NAPI code. Fix this by
returning actual work done, capped at budget - 1 since the core doesn't
expect a return of the full budget when the driver modifies the NAPI
status.

Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Venkatesh Srinivas <venkateshs@google.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 4b65364..32d4429 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -1484,7 +1484,7 @@ static int fm10k_poll(struct napi_struct *napi, int budget)
 	/* re-enable the q_vector */
 	fm10k_qv_enable(q_vector);
 
-	return 0;
+	return min(work_done, budget - 1);
 }
 
 /**
-- 
2.7.4

  parent reply	other threads:[~2016-08-29  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29  9:13 [net-next 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2016-08-29 Jeff Kirsher
2016-08-29  9:13 ` [net-next 01/14] fm10k: fix PCI device enable_cnt leak in .io_slot_reset Jeff Kirsher
2016-08-29  9:13 ` [net-next 02/14] fm10k: use software values when checking for Tx hangs in hot path Jeff Kirsher
2016-08-29  9:13 ` [net-next 03/14] fm10k: use variadic form of alloc_workqueue Jeff Kirsher
2016-08-29  9:13 ` [net-next 04/14] fm10k: remove fm10k_get_reta_size from namespace Jeff Kirsher
2016-08-29  9:13 ` [net-next 05/14] fm10k: prefer READ_ONCE instead of ACCESS_ONCE Jeff Kirsher
2016-08-29  9:13 ` Jeff Kirsher [this message]
2016-08-29  9:13 ` [net-next 07/14] fm10k: print error code when pci_enable_device_mem fails during probe Jeff Kirsher
2016-08-29  9:13 ` [net-next 08/14] fm10k: don't continue probe if PCI device not in normal IO state Jeff Kirsher
2016-08-29  9:13 ` [net-next 09/14] fm10k: don't try to stop queues if we've lost hw_addr Jeff Kirsher
2016-08-29  9:13 ` [net-next 10/14] fm10k: rework vxlan_port offload before adding geneve support Jeff Kirsher
2016-08-29  9:13 ` [net-next 11/14] fm10k: add support for Rx offloads on one Geneve tunnel Jeff Kirsher
2016-08-29  9:13 ` [net-next 12/14] fm10k: remove unnecessary extra parenthesis around ((~value)) Jeff Kirsher
2016-08-29  9:13 ` [net-next 13/14] fm10k: don't clear the RXQCTL register when enabling or disabling queues Jeff Kirsher
2016-08-29  9:13 ` [net-next 14/14] fm10k: don't re-map queues when a mailbox message suffices Jeff Kirsher
2016-08-30  5:55 ` [net-next 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2016-08-29 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=1472462026-42133-7-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=guru.anbalagane@oracle.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=pabeni@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=venkateshs@google.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).