projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ae1aff
)
tuntap: move XDP flushing out of tun_do_xdp()
author
Jason Wang
<jasowang@redhat.com>
Wed, 12 Sep 2018 03:17:05 +0000
(11:17 +0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 13 Sep 2018 16:25:40 +0000
(09:25 -0700)
This will allow adding batch flushing on top.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c
patch
|
blob
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index 14fe94098180ddcf4b75580e45c0e7aa0fbfd5f9..3ae539374f6bb1677c837edf30820d3a3bc31079 100644
(file)
--- a/
drivers/net/tun.c
+++ b/
drivers/net/tun.c
@@
-1660,7
+1660,6
@@
static int tun_xdp_act(struct tun_struct *tun, struct bpf_prog *xdp_prog,
switch (act) {
case XDP_REDIRECT:
err = xdp_do_redirect(tun->dev, xdp, xdp_prog);
- xdp_do_flush_map();
if (err)
return err;
break;
@@
-1749,6
+1748,8
@@
static struct sk_buff *tun_build_skb(struct tun_struct *tun,
err = tun_xdp_act(tun, xdp_prog, &xdp, act);
if (err < 0)
goto err_xdp;
+ if (err == XDP_REDIRECT)
+ xdp_do_flush_map();
if (err != XDP_PASS)
goto out;