[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f514de2ba0218f57b8803bfc3dcacc14786ee2e8.1595503780.git.lorenzo@kernel.org>
Date: Thu, 23 Jul 2020 13:42:29 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: netdev@...r.kernel.org
Cc: bpf@...r.kernel.org, davem@...emloft.net, ast@...nel.org,
brouer@...hat.com, daniel@...earbox.net,
lorenzo.bianconi@...hat.com, echaudro@...hat.com,
sameehj@...zon.com, kuba@...nel.org
Subject: [RFC net-next 17/22] net: tun: initialize mb bit in xdp_buff to 0
Initialize multi-buffer bit (mb) to 0 in xdp_buff data structure.
This is a preliminary patch to enable xdp multi-buffer support.
Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
---
drivers/net/tun.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 7adeb91bd368..7007fc344460 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1674,6 +1674,7 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
xdp.data_end = xdp.data + len;
xdp.rxq = &tfile->xdp_rxq;
xdp.frame_sz = buflen;
+ xdp.mb = 0;
act = bpf_prog_run_xdp(xdp_prog, &xdp);
if (act == XDP_REDIRECT || act == XDP_TX) {
@@ -2421,6 +2422,7 @@ static int tun_xdp_one(struct tun_struct *tun,
xdp_set_data_meta_invalid(xdp);
xdp->rxq = &tfile->xdp_rxq;
xdp->frame_sz = buflen;
+ xdp->mb = 0;
act = bpf_prog_run_xdp(xdp_prog, xdp);
err = tun_xdp_act(tun, xdp_prog, xdp, act);
--
2.26.2
Powered by blists - more mailing lists