All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Maloy <jon.maloy@ericsson.com>
To: David Miller <davem@davemloft.net>
Cc: <eric.dumazet@gmail.com>, <erik.hugne@ericsson.com>,
	<netdev@vger.kernel.org>
Subject: Re: skb_try_coalesce bug?
Date: Wed, 23 Apr 2014 13:54:45 -0400	[thread overview]
Message-ID: <5357FE65.1010400@ericsson.com> (raw)
In-Reply-To: <20140423.133349.1007553448019102626.davem@davemloft.net>

On 04/23/2014 01:33 PM, David Miller wrote:
> From: Jon Maloy <jon.maloy@ericsson.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

      reply	other threads:[~2014-04-23 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 12:01 skb_try_coalesce bug? Erik Hugne
2014-04-22 13:11 ` Eric Dumazet
2014-04-22 19:38   ` Jon Maloy
2014-04-22 20:05     ` Eric Dumazet
2014-04-22 20:35       ` Jon Maloy
2014-04-22 21:28         ` Jon Maloy
2014-04-22 21:29         ` Eric Dumazet
2014-04-22 21:31           ` Jon Maloy
2014-04-22 21:37           ` Eric Dumazet
2014-04-23 16:56             ` Jon Maloy
2014-04-23 17:33               ` David Miller
2014-04-23 17:54                 ` Jon Maloy [this message]

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=5357FE65.1010400@ericsson.com \
    --to=jon.maloy@ericsson.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=erik.hugne@ericsson.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.