diff options
author | Eric Dumazet <edumazet@google.com> | 2022-06-09 08:34:08 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-11 01:21:26 +0200 |
commit | 0defbb0af775ef037913786048d099bbe8b9a2c2 (patch) | |
tree | b25787bc499129fc43cba5c3e8af7e83c3880b42 /include/net/sock.h | |
parent | net: remove SK_MEM_QUANTUM and SK_MEM_QUANTUM_SHIFT (diff) | |
download | linux-0defbb0af775ef037913786048d099bbe8b9a2c2.tar.xz linux-0defbb0af775ef037913786048d099bbe8b9a2c2.zip |
net: add per_cpu_fw_alloc field to struct proto
Each protocol having a ->memory_allocated pointer gets a corresponding
per-cpu reserve, that following patches will use.
Instead of having reserved bytes per socket,
we want to have per-cpu reserves.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 298897bbfb3a..825f8cbf791f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1254,6 +1254,7 @@ struct proto { void (*enter_memory_pressure)(struct sock *sk); void (*leave_memory_pressure)(struct sock *sk); atomic_long_t *memory_allocated; /* Current allocated memory. */ + int __percpu *per_cpu_fw_alloc; struct percpu_counter *sockets_allocated; /* Current number of sockets. */ /* |