[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Sep 2011 11:03:58 +0300 (EEST)
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: "Yan, Zheng" <zheng.z.yan@...el.com>
cc: Herbert Xu <herbert@...dor.hengli.com.au>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"eric.dumazet@...il.com" <eric.dumazet@...il.com>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>
Subject: Re: [BUG?] tcp: potential bug in tcp_is_sackblock_valid()
On Fri, 9 Sep 2011, Yan, Zheng wrote:
> On 09/09/2011 09:54 AM, Herbert Xu wrote:
> > On Fri, Sep 09, 2011 at 09:45:52AM +0800, Yan, Zheng wrote:
> >> 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.
Hmm, some Ignored I was expecting to see even when nothing was wrong but I
think it might have been the other counter... too long time already passed
to remember all the details I've been thinking.
> > 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.
Indeed, it looks like a double negative error.
--
i.
--
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