[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5357FE65.1010400@ericsson.com>
Date: Wed, 23 Apr 2014 13:54:45 -0400
From: Jon Maloy <jon.maloy@...csson.com>
To: David Miller <davem@...emloft.net>
CC: <eric.dumazet@...il.com>, <erik.hugne@...csson.com>,
<netdev@...r.kernel.org>
Subject: Re: skb_try_coalesce bug?
On 04/23/2014 01:33 PM, David Miller wrote:
> From: Jon Maloy <jon.maloy@...csson.com>
> Date: Wed, 23 Apr 2014 12:56:20 -0400
>
>> On 04/22/2014 05:37 PM, Eric Dumazet wrote:
>>> On Tue, 2014-04-22 at 14:29 -0700, Eric Dumazet wrote:
>>>
>>>> Then if you do that, you also need to change head->data_len !
>>>
>>> Untested patch would be :
>>>
>>> diff --git a/net/tipc/link.c b/net/tipc/link.c
>>> index c5190ab75290..85077dd7c63e 100644
>>> --- a/net/tipc/link.c
>>> +++ b/net/tipc/link.c
>>> @@ -2349,6 +2349,7 @@ int tipc_link_frag_rcv(struct sk_buff **head, struct sk_buff **tail,
>>> (*tail)->next = frag;
>>> *tail = frag;
>>> (*head)->truesize += frag->truesize;
>>> + (*head)->data_len += frag->len;
>>
>> Just to confirm, does this mean that head's own (linear) data is not
>> included in data_len?
>
> For a given SKB, skb->len is the entire length of the packet, fragments and
> all.
>
> skb->data_len counts the sum of all of the page and SKB based fragments, ie.
> all bytes which are not in the top-level SKBs linear area.
>
> So the linear length is always "skb->len - skb->data_len", and this is exactly
> what skb_headlen() does.
>
Thank you for the clarification. We'll have to fix this. I am just puzzled that
our defragmentation algorithm has worked as well as it has until now.
///jon
--
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