]> git.baikalelectronics.ru Git - kernel.git/commit
xdp: Move conversion to xdp_frame out of map functions
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 3 Jan 2022 15:08:09 +0000 (16:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Jan 2022 03:46:32 +0000 (19:46 -0800)
commitb796ad4af2adb71bd820ad44382766eb9e6be202
tree0de2ccc3ad0064fc8bc1828c8e1dda00225c24d4
parent8c7430305e6d3527320c9ee2ef6da74a68e33bd3
xdp: Move conversion to xdp_frame out of map functions

All map redirect functions except XSK maps convert xdp_buff to xdp_frame
before enqueueing it. So move this conversion of out the map functions
and into xdp_do_redirect(). This removes a bit of duplicated code, but more
importantly it makes it possible to support caller-allocated xdp_frame
structures, which will be added in a subsequent commit.

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-5-toke@redhat.com
include/linux/bpf.h
kernel/bpf/cpumap.c
kernel/bpf/devmap.c
net/core/filter.c