summaryrefslogtreecommitdiff
path: root/include/net/xdp.h
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2021-01-12 21:26:12 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-01-21 01:10:35 +0300
commit97a0e1ea7b41c2db762c1258632f6ccc22719510 (patch)
tree9afe14e2d23751c32c32b57ce9ad8b8c2e2086d5 /include/net/xdp.h
parent09c02d553c49fa6965fe39e28355b62f6ad02792 (diff)
downloadlinux-97a0e1ea7b41c2db762c1258632f6ccc22719510.tar.xz
net, xdp: Introduce __xdp_build_skb_from_frame utility routine
Introduce __xdp_build_skb_from_frame utility routine to build the skb from xdp_frame. Rely on __xdp_build_skb_from_frame in cpumap code. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Link: https://lore.kernel.org/bpf/4f9f4c6b3dd3933770c617eb6689dbc0c6e25863.1610475660.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/net/xdp.h')
-rw-r--r--include/net/xdp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xdp.h b/include/net/xdp.h
index 0cf3976ce77c..689206dee6de 100644
--- a/include/net/xdp.h
+++ b/include/net/xdp.h
@@ -164,6 +164,9 @@ void xdp_warn(const char *msg, const char *func, const int line);
#define XDP_WARN(msg) xdp_warn(msg, __func__, __LINE__)
struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp);
+struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
+ struct sk_buff *skb,
+ struct net_device *dev);
static inline
void xdp_convert_frame_to_buff(struct xdp_frame *frame, struct xdp_buff *xdp)