[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140423.133349.1007553448019102626.davem@davemloft.net>
Date: Wed, 23 Apr 2014 13:33:49 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: jon.maloy@...csson.com
Cc: eric.dumazet@...il.com, erik.hugne@...csson.com,
netdev@...r.kernel.org
Subject: Re: skb_try_coalesce bug?
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.
--
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