Subject: Re: [PATCH bpf-next/net 0/6] bpf: Allow opt-out from sk->sk_prot->memory_allocated.

From: Roman Gushchin <[email-masked]>
Date: Mon, 06 Oct 2025 18:10:09 -0700

Kuniyuki Iwashima <[email-masked]> writes:

> This series allows opting out of the global per-protocol memory
> accounting if socket is configured as such by sysctl or BPF prog.
>
> This series is v11 of the series below [0], but I start as a new series
> because the changes now fall in net and bpf subsystems only.
>
> I discussed with Roman Gushchin offlist, and he suggested not mixing
> two independent subsystems and it would be cleaner not to depend on
> memcg.
>
> So, sk->sk_memcg and memcg code are no longer touched, and instead we
> use another hole near sk->sk_prot to store a flag for the net feature.
>
> Overview of the series:
>
>   patch 1 is misc cleanup
>   patch 2 allows opt-out from sk->sk_prot->memory_allocated
>   patch 3 introduces net.core.bypass_prot_mem
>   patch 4 & 5 supports flagging sk->sk_bypass_prot_mem via bpf_setsockopt()
>   patch 6 is selftest

Acked-by: Roman Gushchin <[email-masked]>
for the series.

Thanks!