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] Adjust skb->truesize appropriately in netback driver.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Adjust skb->truesize appropriately in netback driver.
From: Xen staging patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 May 2006 13:58:16 +0000
Delivery-date: Mon, 08 May 2006 07:04:37 -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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 9aba6cd8e9e1c1b3c5b13b4c32096db8b36cb03e
# Parent  9ce1e7c67d5d9994ee01268fcee2cedf0fc916e5
Adjust skb->truesize appropriately in netback driver.

When you generate non-linear skb's as netback does, it is up to you
to ensure that truesize reflects the size of paged part of the skb.
Otherwise socket memory accounting in Linux falls apart.

Thanks to the new check that David Miller added to TCP we were able
to catch this bug.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c |    1 +
 1 files changed, 1 insertion(+)

diff -r 9ce1e7c67d5d -r 9aba6cd8e9e1 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri May 05 
13:46:59 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri May 05 
13:49:49 2006 +0100
@@ -659,6 +659,7 @@ static void net_tx_action(unsigned long 
 
                skb->data_len  = txreq.size - data_len;
                skb->len      += skb->data_len;
+               skb->truesize += skb->data_len;
 
                skb->dev      = netif->dev;
                skb->protocol = eth_type_trans(skb, skb->dev);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Adjust skb->truesize appropriately in netback driver., Xen staging patchbot-unstable <=