[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEH94LhiQGG-_Ad-5KYKt20CBYkQ6YR+s93zPeELzR-fGZ4yTA@mail.gmail.com>
Date: Fri, 20 Dec 2013 21:59:59 +0800
From: Zhi Yong Wu <zwu.kernel@...il.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Linux Netdev List <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH] net, gro: fix the truesize of all fragments
On Fri, Dec 20, 2013 at 9:52 PM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> Hello.
>
>
> On 20-12-2013 15:45, Zhi Yong Wu wrote:
>
>> From: Zhi Yong Wu <wuzhy@...ux.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@...ux.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
> */
No, If you check other comments in networking code, you will see why i
did as that.
/**
* skb_segment - Perform protocol segmentation on skb.
* @skb: buffer to segment
* @features: features for the output path (see dev->features)
*
* This function performs segmentation on the given skb. It returns
* a pointer to the first in a list of new skbs for the segments.
* In case of error it returns ERR_PTR(err).
*/
struct sk_buff *skb_segment
>
>
>> + * 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
Sorry, what is WBR?
>
--
Regards,
Zhi Yong Wu
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists