Patchwork [net-next,RFC,8/8] veth: xdp_frames redirected into veth need to transfer xdp_mem_info

login
register
mail settings
Submitter Jesper Dangaard Brouer
Date Dec. 6, 2018, 11:26 p.m.
Message ID <154413876762.21735.5686011178439529039.stgit@firesoul>
Download mbox | patch
Permalink /patch/674821/
State New
Headers show

Comments

Jesper Dangaard Brouer - Dec. 6, 2018, 11:26 p.m.
XDP frames redirected into a veth device, that choose XDP_PASS end-up
creating an SKB from the xdp_frame.  The xdp_frame mem info need to be
transferred into the SKB.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 drivers/net/veth.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f412ea1cef18..925d300402ca 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -555,6 +555,7 @@  static struct sk_buff *veth_xdp_rcv_one(struct veth_rq *rq,
 		goto err;
 	}
 
+	skb->mem_info = frame->mem;
 	xdp_scrub_frame(frame);
 	skb->protocol = eth_type_trans(skb, rq->dev);
 err: