public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nithin Nayak Sujir <nsujir@broadcom•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: <davem@davemloft•net>, <netdev@vger•kernel.org>,
	<stable@vger•kernel.org>, Michael Chan <mchan@broadcom•com>
Subject: Re: [PATCH net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
Date: Thu, 19 Dec 2013 17:35:50 -0800	[thread overview]
Message-ID: <52B39EF6.9080006@broadcom.com> (raw)
In-Reply-To: <1387500064.19078.381.camel@edumazet-glaptop2.roam.corp.google.com>



On 12/19/2013 04:41 PM, Eric Dumazet wrote:
> On Thu, 2013-12-19 at 16:24 -0800, Nithin Nayak Sujir wrote:
>> The current driver assumes that an skb fragment can only be upto jumbo
>> size. Presumably this was a fast-path optimization. This assumption is
>> no longer true as fragments can be upto 32k.
>>
>> Cc: stable@vger•kernel.org
>> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom•com>
>> Signed-off-by: Michael Chan <mchan@broadcom•com>
>> ---
>>   drivers/net/ethernet/broadcom/tg3.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
>> index f3dd93b..8ab21d7 100644
>> --- a/drivers/net/ethernet/broadcom/tg3.c
>> +++ b/drivers/net/ethernet/broadcom/tg3.c
>> @@ -7622,7 +7622,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
>>   {
>>   	u32 base = (u32) mapping & 0xffffffff;
>>
>> -	return (base > 0xffffdcc0) && (base + len + 8 < base);
>> +	return (base + len + 8 < base);
>>   }
>>
>>   /* Test for TSO DMA buffers that cross into regions which are within MSS bytes
>
> btw this is also :
>
> return base + len + 8 < base;
>
>
>

I'll send a v2.

      reply	other threads:[~2013-12-20  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  0:24 [PATCH net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size Nithin Nayak Sujir
2013-12-20  0:38 ` Eric Dumazet
2013-12-20  1:33   ` Nithin Nayak Sujir
2013-12-20  0:41 ` Eric Dumazet
2013-12-20  1:35   ` Nithin Nayak Sujir [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=52B39EF6.9080006@broadcom.com \
    --to=nsujir@broadcom$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=mchan@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stable@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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