tcp: remove unused hash_size from struct tcp_out_options
Subsystems (3)
PATCH v2 1/1 tcp: remove unused hash_size from struct tcp_out_options
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().
This closes a 7-byte hole and reduces the struct size from 96 to 88 bytes.
---
Changes in v2:
- Added struct size improvement details to commit message (Jakub)
- Added Reviewed-by tag
net/ipv4/tcp_output.c | 1 - 1 file changed, 1 deletion(-)
net/ipv4/tcp_output.c +0 -1
@@ -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: f4ac0cc88e9949d41bbdd101caa3117afe983ec9
Signature · 1 line
2.53.0
Quoted 11 lines · Keita Morisaki
hash_sizeis declared but never read. The MD5 path always uses a fixed size of 16, and the TCP-AO path usestcp_ao_maclen().This closes a 7-byte hole and reduces the struct size from 96 to 88 bytes.
Suggested-by Jakub Sitnicki <[email protected]>Signed-off-by Keita Morisaki <[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 11 lines · On Sat, 7 Mar 2026 14:16:19 +0900 you wrote:
hash_sizeis declared but never read. The MD5 path always uses a fixed size of 16, and the TCP-AO path usestcp_ao_maclen().This closes a 7-byte hole and reduces the struct size from 96 to 88 bytes.
Suggested-by Jakub Sitnicki <[email protected]>Signed-off-by Keita Morisaki <[email protected]>Reviewed-by Kuniyuki Iwashima <[email protected]>[...]
Here is the summary with links:
- [net-next,v2] tcp: remove unused hash_size from struct tcp_out_options
https://git.kernel.org/netdev/net-next/c/8ca8eb057673
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html