]> git.baikalelectronics.ru Git - kernel.git/commit
net: introduce sk_forward_alloc_get()
authorPaolo Abeni <pabeni@redhat.com>
Tue, 26 Oct 2021 23:29:14 +0000 (16:29 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Oct 2021 01:20:29 +0000 (18:20 -0700)
commitca37db4266658f75614d34bdb90edac566dd876a
tree70c8a775138f862290e0eebd741bc8a7358da601
parent9e682ff95eaf87e2e9ab9a3613559b458221f295
net: introduce sk_forward_alloc_get()

A later patch will change the MPTCP memory accounting schema
in such a way that MPTCP sockets will encode the total amount of
forward allocated memory in two separate fields (one for tx and
one for rx).

MPTCP sockets will use their own helper to provide the accurate
amount of fwd allocated memory.

To allow the above, this patch adds a new, optional, sk method to
fetch the fwd memory, wrap the call in a new helper and use it
where it is appropriate.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sock.h
net/ipv4/af_inet.c
net/ipv4/inet_diag.c
net/sched/em_meta.c