]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Fix handling of NAPI budget when multiple queues are enabled per vector
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 22 Sep 2015 21:35:41 +0000 (14:35 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:04 +0000 (16:40 -0700)
Orabug: 23177316

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: Darin Miller <darin.j.miller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 5d6002b7b822c7423e75d4651e6790bfb5642b1b)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 3f7b2efb24d389c1dba690447caed47975f299e9..9b902d0b785474a3ad54a48acfb0fb47da63261e 100644 (file)
@@ -2784,7 +2784,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