From: Jakub Sitnicki <jakub@cloudflare.com>
To: Keita Morisaki <kmta1236@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
Neal Cardwell <ncardwell@google.com>,
"David S . Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] tcp: remove unused hash_size from struct tcp_out_options
Date: Thu, 05 Mar 2026 11:40:27 +0100 [thread overview]
Message-ID: <87eclyo8ys.fsf@cloudflare.com> (raw)
In-Reply-To: <20260305022703.3946470-1-kmta1236@gmail.com> (Keita Morisaki's message of "Thu, 5 Mar 2026 11:27:03 +0900")
On Thu, Mar 05, 2026 at 11:27 AM +09, Keita Morisaki wrote:
> hash_size is declared but never read. The MD5 path always uses a
> fixed size of 16, and the TCP-AO path uses tcp_ao_maclen().
>
> Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
> Signed-off-by: Keita Morisaki <kmta1236@gmail.com>
> ---
> net/ipv4/tcp_output.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index 63ee037f46e50..f0e04ebd8b723 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -441,7 +441,6 @@ struct tcp_out_options {
> u8 ws; /* window scale, 0 to disable */
> u8 num_accecn_fields:7, /* number of AccECN fields needed */
> use_synack_ecn_bytes:1; /* Use synack_ecn_bytes or not */
> - u8 hash_size; /* bytes in hash_location */
> __u8 *hash_location; /* temporary pointer, overloaded */
> __u32 tsval, tsecr; /* need to include OPTION_TS */
> struct tcp_fastopen_cookie *fastopen_cookie; /* Fast open cookie */
>
> base-commit: 21fc6b53f12379f3f9b29830be3597a322261df8
Worth noting that this closes a 7-byte hole we had there:
u8 num_accecn_fields:7; /* 7: 0 1 */
u8 use_synack_ecn_bytes:1; /* 7: 7 1 */
u8 hash_size; /* 8 1 */
/* XXX 7 bytes hole, try to pack */
__u8 * hash_location; /* 16 8 */
Struct size went down from 96B to 88B.
prev parent reply other threads:[~2026-03-05 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 2:27 [PATCH net-next] tcp: remove unused hash_size from struct tcp_out_options Keita Morisaki
2026-03-05 4:37 ` Kuniyuki Iwashima
2026-03-05 4:45 ` Kuniyuki Iwashima
2026-03-05 4:53 ` Keita Morisaki
2026-03-05 5:03 ` Kuniyuki Iwashima
2026-03-05 10:40 ` Jakub Sitnicki [this message]
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=87eclyo8ys.fsf@cloudflare.com \
--to=jakub@cloudflare.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kmta1236@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.