From: Paul Durrant Date: Wed, 18 May 2016 15:33:14 +0000 (+0100) Subject: Defer transmit response event until the last possible moment X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=66da96ba16105371e3ac8cb0d781ec01c53a0876;p=people%2Fpauldu%2Fxenvif.git Defer transmit response event until the last possible moment When sending packets, there is no need to enable a transmit reponse event until the ring fills or there are no more packets to send. This patch therefore defers advancing the ring event count until just before a batch of packets are pushed. Signed-off-by: Paul Durrant --- diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c index 95c3479..b55daa3 100644 --- a/src/xenvif/transmitter.c +++ b/src/xenvif/transmitter.c @@ -2604,7 +2604,6 @@ TransmitterRingPoll( KeMemoryBarrier(); Ring->Front.rsp_cons = rsp_cons; - Ring->Shared->rsp_event = rsp_cons + 1; } done: @@ -2678,6 +2677,8 @@ __TransmitterRingPushRequests( #pragma warning (push) #pragma warning (disable:4244) + Ring->Shared->rsp_event = Ring->Front.req_prod_pvt; + // Make the requests visible to the backend RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&Ring->Front, Notify);