summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2016-06-15 15:37:59 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-07-15 08:34:52 +0200
commit4b732cd4bb6006ad7fd4d5cdba27fcb751cdf4b7 (patch)
treed3ec692524635a53ac71bf212a419acff9fb1b0c /drivers/net/ethernet
parenti40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter (diff)
downloadlinux-4b732cd4bb6006ad7fd4d5cdba27fcb751cdf4b7.tar.xz
linux-4b732cd4bb6006ad7fd4d5cdba27fcb751cdf4b7.zip
ixgbe: napi_poll must return the work done
Currently the function ixgbe_poll() returns 0 when it clean completely the rx rings, but this foul budget accounting in core code. Fix this returning the actual work done, capped to weight - 1, since the core doesn't allow to return the full budget when the driver modifies the napi status Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Venkatesh Srinivas <venkateshs@google.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 088c47cf27d9..8bebd862a54c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2887,7 +2887,7 @@ int ixgbe_poll(struct napi_struct *napi, int budget)
if (!test_bit(__IXGBE_DOWN, &adapter->state))
ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector->v_idx));
- return 0;
+ return min(work_done, budget - 1);
}
/**