[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH 1/3] Make sure that a queue of received packets is always pushed



It's possible that the last received packet may suffer an allocation
failure during processing and, as the code stands, any previously
received packets may then not be indicated to the stack.

This patch makes sure that the '!More' condition always results in an
indication, regardless of whether there is an allocation failure.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xennet/receiver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c
index a814d57..86d2ffb 100644
--- a/src/xennet/receiver.c
+++ b/src/xennet/receiver.c
@@ -512,7 +512,7 @@ ReceiverQueuePacket(
         XENVIF_VIF(ReceiverReturnPacket,
                    VifInterface,
                    Cookie);
-        return;
+        goto done;
     }
 
     Queue = &Receiver->Queue[Index];
@@ -530,6 +530,7 @@ ReceiverQueuePacket(
 
     KeReleaseSpinLockFromDpcLevel(&Queue->Lock);
 
+done:
     if (!More)
         __ReceiverPushPackets(Receiver, Index);
 }
-- 
2.5.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.