From: "David S. Miller" <davem@davemloft.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@oss.sgi.com
Subject: Re: Set truesize in pskb_expand_head
Date: Fri, 24 Sep 2004 16:33:28 -0700 [thread overview]
Message-ID: <20040924163328.7597352c.davem@davemloft.net> (raw)
In-Reply-To: <20040924232053.GA7807@gondor.apana.org.au>
On Sat, 25 Sep 2004 09:20:53 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> In order for the skb trimming to work, we need to set truesize in
> pskb_expand_head. This patch does exactly that.
I tried to warn people about this earlier in the netlink
NLMSG_GOODSIZE thread.... ho hum.
This change mucks up socket buffer accounting.
If you change skb->truesize, then when the kfree_skb(skb)
happens a different skb->truesize will be subtracted from
the socket buffer allocation than what was used when the
skb was first charged to the socket.
Basically, once a skb might potentially be charged to a
socket, you cannot change truesize unless you are extremely
careful.
This is another reason why I recommended to use a scratch
buffer, btw :-)
next prev parent reply other threads:[~2004-09-24 23:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-24 23:20 Set truesize in pskb_expand_head Herbert Xu
2004-09-24 23:33 ` David S. Miller [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040924163328.7597352c.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.