tcp: add indirect call wrapper in tcp_conn_request()
Subsystems (3)
PATCH 1/1 tcp: add indirect call wrapper in tcp_conn_request()
Small improvement in SYN processing, to directly call tcp_v6_init_seq_and_ts_off() or tcp_v4_init_seq_and_ts_off().
Signed-off-by Eric Dumazet <[email protected]>
--- include/net/tcp.h | 6 ++++++ net/ipv4/tcp_input.c | 5 ++++- net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-)
include/net/tcp.h +6 -0
@@ -3085,4 +3085,10 @@ static inline int tcp_recv_should_stop(struct sock *sk)signal_pending (current); } +INDIRECT_CALLABLE_DECLARE(union tcp_seq_and_ts_off + tcp_v4_init_seq_and_ts_off(const struct net *net, +const struct sk_buff *skb)); +INDIRECT_CALLABLE_DECLARE(union tcp_seq_and_ts_off + tcp_v6_init_seq_and_ts_off(const struct net *net, +const struct sk_buff *skb));#endif /* _TCP_H */
net/ipv4/tcp_input.c +4 -1
@@ -7658,7 +7658,10 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops, goto drop_and_free;if (tmp_opt.tstamp_ok || (!want_cookie && !isn)) - st = af_ops->init_seq_and_ts_off (net, skb); + st =INDIRECT_CALL_INET (af_ops->init_seq_and_ts_off, + tcp_v6_init_seq_and_ts_off, + tcp_v4_init_seq_and_ts_off, + net, skb);if (tmp_opt.tstamp_ok) {tcp_rsk (req)->req_usec_ts =dst_tcp_usec_ts (dst);
net/ipv4/tcp_ipv4.c +1 -1
@@ -105,7 +105,7 @@ static DEFINE_PER_CPU(struct sock_bh_locked, ipv4_tcp_sk) = {static DEFINE_MUTEX (tcp_exit_batch_mutex); -static union tcp_seq_and_ts_off +INDIRECT_CALLABLE_SCOPE union tcp_seq_and_ts_offtcp_v4_init_seq_and_ts_off (const struct net *net,const struct sk_buff *skb) { return secure_tcp_seq_and_ts_off(net,
net/ipv6/tcp_ipv6.c +1 -1
@@ -105,7 +105,7 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) } } -static union tcp_seq_and_ts_off +INDIRECT_CALLABLE_SCOPE union tcp_seq_and_ts_offtcp_v6_init_seq_and_ts_off (const struct net *net,const struct sk_buff *skb) { return secure_tcpv6_seq_and_ts_off(net,
Signature · 1 line
2.53.0.1213.gd9a14994de-goog
Quoted 5 lines · Eric Dumazet
Small improvement in SYN processing, to directly call
tcp_v6_init_seq_and_ts_off()ortcp_v4_init_seq_and_ts_off().Signed-off-by Eric Dumazet <[email protected]>
Reviewed-by Kuniyuki Iwashima <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Fri, 10 Apr 2026 17:49:50 +0000 you wrote:
Small improvement in SYN processing, to directly call
tcp_v6_init_seq_and_ts_off()ortcp_v4_init_seq_and_ts_off().Signed-off-by Eric Dumazet <[email protected]>--- include/net/tcp.h | 6 ++++++ net/ipv4/tcp_input.c | 5 ++++- net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] tcp: add indirect call wrapper in tcp_conn_request()
https://git.kernel.org/netdev/net-next/c/29703d7813f9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html