[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1472462026-42133-7-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Mon, 29 Aug 2016 02:13:38 -0700
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: Jacob Keller <jacob.e.keller@...el.com>, netdev@...r.kernel.org,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com,
guru.anbalagane@...cle.com, Paolo Abeni <pabeni@...hat.com>,
Venkatesh Srinivas <venkateshs@...gle.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [net-next 06/14] fm10k: NAPI polling routine must return actual work done
From: Jacob Keller <jacob.e.keller@...el.com>
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@...hat.com>
Cc: Venkatesh Srinivas <venkateshs@...gle.com>
Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
Acked-by: Paolo Abeni <pabeni@...hat.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 4b65364..32d4429 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);
}
/**
--
2.7.4
Powered by blists - more mailing lists