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

[win-pv-devel] [PATCH] Don't use Packet->Offset when stripping VLAN tags



The WHQL tests have always been buggy when dealing with packet data that
is offset into the NET_BUFFER MDL chain. Instead, adjust the MappedSystemVa
of the initial MDL.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenvif/receiver.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
index 5715dba..701cc86 100644
--- a/src/xenvif/receiver.c
+++ b/src/xenvif/receiver.c
@@ -424,7 +424,11 @@ ReceiverRingProcessTag(
                   Offset);
 
     // Fix up the packet information
-    Packet->Offset += sizeof (ETHERNET_TAG);
+    BaseVa += sizeof (ETHERNET_TAG);
+
+    BaseVa -= Packet->Offset;
+    Packet->Mdl.MappedSystemVa = BaseVa;
+
     Packet->Length -= sizeof (ETHERNET_TAG);
 
     Info->EthernetHeader.Length -= sizeof (ETHERNET_TAG);
@@ -446,10 +450,6 @@ ReceiverRingProcessTag(
 
     Info->Length -= sizeof (ETHERNET_TAG);
 
-    ASSERT(Packet->Mdl.MdlFlags & MDL_MAPPED_TO_SYSTEM_VA);
-    BaseVa = Packet->Mdl.MappedSystemVa;
-    ASSERT(BaseVa != NULL);
-
     BaseVa += Packet->Offset;
 
     EthernetHeader = (PETHERNET_HEADER)(BaseVa + Info->EthernetHeader.Offset);
-- 
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®.