[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKaHErtov9nnzQQ56XHGdrM--n+H3k2JEBM=v7MwyV-VQ@mail.gmail.com>
Date: Tue, 3 Feb 2026 19:18:41 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Neal Cardwell <ncardwell@...gle.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 3/3] tcp: make tcp_v{4,6}_send_check() static
On Tue, Feb 3, 2026 at 6:26 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 3 Feb 2026 14:40:53 +0000 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.
>
> Seeing this in allmodconfig:
>
> net/ipv4/tcp_output.c:1482:13: warning: unused function 'tcp_v4_send_check' [-Wunused-function]
> 1482 | static void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb)
> | ^~~~~~~~~~~~~~~~~
Silly me, I will squash this in V2 tomorrow, thanks.
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index fc9f096dff313d14b96a4d7d2724f9740aa55d61..0381112f05e6d48f70f4941abc3af6e9b6b148d9
100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1617,9 +1617,8 @@ static int __tcp_transmit_skb(struct sock *sk,
struct sk_buff *skb,
if (likely(icsk->icsk_af_ops->net_header_len == sizeof(struct ipv6hdr)))
tcp_v6_send_check(sk, skb);
else
-#else
- tcp_v4_send_check(sk, skb);
#endif
+ tcp_v4_send_check(sk, skb);
if (likely(tcb->tcp_flags & TCPHDR_ACK))
tcp_event_ack_sent(sk, rcv_nxt);
Powered by blists - more mailing lists