summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-11-07 18:05:28 -0800
committerJakub Kicinski <kuba@kernel.org>2025-11-07 18:05:28 -0800
commit45cb3c6fbe875e1fda037a798e4c95c43b901d17 (patch)
tree38adf672d922c05e629401d7eba63ce63ce64b35 /include
parentc6934c4e049c8a7f2b7fab620c04bc5dfbd947c1 (diff)
parentffc56c90819e86d3a8c4eff6f831317d1c1476b6 (diff)
Merge branch 'tcp-clean-up-syn-ack-rto-code-and-apply-max-rto'
Kuniyuki Iwashima says: ==================== tcp: Clean up SYN+ACK RTO code and apply max RTO. Patch 1 - 4 are misc cleanup. Patch 5 applies max RTO to non-TFO SYN+ACK. Patch 6 adds a test for max RTO of SYN+ACK. ==================== Link: https://patch.msgid.link/20251106003357.273403-1-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet_connection_sock.h11
-rw-r--r--include/net/request_sock.h1
-rw-r--r--include/net/tcp.h8
3 files changed, 9 insertions, 11 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index b4b886647607..fd40af2221b9 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -267,8 +267,7 @@ struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
struct sock *inet_csk_reqsk_queue_add(struct sock *sk,
struct request_sock *req,
struct sock *child);
-bool inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
- unsigned long timeout);
+bool inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req);
struct sock *inet_csk_complete_hashdance(struct sock *sk, struct sock *child,
struct request_sock *req,
bool own_req);
@@ -291,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/request_sock.h b/include/net/request_sock.h
index cd4d4cf71d0d..9b9e04f6bb89 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -36,7 +36,6 @@ struct request_sock_ops {
struct sk_buff *skb,
enum sk_rst_reason reason);
void (*destructor)(struct request_sock *req);
- void (*syn_ack_timeout)(const struct request_sock *req);
};
struct saved_syn {
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 0aa1f07d036a..4833ec7903ec 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -841,6 +841,14 @@ 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(req->rsk_listener));
+}
+
u32 tcp_delack_max(const struct sock *sk);
/* Compute the actual rto_min value */