summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2022-03-11 10:14:19 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2022-03-17 20:33:52 +0100
commit718a18a0c8a67f97781e40bdef7cdd055c430996 (patch)
treeff61dd415a8a1ec5beb9073f6eebf32495f12516 /net/core
parent5142239a22219921a7863cf00c9ab853c00689d8 (diff)
veth: Rework veth_xdp_rcv_skb in order to accept non-linear skb
Introduce veth_convert_skb_to_xdp_buff routine in order to convert a non-linear skb into a xdp buffer. If the received skb is cloned or shared, veth_convert_skb_to_xdp_buff will copy it in a new skb composed by order-0 pages for the linear and the fragmented area. Moreover veth_convert_skb_to_xdp_buff guarantees we have enough headroom for xdp. This is a preliminary patch to allow attaching xdp programs with frags support on veth devices. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/8d228b106bc1903571afd1d77e797bffe9a5ea7c.1646989407.git.lorenzo@kernel.org
Diffstat (limited to 'net/core')
-rw-r--r--net/core/xdp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 361df312ee7f..b5f2d428d856 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -528,6 +528,7 @@ void xdp_return_buff(struct xdp_buff *xdp)
out:
__xdp_return(xdp->data, &xdp->rxq->mem, true, xdp);
}
+EXPORT_SYMBOL_GPL(xdp_return_buff);
/* Only called for MEM_TYPE_PAGE_POOL see xdp.h */
void __xdp_release_frame(void *data, struct xdp_mem_info *mem)