tcp: convert icsk_user_timeout from jiffies to msecs

This is a preparatory commit. Part of this series that improves the
socket TCP_USER_TIMEOUT option accuracy. Implement Eric Dumazets idea
to convert icsk->icsk_user_timeout from jiffies to msecs. To eliminate
the msecs_to_jiffies() and jiffies_to_msecs() dance in future.

Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jon Maxwell
2018-07-19 11:14:42 +10:00
committed by David S. Miller
parent 975cd350c2
commit 9bcc66e198
2 changed files with 6 additions and 6 deletions

View File

@@ -2989,7 +2989,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
if (val < 0)
err = -EINVAL;
else
icsk->icsk_user_timeout = msecs_to_jiffies(val);
icsk->icsk_user_timeout = val;
break;
case TCP_FASTOPEN:
@@ -3445,7 +3445,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
break;
case TCP_USER_TIMEOUT:
val = jiffies_to_msecs(icsk->icsk_user_timeout);
val = icsk->icsk_user_timeout;
break;
case TCP_FASTOPEN: