summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2018-12-19 13:09:31 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-12-19 21:45:17 +0100
commite2ce3674883ecba2605370404208c9d4a07ae1c3 (patch)
treef902b59f4d749d997c415bfd998b76f3d65af2ba /tools/bpf
parent76c43ae84e3f455e0b460ed0c43799e018d09ee9 (diff)
downloadlinux-e2ce3674883ecba2605370404208c9d4a07ae1c3.tar.gz
linux-e2ce3674883ecba2605370404208c9d4a07ae1c3.tar.bz2
linux-e2ce3674883ecba2605370404208c9d4a07ae1c3.zip
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>
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions