]> git.baikalelectronics.ru Git - kernel.git/commit
xdp: Allow registering memory model without rxq reference
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 3 Jan 2022 15:08:06 +0000 (16:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Jan 2022 03:46:32 +0000 (19:46 -0800)
commit0fe64b9ac540b813909ceb5e550129c91a081340
tree5c825a29daaa3ba66d3c1a992da27f4f8ac77f18
parenta9050035da745c6fdffa072dd31b9b424bd54fb8
xdp: Allow registering memory model without rxq reference

The functions that register an XDP memory model take a struct xdp_rxq as
parameter, but the RXQ is not actually used for anything other than pulling
out the struct xdp_mem_info that it embeds. So refactor the register
functions and export variants that just take a pointer to the xdp_mem_info.

This is in preparation for enabling XDP_REDIRECT in bpf_prog_run(), using a
page_pool instance that is not connected to any network device.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220103150812.87914-2-toke@redhat.com
include/net/xdp.h
net/core/xdp.c