OpenCloudOS-Kernel/net/xdp
Björn Töpel e2ce367488 xsk: simplify AF_XDP socket teardown
Prior this commit, when the struct socket object was being released,
the UMEM did not have its reference count decreased. Instead, this was
done in the struct sock sk_destruct function.

There is no reason to keep the UMEM reference around when the socket
is being orphaned, so in this patch the xdp_put_mem is called in the
xsk_release function. This results in that the xsk_destruct function
can be removed!

Note that, it still holds that a struct xsk_sock reference might still
linger in the XSKMAP after the UMEM is released, e.g. if a user does
not clear the XSKMAP prior to closing the process. This sock will be
in a "released" zombie like state, until the XSKMAP is removed.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-12-19 21:45:17 +01:00
..
Kconfig
Makefile xsk: remove newline at end of file 2018-05-18 16:07:02 +02:00
xdp_umem.c xsk: proper AF_XDP socket teardown ordering 2018-10-08 10:09:22 +02:00
xdp_umem.h xsk: fix bug when trying to use both copy and zero-copy on one queue id 2018-10-05 09:31:00 +02:00
xsk.c xsk: simplify AF_XDP socket teardown 2018-12-19 21:45:17 +01:00
xsk_queue.c net: xsk: add a simple buffer reuse queue 2018-09-25 13:13:15 -07:00
xsk_queue.h net: xsk: add a simple buffer reuse queue 2018-09-25 13:13:15 -07:00