Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-02 Thread David Miller
From: Eric Dumazet Date: Mon, 01 May 2017 15:29:48 -0700 > From: Eric Dumazet > > Be careful when comparing tcp_time_stamp to some u32 quantity, > otherwise result can be surprising. > > Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control") > Signed-off-by: Eric Dumazet Applied

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-01 Thread Eric Dumazet
On Mon, 2017-05-01 at 18:04 -0700, Eric Dumazet wrote: > > Simply to not perform (tcp_time_stamp - tp->rx_opt.rcv_tsecr) twice. > > jiffies being volatile, this can not be optimized by the compiler. > > I have a patch series (for linux-4.13) that will switch TCP stack to 1ms > TS options, regar

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-01 Thread Eric Dumazet
On Mon, 2017-05-01 at 16:56 -0700, Stephen Hemminger wrote: > On Mon, 01 May 2017 15:29:48 -0700 > Eric Dumazet wrote: > > > From: Eric Dumazet > > > > Be careful when comparing tcp_time_stamp to some u32 quantity, > > otherwise result can be surprising. > > > > Fixes: 7c106d7e782b ("[TCP]: TC

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-01 Thread Neal Cardwell
On Mon, May 1, 2017 at 7:56 PM, Stephen Hemminger 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 t

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-01 Thread Stephen Hemminger
On Mon, 01 May 2017 15:29:48 -0700 Eric Dumazet wrote: > From: Eric Dumazet > > Be careful when comparing tcp_time_stamp to some u32 quantity, > otherwise result can be surprising. > > Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control") > Signed-off-by: Eric Dumazet > --- > ne

[PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-01 Thread Eric Dumazet
From: Eric Dumazet Be careful when comparing tcp_time_stamp to some u32 quantity, otherwise result can be surprising. Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control") Signed-off-by: Eric Dumazet --- net/ipv4/tcp_lp.c |6 -- 1 file changed, 4 insertions(+), 2 deletions