From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Zhi Yong Wu <zwu.kernel@gmail•com>, netdev@vger•kernel.org
Cc: eric.dumazet@gmail•com, Zhi Yong Wu <wuzhy@linux•vnet.ibm.com>
Subject: Re: [RFC PATCH] net, gro: fix the truesize of all fragments
Date: Fri, 20 Dec 2013 17:52:23 +0400 [thread overview]
Message-ID: <52B44B97.4060400@cogentembedded.com> (raw)
In-Reply-To: <1387539943-25521-1-git-send-email-zwu.kernel@gmail.com>
Hello.
On 20-12-2013 15:45, Zhi Yong Wu wrote:
> From: Zhi Yong Wu <wuzhy@linux•vnet.ibm.com>
> When the truesize of all fragments was calculated, it didn't take
> the first small piece of data into account.
> Signed-off-by: Zhi Yong Wu <wuzhy@linux•vnet.ibm.com>
> ---
> net/core/skbuff.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 2b6b863..0665bd6 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -3027,9 +3027,12 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
> frag->page_offset += offset;
> skb_frag_size_sub(frag, offset);
>
> - /* all fragments truesize : remove (head size + sk_buff) */
> + /**
Why kernel-doc style comment here? Networking code uses the following
comment style:
/* bla
* bla
*/
> + * all fragments truesize :
> + * remove (head size + sk_buff + offset)
> + */
> delta_truesize = skb->truesize -
> - SKB_TRUESIZE(skb_end_offset(skb));
> + SKB_TRUESIZE(skb_end_offset(skb) + offset);
>
> skb->truesize -= skb->data_len;
> skb->len -= skb->data_len;
WBR, Sergei
next prev parent reply other threads:[~2013-12-20 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 11:45 [RFC PATCH] net, gro: fix the truesize of all fragments Zhi Yong Wu
2013-12-20 13:52 ` Sergei Shtylyov [this message]
2013-12-20 13:59 ` Zhi Yong Wu
2013-12-20 14:21 ` Sergei Shtylyov
2013-12-20 14:34 ` Zhi Yong Wu
2013-12-20 14:28 ` Eric Dumazet
2013-12-20 14:37 ` Zhi Yong Wu
2013-12-20 14:42 ` Eric Dumazet
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=52B44B97.4060400@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=wuzhy@linux$(echo .)vnet.ibm.com \
--cc=zwu.kernel@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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