: Fix netback skb accounting
PATCH 1/1 : Fix netback skb accounting
Hi:
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 <[email protected]>
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtlinux-2.6-xen-sparse/drivers/xen/netback/netback.c +1 -0
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel