* [Intel-wired-lan] [next-queue PATCH] i40e: Update driver to support napi_complete_done changes
@ 2016-12-07 16:10 Alexander Duyck
2016-12-07 22:48 ` Samudrala, Sridhar
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2016-12-07 16:10 UTC (permalink / raw)
To: intel-wired-lan
Recently napi_complete_done was updated so that it will return zero if we
are using the queue vector for busy polling. When this is the case we
don't need to re-enable interrupts as the busy polling will reschedule the
NAPI instance when it is finally done polling.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index e88e335..52f2c45 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2033,12 +2033,15 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
}
}
+ /* Work is done so exit the polling mode,
+ * if not busy polling re-enable interrupts.
+ */
+ if (!napi_complete_done(napi, work_done))
+ return 0;
+
if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
q_vector->arm_wb_state = false;
- /* Work is done so exit the polling mode and re-enable the interrupt */
- napi_complete_done(napi, work_done);
-
/* If we're prematurely stopping polling to fix the interrupt
* affinity we want to make sure polling starts back up so we
* issue a call to i40e_force_wb which triggers a SW interrupt.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-wired-lan] [next-queue PATCH] i40e: Update driver to support napi_complete_done changes
2016-12-07 16:10 [Intel-wired-lan] [next-queue PATCH] i40e: Update driver to support napi_complete_done changes Alexander Duyck
@ 2016-12-07 22:48 ` Samudrala, Sridhar
0 siblings, 0 replies; 2+ messages in thread
From: Samudrala, Sridhar @ 2016-12-07 22:48 UTC (permalink / raw)
To: intel-wired-lan
On 12/7/2016 8:10 AM, Alexander Duyck wrote:
> Recently napi_complete_done was updated so that it will return zero if we
> are using the queue vector for busy polling. When this is the case we
> don't need to re-enable interrupts as the busy polling will reschedule the
> NAPI instance when it is finally done polling.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index e88e335..52f2c45 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -2033,12 +2033,15 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
> }
> }
>
> + /* Work is done so exit the polling mode,
> + * if not busy polling re-enable interrupts.
> + */
> + if (!napi_complete_done(napi, work_done))
> + return 0;
> +
Alex,
The return here should be
return min(work_done, budget - 1);
similar to the other fix you submitted for i40e_napi_poll()
> if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
> q_vector->arm_wb_state = false;
>
> - /* Work is done so exit the polling mode and re-enable the interrupt */
> - napi_complete_done(napi, work_done);
> -
> /* If we're prematurely stopping polling to fix the interrupt
> * affinity we want to make sure polling starts back up so we
> * issue a call to i40e_force_wb which triggers a SW interrupt.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20161207/a3349679/attachment-0001.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-07 22:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 16:10 [Intel-wired-lan] [next-queue PATCH] i40e: Update driver to support napi_complete_done changes Alexander Duyck
2016-12-07 22:48 ` Samudrala, Sridhar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.