[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVnQy=iurcb+Ce3MKaB_szq-JOPerrPFvTxdy556O90qg1gWg@mail.gmail.com>
Date: Mon, 1 May 2017 20:31:35 -0400
From: Neal Cardwell <ncardwell@...gle.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] tcp: fix wraparound issue in tcp_lp
On Mon, May 1, 2017 at 7:56 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Mon, 01 May 2017 15:29:48 -0700
> Agreed time wraparound would cause problems.
> But why not use existing time_after() macro here?
>
I suspect this is because time_after() asserts that it is being used
on unsigned long (64 bits), and tcp_time_stamp is 32 bits.
I suppose for tcp_time_stamp comparisons we could re-use the u32 TCP
sequence macros for before() and after()? Even the comment for
before()/after() is already generic enough to apply to tcp_time_stamp:
"The next routines deal with comparing 32 bit unsigned ints and worry
about wraparound (automatic with unsigned arithmetic)." That might be
nice.
neal
Powered by blists - more mailing lists