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] Fix the request size for a full page-sized skbuff in net

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix the request size for a full page-sized skbuff in netfront
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Dec 2005 17:52:28 +0000
Delivery-date: Wed, 07 Dec 2005 11:52:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c976c1ff806aa46c989fb5b1d84b311519fb0456
# Parent  4e9c643968ffd0526258dc1ae7d1fee6123be718
Fix the request size for a full page-sized skbuff in netfront
driver (must allow 16 bytes for dev_alloc_skb headroom).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 4e9c643968ff -r c976c1ff806a 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Dec  6 
14:02:54 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Dec  6 
14:52:15 2005
@@ -535,8 +535,12 @@
         */
        batch_target = np->rx_target - (req_prod - np->rx.rsp_cons);
        for (i = skb_queue_len(&np->rx_batch); i < batch_target; i++) {
+               /*
+                * Subtract dev_alloc_skb headroom (16 bytes) and shared info
+                * tailroom then round down to SKB_DATA_ALIGN boundary.
+                */
                skb = alloc_xen_skb(
-                       (PAGE_SIZE - sizeof(struct skb_shared_info)) &
+                       (PAGE_SIZE - 16 - sizeof(struct skb_shared_info)) &
                        (-SKB_DATA_ALIGN(1)));
                if (skb == NULL)
                        break;

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

<Prev in Thread] Current Thread [Next in Thread>