]> xenbits.xensource.com Git - people/pauldu/xenvif.git/commitdiff
Defer transmit response event until the last possible moment
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 18 May 2016 15:33:14 +0000 (16:33 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 18 Jul 2016 12:43:34 +0000 (13:43 +0100)
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 <paul.durrant@citrix.com>
src/xenvif/transmitter.c

index 95c34799626782dbc81f9aab48e5f89ed1069895..b55daa3d5f48d58706b6d2f966f362b8d6e1dc7a 100644 (file)
@@ -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);