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-changelog

[Xen-changelog] [xen-unstable] netback: Copy skbuffs that are presented

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] netback: Copy skbuffs that are presented to the start_xmit() function
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Apr 2007 10:50:12 -0700
Delivery-date: Tue, 24 Apr 2007 10:49:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1177342623 -3600
# Node ID 6139337e26903d18edc1ff9ce4df1f1b0cfa76f2
# Parent  6f4735ba9b07f1893f071683f416c6b233d24df3
netback: Copy skbuffs that are presented to the start_xmit() function
with a multi-page head buffer. The new skbuff will not have a
multi-page head buffer, which is a necessary restriction until this is
supported by the internals of the netback driver.
Signed-off-by: Steven Smith <ssmith@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff -r 6f4735ba9b07 -r 6139337e2690 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Sat Apr 21 
14:12:09 2007 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Apr 23 
16:37:03 2007 +0100
@@ -252,8 +252,11 @@ int netif_be_start_xmit(struct sk_buff *
        /*
         * Copy the packet here if it's destined for a flipping interface
         * but isn't flippable (e.g. extra references to data).
+        * XXX For now we also copy skbuffs whose head crosses a page
+        * boundary, because netbk_gop_skb can't handle them.
         */
-       if (!netif->copying_receiver) {
+       if (!netif->copying_receiver ||
+           ((skb_headlen(skb) + offset_in_page(skb->data)) >= PAGE_SIZE)) {
                struct sk_buff *nskb = netbk_copy_skb(skb);
                if ( unlikely(nskb == NULL) )
                        goto drop;
@@ -425,8 +428,9 @@ static void netbk_gop_skb(struct sk_buff
        }
 
        /*
-        * This must occur at the end to ensure that we don't trash
-        * skb_shinfo until we're done.
+        * This must occur at the end to ensure that we don't trash skb_shinfo
+        * until we're done. We know that the head doesn't cross a page
+        * boundary because such packets get copied in netif_be_start_xmit.
         */
        head_meta->id = netbk_gop_frag(netif, head_meta, 0, npo,
                                       virt_to_page(skb->data),

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] netback: Copy skbuffs that are presented to the start_xmit() function, Xen patchbot-unstable <=