aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2022-01-03 16:08:10 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-01-05 19:46:32 -0800
commit1372d34ccf6dd480332b2bcb2fd59a2b9a0df415 (patch)
tree8bbf0d70bbeb10765d30dd3e284dbbeab56ce584 /include/linux/filter.h
parentxdp: Move conversion to xdp_frame out of map functions (diff)
downloadlinux-dev-1372d34ccf6dd480332b2bcb2fd59a2b9a0df415.tar.xz
linux-dev-1372d34ccf6dd480332b2bcb2fd59a2b9a0df415.zip
xdp: Add xdp_do_redirect_frame() for pre-computed xdp_frames
Add an xdp_do_redirect_frame() variant which supports pre-computed xdp_frame structures. This will be used in bpf_prog_run() to avoid having to write to the xdp_frame structure when the XDP program doesn't modify the frame boundaries. 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-6-toke@redhat.com
Diffstat (limited to '')
-rw-r--r--include/linux/filter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 60eec80fa1d4..71fa57b88bfc 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -1019,6 +1019,10 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
int xdp_do_redirect(struct net_device *dev,
struct xdp_buff *xdp,
struct bpf_prog *prog);
+int xdp_do_redirect_frame(struct net_device *dev,
+ struct xdp_buff *xdp,
+ struct xdp_frame *xdpf,
+ struct bpf_prog *prog);
void xdp_do_flush(void);
/* The xdp_do_flush_map() helper has been renamed to drop the _map suffix, as