diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2025-11-06 03:32:43 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-08 05:05:26 +0300 |
| commit | 207ce0f6bc131812c96cf4f6db328af5396cebac (patch) | |
| tree | 82f12c772788c279edebe358bf03acdce705ca56 /include | |
| parent | 6fbf648d5cc48ebf250f32a8793a95a2596c0d50 (diff) | |
| download | linux-207ce0f6bc131812c96cf4f6db328af5396cebac.tar.xz | |
tcp: Remove timeout arg from reqsk_timeout().
reqsk_timeout() is always called with @timeout being TCP_RTO_MAX.
Let's remove the arg.
As a prep for the next patch, reqsk_timeout() is moved to tcp.h
and renamed to tcp_reqsk_timeout().
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251106003357.273403-5-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/inet_connection_sock.h | 8 | ||||
| -rw-r--r-- | include/net/tcp.h | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 90a99a2fc804..fd40af2221b9 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -290,14 +290,6 @@ static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk) bool inet_csk_reqsk_queue_drop(struct sock *sk, struct request_sock *req); void inet_csk_reqsk_queue_drop_and_put(struct sock *sk, struct request_sock *req); -static inline unsigned long -reqsk_timeout(struct request_sock *req, unsigned long max_timeout) -{ - u64 timeout = (u64)req->timeout << req->num_timeout; - - return (unsigned long)min_t(u64, timeout, max_timeout); -} - void inet_csk_destroy_sock(struct sock *sk); void inet_csk_prepare_for_destroy_sock(struct sock *sk); void inet_csk_prepare_forced_close(struct sock *sk); diff --git a/include/net/tcp.h b/include/net/tcp.h index 0aa1f07d036a..0c7274ac7ed5 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -841,6 +841,13 @@ static inline u32 __tcp_set_rto(const struct tcp_sock *tp) return usecs_to_jiffies((tp->srtt_us >> 3) + tp->rttvar_us); } +static inline unsigned long tcp_reqsk_timeout(struct request_sock *req) +{ + u64 timeout = (u64)req->timeout << req->num_timeout; + + return (unsigned long)min_t(u64, timeout, TCP_RTO_MAX); +} + u32 tcp_delack_max(const struct sock *sk); /* Compute the actual rto_min value */ |
