]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: add umem completion queue support and mmap
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 2 May 2018 11:01:31 +0000 (13:01 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 May 2018 22:55:24 +0000 (15:55 -0700)
commitcdfbf9a4d15d5a7e57eea54c27fd32285ca33d14
treef455bf4955aec597ac177eb89dc60e21b55c9191
parent7980785a4a2fdb5d9c0b4eac0a57e1f4e040df87
xsk: add umem completion queue support and mmap

Here, we add another setsockopt for registered user memory (umem)
called XDP_UMEM_COMPLETION_QUEUE. Using this socket option, the
process can ask the kernel to allocate a queue (ring buffer) and also
mmap it (XDP_UMEM_PGOFF_COMPLETION_QUEUE) into the process.

The queue is used to explicitly pass ownership of umem frames from the
kernel to user process. This will be used by the TX path to tell user
space that a certain frame has been transmitted and user space can use
it for something else, if it wishes.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/if_xdp.h
net/xdp/xdp_umem.c
net/xdp/xdp_umem.h
net/xdp/xsk.c