netdev
[Top] [All Lists]

Re: Set truesize in pskb_expand_head

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: Set truesize in pskb_expand_head
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 25 Sep 2004 09:35:55 +1000
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040924163328.7597352c.davem@xxxxxxxxxxxxx>
References: <20040924232053.GA7807@xxxxxxxxxxxxxxxxxxx> <20040924163328.7597352c.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Fri, Sep 24, 2004 at 04:33:28PM -0700, David S. Miller wrote:
> On Sat, 25 Sep 2004 09:20:53 +1000
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 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.

Dave, it hasn't been charged yet...
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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