summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k/fm10k_main.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-06-20 20:39:32 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-08-29 11:31:03 +0300
commite5fbfb78641ff0c5139ae665289ed9f91524265e (patch)
tree355097bd988d86b0d330105fb76c1571313f7629 /drivers/net/ethernet/intel/fm10k/fm10k_main.c
parentce4dad2ce231aa5258ddfc98f8a80d958643c014 (diff)
downloadlinux-e5fbfb78641ff0c5139ae665289ed9f91524265e.tar.xz
fm10k: NAPI polling routine must return actual work done
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>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_main.c')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 4b65364fb322..32d44290b04f 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);
}
/**