diff options
author | Jon Maxwell <jmaxwell37@gmail.com> | 2018-07-18 21:14:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-21 13:28:55 -0400 |
commit | 9bcc66e1983d10861deb6920fb0c151c5b01772a (patch) | |
tree | 29fd844864943e9c6bc8c6f8068b70a66f766ea9 /net/ipv4/tcp.c | |
parent | 975cd350c270328b784326d124b7a6607542e053 (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bce53b1728a6..514aaac1626f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2989,7 +2989,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2989 | if (val < 0) | 2989 | if (val < 0) |
2990 | err = -EINVAL; | 2990 | err = -EINVAL; |
2991 | else | 2991 | else |
2992 | icsk->icsk_user_timeout = msecs_to_jiffies(val); | 2992 | icsk->icsk_user_timeout = val; |
2993 | break; | 2993 | break; |
2994 | 2994 | ||
2995 | case TCP_FASTOPEN: | 2995 | case TCP_FASTOPEN: |
@@ -3445,7 +3445,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level, | |||
3445 | break; | 3445 | break; |
3446 | 3446 | ||
3447 | case TCP_USER_TIMEOUT: | 3447 | case TCP_USER_TIMEOUT: |
3448 | val = jiffies_to_msecs(icsk->icsk_user_timeout); | 3448 | val = icsk->icsk_user_timeout; |
3449 | break; | 3449 | break; |
3450 | 3450 | ||
3451 | case TCP_FASTOPEN: | 3451 | case TCP_FASTOPEN: |