From mboxrd@z Thu Jan 1 00:00:00 1970 From: Malcolm Crossley Subject: Re: [PATCH net v3 2/2] xen-netback: napi: don't prematurely request a tx event Date: Tue, 10 Dec 2013 17:46:38 +0000 Message-ID: <52A7537E.4040305@citrix.com> References: <1386682782-7052-1-git-send-email-paul.durrant@citrix.com> <1386682782-7052-3-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386682782-7052-3-git-send-email-paul.durrant@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 10/12/13 13:39, Paul Durrant wrote: > This patch changes the RING_FINAL_CHECK_FOR_REQUESTS in > xenvif_build_tx_gops to a check for RING_HAS_UNCONSUMED_REQUESTS as the > former call has the side effect of advancing the ring event pointer and > therefore inviting another interrupt from the frontend before the napi > poll has actually finished, thereby defeating the point of napi. Reported-by: Malcolm Crossley > Signed-off-by: Paul Durrant > Cc: Wei Liu > Cc: Ian Campbell > Cc: David Vrabel > --- > drivers/net/xen-netback/netback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c > index 83b4e5b..fb512a9 100644 > --- a/drivers/net/xen-netback/netback.c > +++ b/drivers/net/xen-netback/netback.c > @@ -1381,7 +1381,7 @@ static unsigned xenvif_tx_build_gops(struct xenvif *vif, int budget) > continue; > } > > - RING_FINAL_CHECK_FOR_REQUESTS(&vif->tx, work_to_do); > + work_to_do = RING_HAS_UNCONSUMED_REQUESTS(&vif->tx); > if (!work_to_do) > break; >