All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"eric.dumazet@gmail.com" <eric.dumazet@gmail.com>,
	"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>
Subject: Re: [BUG?] tcp: potential bug in tcp_is_sackblock_valid()
Date: Fri, 09 Sep 2011 10:10:58 +0800	[thread overview]
Message-ID: <4E6975B2.8000603@intel.com> (raw)
In-Reply-To: <20110909015429.GA9156@gondor.apana.org.au>

On 09/09/2011 09:54 AM, Herbert Xu wrote:
> On Fri, Sep 09, 2011 at 09:45:52AM +0800, Yan, Zheng wrote:
>> Hi all,
>>
>> I found a check in tcp_is_sackblock_valid() is suspicious. It against
>> its comment and RFC. I think the correct check should be:
>>
>> ---
>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>> index 385c470..a5d01b1 100644
>> --- a/net/ipv4/tcp_input.c
>> +++ b/net/ipv4/tcp_input.c
>> @@ -1124,7 +1124,7 @@ static int tcp_is_sackblock_valid(struct tcp_sock *tp, int is_dsack,
>>                 return 0;
>>  
>>         /* ...Then it's D-SACK, and must reside below snd_una completely */
>> -       if (!after(end_seq, tp->snd_una))
>> +       if (after(end_seq, tp->snd_una))
>>                 return 0;
>>  
>>         if (!before(start_seq, tp->undo_marker))
>> ---
>>
>> I also checked /proc/net/netstat of my laptop, found TCPDSACKIgnoredOld
>> field is not zero. Maybe it's caused by the bug.
> 
> Yes this looks like a typo.  Please resend your patch with a
> description and signed-off-by line.
> 

I think the bug has a big influence on tcp DSACKs. It's better to
leave it to people who fully understand tcp code.

Thanks.

  reply	other threads:[~2011-09-09  2:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  1:45 [BUG?] tcp: potential bug in tcp_is_sackblock_valid() Yan, Zheng
2011-09-09  1:54 ` Herbert Xu
2011-09-09  2:10   ` Yan, Zheng [this message]
2011-09-09  8:03     ` Ilpo Järvinen
     [not found]       ` <CAA93jw7L9KyXVevZ8dqE+ExLYP9=CLMmj1gPD88ihBuC6ZovOQ@mail.gmail.com>
2011-09-18 20:39         ` Eric Dumazet
2011-09-18 21:04           ` Dave Taht
2011-09-18 21:20             ` Hagen Paul Pfeifer
2011-09-18 19:35 ` Eric Dumazet
2011-09-19  1:07   ` David Miller
2011-09-19  2:05     ` [PATCH] tcp: fix validation of D-SACK Yan, Zheng
2011-09-19  2:37       ` David Miller
2011-09-19 17:29         ` Jan Ceuleers
2011-09-20 18:50           ` David Miller

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=4E6975B2.8000603@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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.