Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tcp: Call tcp_syn_ack_timeout() directly.

Since DCCP has been removed, we do not need to use
request_sock_ops.syn_ack_timeout().

Let's call tcp_syn_ack_timeout() directly.

Now other function pointers of request_sock_ops are
protocol-dependent.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251106003357.273403-2-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
be88c549 c6934c4e

+4 -6
-1
include/net/request_sock.h
··· 36 36 struct sk_buff *skb, 37 37 enum sk_rst_reason reason); 38 38 void (*destructor)(struct request_sock *req); 39 - void (*syn_ack_timeout)(const struct request_sock *req); 40 39 }; 41 40 42 41 struct saved_syn {
+3 -1
net/ipv4/inet_connection_sock.c
··· 1096 1096 young <<= 1; 1097 1097 } 1098 1098 } 1099 + 1099 1100 syn_ack_recalc(req, max_syn_ack_retries, READ_ONCE(queue->rskq_defer_accept), 1100 1101 &expire, &resend); 1101 - req->rsk_ops->syn_ack_timeout(req); 1102 + tcp_syn_ack_timeout(req); 1103 + 1102 1104 if (!expire && 1103 1105 (!resend || 1104 1106 !tcp_rtx_synack(sk_listener, req) ||
-1
net/ipv4/tcp_ipv4.c
··· 1660 1660 .send_ack = tcp_v4_reqsk_send_ack, 1661 1661 .destructor = tcp_v4_reqsk_destructor, 1662 1662 .send_reset = tcp_v4_send_reset, 1663 - .syn_ack_timeout = tcp_syn_ack_timeout, 1664 1663 }; 1665 1664 1666 1665 const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
+1 -2
net/ipv4/tcp_timer.c
··· 458 458 struct tcp_sock *tp = tcp_sk(sk); 459 459 int max_retries; 460 460 461 - req->rsk_ops->syn_ack_timeout(req); 461 + tcp_syn_ack_timeout(req); 462 462 463 463 /* Add one more retry for fastopen. 464 464 * Paired with WRITE_ONCE() in tcp_sock_set_syncnt() ··· 752 752 753 753 __NET_INC_STATS(net, LINUX_MIB_TCPTIMEOUTS); 754 754 } 755 - EXPORT_IPV6_MOD(tcp_syn_ack_timeout); 756 755 757 756 void tcp_reset_keepalive_timer(struct sock *sk, unsigned long len) 758 757 {
-1
net/ipv6/tcp_ipv6.c
··· 796 796 .send_ack = tcp_v6_reqsk_send_ack, 797 797 .destructor = tcp_v6_reqsk_destructor, 798 798 .send_reset = tcp_v6_send_reset, 799 - .syn_ack_timeout = tcp_syn_ack_timeout, 800 799 }; 801 800 802 801 const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {