mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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 <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260410174950.745670-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
59818773ba
commit
29703d7813
|
|
@ -3084,4 +3084,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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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_off
|
||||
tcp_v4_init_seq_and_ts_off(const struct net *net, const struct sk_buff *skb)
|
||||
{
|
||||
return secure_tcp_seq_and_ts_off(net,
|
||||
|
|
|
|||
|
|
@ -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_off
|
||||
tcp_v6_init_seq_and_ts_off(const struct net *net, const struct sk_buff *skb)
|
||||
{
|
||||
return secure_tcpv6_seq_and_ts_off(net,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user