netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Set truesize in pskb_expand_head
@ 2004-09-24 23:20 Herbert Xu
  2004-09-24 23:33 ` David S. Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2004-09-24 23:20 UTC (permalink / raw)
  To: David S. Miller, netdev

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

Hi:

In order for the skb trimming to work, we need to set truesize in
pskb_expand_head.  This patch does exactly that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 342 bytes --]

===== net/core/skbuff.c 1.37 vs edited =====
--- 1.37/net/core/skbuff.c	2004-08-03 12:20:05 +10:00
+++ edited/net/core/skbuff.c	2004-09-25 09:15:23 +10:00
@@ -541,6 +541,7 @@
 
 	off = (data + nhead) - skb->head;
 
+	skb->truesize = size + sizeof(struct sk_buff);
 	skb->head     = data;
 	skb->end      = data + size;
 	skb->data    += off;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-09-27 21:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-24 23:20 Set truesize in pskb_expand_head Herbert Xu
2004-09-24 23:33 ` David S. Miller
2004-09-24 23:35   ` Herbert Xu
2004-09-24 23:37     ` Herbert Xu
2004-09-24 23:45       ` David S. Miller
2004-09-25  0:05         ` Herbert Xu
2004-09-27 19:27           ` David S. Miller
2004-09-27 21:29             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).