Subject: Re: [PATCH bpf-next/net 2/6] net: Allow opt-out from global protocol memory accounting.

From: Martin KaFai Lau <[email-masked]>
Date: Tue, 14 Oct 2025 16:12:38 -0700

On 10/6/25 5:07 PM, Kuniyuki Iwashima wrote:
> diff --git a/include/net/sock.h b/include/net/sock.h
> index 60bcb13f045c..5cf8de6b6bf2 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -118,6 +118,7 @@ typedef __u64 __bitwise __addrpair;
>    *	@skc_reuseport: %SO_REUSEPORT setting
>    *	@skc_ipv6only: socket is IPV6 only
>    *	@skc_net_refcnt: socket is using net ref counting
> + *	@skc_bypass_prot_mem:

While it needs a respin, maybe useful to add comment on "@skc_bypass_prot_mem"

>    *	@skc_bound_dev_if: bound device index if != 0
>    *	@skc_bind_node: bind hash linkage for various protocol lookup tables
>    *	@skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol
> @@ -174,6 +175,7 @@ struct sock_common {
>   	unsigned char		skc_reuseport:1;
>   	unsigned char		skc_ipv6only:1;
>   	unsigned char		skc_net_refcnt:1;
> +	unsigned char		skc_bypass_prot_mem:1;
>   	int			skc_bound_dev_if;
>   	union {
>   		struct hlist_node	skc_bind_node;