From: Eric Dumazet <eric.dumazet@gmail.com>
To: roy.qing.li@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] skbuff: update sk truesize in pskb_expand_head
Date: Fri, 14 Oct 2011 09:53:49 +0200 [thread overview]
Message-ID: <1318578829.2533.100.camel@edumazet-laptop> (raw)
In-Reply-To: <1318577970-19566-1-git-send-email-roy.qing.li@gmail.com>
Le vendredi 14 octobre 2011 à 15:39 +0800, roy.qing.li@gmail.com a
écrit :
> when pskb_expand_head reallocates header of &sk_buff, the sk
> truesize should be updated simultaneously
>
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
> ---
> net/core/skbuff.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 387703f..48e0be9 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -920,6 +920,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
> }
> off = (data + nhead) - skb->head;
>
> + skb->truesize += (size - (skb_end_pointer(skb) - skb->head));
> skb->head = data;
> adjust_others:
> skb->data += off;
I dont believe this is needed or complete patch.
Callers that need an updated truesize do the adjustement.
next prev parent reply other threads:[~2011-10-14 7:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 7:39 [PATCH net-next] skbuff: update sk truesize in pskb_expand_head roy.qing.li
2011-10-14 7:48 ` David Miller
2011-10-15 3:52 ` RongQing Li
2011-10-15 4:02 ` David Miller
2011-10-14 7:53 ` Eric Dumazet [this message]
2011-10-15 3:54 ` RongQing Li
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=1318578829.2533.100.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roy.qing.li@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox