Re: [net-next,v3] tcp: Improve setsockopt() TCP_USER_TIMEOUT accuracy

2018-07-10 Thread Eric Dumazet
On 07/10/2018 05:38 AM, Eric Dumazet wrote: > Note that if we always do jiffies_to_msecs(icsk->icsk_user_timeout) in TCP, > we also could change the convention and store msecs in this field instead of > jiffies. > > That would eliminate the msecs_to_jiffies() and jiffies_to_msecs() dance. >

Re: [net-next,v3] tcp: Improve setsockopt() TCP_USER_TIMEOUT accuracy

2018-07-10 Thread Eric Dumazet
On 07/10/2018 05:38 AM, Eric Dumazet wrote: > Note that if we always do jiffies_to_msecs(icsk->icsk_user_timeout) in TCP, > we also could change the convention and store msecs in this field instead of > jiffies. > > That would eliminate the msecs_to_jiffies() and jiffies_to_msecs() dance. >

[net-next,v3] tcp: Improve setsockopt() TCP_USER_TIMEOUT accuracy

2018-07-10 Thread Jon Maxwell
v3 contains the following suggestions by Neal Cardwell: 1) Fix up units mismatch regarding msec/jiffies. 2) Address possiblility of time_remaining being negative. 3) Add a helper routine tcp_clamp_rto_to_user_timeout() to do the rto calculation. 4) Move start_ts logic into helper routine

[net-next,v3] tcp: Improve setsockopt() TCP_USER_TIMEOUT accuracy

2018-07-10 Thread Jon Maxwell
v3 contains the following suggestions by Neal Cardwell: 1) Fix up units mismatch regarding msec/jiffies. 2) Address possiblility of time_remaining being negative. 3) Add a helper routine tcp_clamp_rto_to_user_timeout() to do the rto calculation. 4) Move start_ts logic into helper routine