Netdev List
 help / color / mirror / Atom feed
* [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits.
@ 2026-11-03  4:42 Kuniyuki Iwashima
  2026-11-06  9:59 ` Simon Horman
  2026-11-06 19:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2026-11-03  4:42 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Willem de Bruijn
  Cc: Simon Horman, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

skc_reuse now consumes 4 bits.

However, SK_NO_REUSE, SK_CAN_REUSE, and SK_FORCE_REUSE
are mutually exclusive and fit in 2 bits.

Let's reclaim 2 bits.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
---
This is to give a bit to SO_NO_RFS instead of sk_flags.
https://lore.kernel.org/netdev/20261031113330.45704-2-vitaly.zuevsky@gcore.com/
---
 include/net/sock.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 173b37b2b8bb..4c831eec2045 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -125,6 +125,7 @@ typedef __u64 __bitwise __addrpair;
  *	@skc_net_refcnt: socket is using net ref counting
  *	@skc_bypass_prot_mem: bypass the per-protocol memory accounting for skb
  *	@skc_bound_dev_if: bound device index if != 0
+ *	@skc_unused: unused bits
  *	@skc_bind_node: bind hash linkage for various protocol lookup tables
  *	@skc_portaddr_node: second hash linkage for UDP
  *	@skc_prot: protocol handlers inside a network family
@@ -176,11 +177,12 @@ struct sock_common {
 
 	unsigned short		skc_family;
 	volatile unsigned char	skc_state;
-	unsigned char		skc_reuse:4;
+	unsigned char		skc_reuse:2;
 	unsigned char		skc_reuseport:1;
 	unsigned char		skc_ipv6only:1;
 	unsigned char		skc_net_refcnt:1;
 	unsigned char		skc_bypass_prot_mem:1;
+	unsigned char		skc_unused:2;
 	int			skc_bound_dev_if;
 	union {
 		struct hlist_node	skc_bind_node;
-- 
2.56.0.385.gac671c819a-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits.
  2026-11-03  4:42 [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits Kuniyuki Iwashima
@ 2026-11-06  9:59 ` Simon Horman
  2026-11-06 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-11-06  9:59 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Willem de Bruijn, Kuniyuki Iwashima, netdev

On Tue, Nov 03, 2026 at 04:42:06AM +0000, Kuniyuki Iwashima wrote:
> skc_reuse now consumes 4 bits.
> 
> However, SK_NO_REUSE, SK_CAN_REUSE, and SK_FORCE_REUSE
> are mutually exclusive and fit in 2 bits.
> 
> Let's reclaim 2 bits.
> 
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits.
  2026-11-03  4:42 [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits Kuniyuki Iwashima
  2026-11-06  9:59 ` Simon Horman
@ 2026-11-06 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-06 19:40 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: davem, edumazet, kuba, pabeni, willemb, horms, kuni1840, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  3 Nov 2026 04:42:06 +0000 you wrote:
> skc_reuse now consumes 4 bits.
> 
> However, SK_NO_REUSE, SK_CAN_REUSE, and SK_FORCE_REUSE
> are mutually exclusive and fit in 2 bits.
> 
> Let's reclaim 2 bits.
> 
> [...]

Here is the summary with links:
  - [v1,net-next] net: Shrink skc_reuse:4 to 2 bits.
    https://git.kernel.org/netdev/net-next/c/13df9cc6fc0b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-06 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03  4:42 [PATCH v1 net-next] net: Shrink skc_reuse:4 to 2 bits Kuniyuki Iwashima
2026-11-06  9:59 ` Simon Horman
2026-11-06 19:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox