WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/4] xen: netback: handle NET_SKBUFF_DATA_USES_OFFSET

To: jeremy@xxxxxxxx
Subject: [Xen-devel] [PATCH 2/4] xen: netback: handle NET_SKBUFF_DATA_USES_OFFSET correctly
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 11 Jun 2010 15:19:09 +0100
Cc: Steven.Smith@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>, JBeulich@xxxxxxxxxx
Delivery-date: Fri, 11 Jun 2010 07:20:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1276265928.19091.3469.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1276265928.19091.3469.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Jan Beulich <JBeulich@xxxxxxxxxx>
---
 drivers/xen/netback/netback.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
index 9e4793f..8cd7875 100644
--- a/drivers/xen/netback/netback.c
+++ b/drivers/xen/netback/netback.c
@@ -218,7 +218,11 @@ static struct sk_buff *netbk_copy_skb(struct sk_buff *skb)
                len -= copy;
        }
 
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+       offset = 0;
+#else
        offset = nskb->data - skb->data;
+#endif
 
        nskb->transport_header = skb->transport_header + offset;
        nskb->network_header = skb->network_header + offset;
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel