Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1481585

[PATCH 4.4 020/192] [PATCH 020/135] fm10k: Fix handling of NAPI budget when multiple queues are enabled per vector

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.szaf.org!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.4 020/192] [PATCH 020/135] fm10k: Fix handling of NAPI budget when multiple queues are enabled per vector
Date Mon, 12 Sep 2016 19:10:03 +0200
Message-ID <sgCU3-6aZ-67@gated-at.bofh.it> (permalink)
References <sgCU1-6aZ-3@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org
X-Mailer git-send-email 2.9.3
User-Agent quilt/0.64
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-Cc Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Alexander Duyck <aduyck@mirantis.com>, Krishneil Singh <Krishneil.k.singh@intel.com>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, Sasha Levin <alexander.levin@verizon.com>
X-Original-Date Mon, 12 Sep 2016 18:58:49 +0200
X-Original-Message-ID <20160912152159.757053696@linuxfoundation.org>
X-Original-References <20160912152158.855601725@linuxfoundation.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1481585

Show key headers only | View raw


4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

[ Upstream commit 9f872986479b6e0543eb5c615e5f9491bb04e5c1 ]

This patch corrects an issue in which the polling routine would increase
the budget for Rx to at least 1 per queue if multiple queues were present.
This would result in Rx packets being processed when the budget was 0 which
is meant to indicate that no Rx can be handled.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -1428,6 +1428,10 @@ static int fm10k_poll(struct napi_struct
 	fm10k_for_each_ring(ring, q_vector->tx)
 		clean_complete &= fm10k_clean_tx_irq(q_vector, ring);
 
+	/* Handle case where we are called by netpoll with a budget of 0 */
+	if (budget <= 0)
+		return budget;
+
 	/* attempt to distribute budget to each queue fairly, but don't
 	 * allow the budget to go below 1 because we'll exit polling
 	 */

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4.4 020/192] [PATCH 020/135] fm10k: Fix handling of NAPI budget when multiple queues are enabled per vector Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-12 19:10 +0200

csiph-web