From: Alexander Duyck Date: Tue, 22 Sep 2015 21:35:41 +0000 (-0700) Subject: ixgbe: Fix handling of NAPI budget when multiple queues are enabled per vector X-Git-Tag: firefly_0821_release~176^2~4^2~31^2~179 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5c5989e0dde275bae778d6b4706cf606aca749cc;p=firefly-linux-kernel-4.4.55.git ixgbe: Fix handling of NAPI budget when multiple queues are enabled per vector [ Upstream commit 5d6002b7b822c7423e75d4651e6790bfb5642b1b ] 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 Tested-by: Darin Miller Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index aed8d029b23d..cd9b284bc83b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -2786,7 +2786,8 @@ int ixgbe_poll(struct napi_struct *napi, int budget) ixgbe_for_each_ring(ring, q_vector->tx) clean_complete &= !!ixgbe_clean_tx_irq(q_vector, ring); - if (!ixgbe_qv_lock_napi(q_vector)) + /* Exit if we are called by netpoll or busy polling is active */ + if ((budget <= 0) || !ixgbe_qv_lock_napi(q_vector)) return budget; /* attempt to distribute budget to each queue fairly, but don't allow