netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: jeffrey.t.kirsher@intel.com
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Christian Brunner <chb@muc.de>,
	netdev@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [PATCH] ixgbe: fix truesize calculation when merging active tail into lro skb
Date: Tue, 14 Feb 2012 09:21:10 -0800	[thread overview]
Message-ID: <4F3A9806.2000102@intel.com> (raw)
In-Reply-To: <1329169382.2307.14.camel@jtkirshe-mobl>

On 02/13/2012 01:43 PM, Jeff Kirsher wrote:
> On Mon, 2012-02-13 at 15:12 +0100, Eric Dumazet wrote:
>> Le lundi 13 février 2012 à 14:52 +0100, Christian Brunner a écrit :
>>> I'm seeing some page allocation failures with the ixgbe driver under heavy
>>> load. While looking after it, I came accoss the truesize handling. I suspect,
>>> that there is a small misstake in ixgbe_merge_active_tail(). (But I'm not
>>> really sure).
>>>
>>> Truesize allocation of the skb may be larger than skb->len, because
>>> ixgbe is allocating PAGE_SIZE/2 for received fragments. Hence we 
>>> should use the truesize of the tail when merging.
>>>
>>> Signed-off-by: Christian Brunner <chb@muc.de>
>>> ---
>>>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>>> index a42b0b2..c4d25af 100644
>>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>>> @@ -1222,7 +1222,7 @@ static inline struct sk_buff *ixgbe_merge_active_tail(struct sk_buff *tail)
>>>  
>>>  	head->len += tail->len;
>>>  	head->data_len += tail->len;
>>> -	head->truesize += tail->len;
>>> +	head->truesize += tail->truesize;
>>>  
>>>  	IXGBE_CB(tail)->head = NULL;
>>>  
>> You forgot CC Intel guys, but they usually catch netdev traffic :)
>>
>> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
>>
>> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
>>
>>
> Thanks Eric for bringing this to my attention.
>
> Thanks Christian for the patch, I have added it to my queue.

The code itself is correct, but the comment isn't.  This code path is
applied only to the case where we are not using pages.  The default Rx
buffer size is actually about 3K when RSC is in use, which means
truesize is about 4.25K per buffer.

Thanks,

Alex

  reply	other threads:[~2012-02-14 17:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 13:52 [PATCH] ixgbe: fix truesize calculation when merging active tail into lro skb Christian Brunner
2012-02-13 14:12 ` Eric Dumazet
2012-02-13 21:43   ` Jeff Kirsher
2012-02-14 17:21     ` Alexander Duyck [this message]
2012-02-14 17:39       ` Eric Dumazet
2012-02-14 18:47         ` Alexander Duyck

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=4F3A9806.2000102@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=chb@muc.de \
    --cc=eric.dumazet@gmail.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).