From: Matthieu Baerts <matttbe@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: Simon Horman <horms@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v2 net-next 3/3] tcp: make tcp_v{4,6}_send_check() static: manual merge
Date: Wed, 25 Feb 2026 12:57:21 +0100 [thread overview]
Message-ID: <bf7df838-7337-4ef8-b0c4-492f9c9bced7@kernel.org> (raw)
In-Reply-To: <20260223100729.3761597-4-edumazet@google.com>
Hi Eric,
Thank you for the patch!
On 23/02/2026 11:07, Eric Dumazet wrote:
> tcp_v{4,6}_send_check() are only called from tcp_output.c
> and should be made static so that the compiler does not need
> to put an out of line copy of them.
>
> Remove (struct inet_connection_sock_af_ops) send_check field
> and use instead @net_header_len.
>
> Move @net_header_len close to @queue_xmit for data locality
> as both are used in TCP tx fast path.
(...)
> diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
> index ecb362025c4e5183ec78aef4b45c249da87c19ea..bbc9355871c767b51e3d1a4d2436022a8556416c 100644
> --- a/include/net/inet_connection_sock.h
> +++ b/include/net/inet_connection_sock.h
> @@ -34,7 +34,7 @@ struct tcp_congestion_ops;
> */
> struct inet_connection_sock_af_ops {
> int (*queue_xmit)(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
> - void (*send_check)(struct sock *sk, struct sk_buff *skb);
> + u16 net_header_len;
> int (*rebuild_header)(struct sock *sk);
> void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb);
> int (*conn_request)(struct sock *sk, struct sk_buff *skb);
> @@ -43,7 +43,6 @@ struct inet_connection_sock_af_ops {
> struct dst_entry *dst,
> struct request_sock *req_unhash,
> bool *own_req);
> - u16 net_header_len;
FYI, I got a small conflict when merging 'net' in 'net-next' in the
MPTCP tree due to this patch applied in 'net':
858d2a4f67ff ("tcp: fix potential race in tcp_v6_syn_recv_sock()")
and this one from 'net-next':
fcd3d039fab6 ("tcp: make tcp_v{4,6}_send_check() static")
The conflict was in the context: here 'net_header_len' has been moved,
while in net-next, the line above has been modified. I'm sharing the 3w
patch resolving the conflict, just in case it can help others. Rerere
cache is available as well:
https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/d58bc4b
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
------------------------ 8< ------------------------
diff --cc include/net/inet_connection_sock.h
index 5cb3056d6ddc,bbc9355871c7..433c2df23076
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@@ -42,10 -42,7 +42,9 @@@ struct inet_connection_sock_af_ops
struct request_sock *req,
struct dst_entry *dst,
struct request_sock *req_unhash,
- bool *own_req);
+ bool *own_req,
+ void (*opt_child_init)(struct sock *newsk,
+ const struct sock *sk));
- u16 net_header_len;
int (*setsockopt)(struct sock *sk, int level, int optname,
sockptr_t optval, unsigned int optlen);
int (*getsockopt)(struct sock *sk, int level, int optname,
------------------------ 8< ------------------------
next prev parent reply other threads:[~2026-02-25 11:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 10:07 [PATCH v2 net-next 0/3] tcp: rework tcp_v{4,6}_send_check() Eric Dumazet
2026-02-23 10:07 ` [PATCH v2 net-next 1/3] tcp: inline __tcp_v4_send_check() Eric Dumazet
2026-02-23 18:50 ` Kuniyuki Iwashima
2026-02-23 10:07 ` [PATCH v2 net-next 2/3] tcp: move tcp_v6_send_check() to tcp_output.c Eric Dumazet
2026-02-23 18:53 ` Kuniyuki Iwashima
2026-02-23 10:07 ` [PATCH v2 net-next 3/3] tcp: make tcp_v{4,6}_send_check() static Eric Dumazet
2026-02-23 18:55 ` Kuniyuki Iwashima
2026-02-25 11:57 ` Matthieu Baerts [this message]
2026-02-25 1:50 ` [PATCH v2 net-next 0/3] tcp: rework tcp_v{4,6}_send_check() patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf7df838-7337-4ef8-b0c4-492f9c9bced7@kernel.org \
--to=matttbe@kernel.org \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox