netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bpf, skb_do_redirect: clear sender_cpu before xmit
@ 2015-10-07  8:16 Daniel Borkmann
  2015-10-07 15:46 ` Alexei Starovoitov
  2015-10-08 12:07 ` David Miller
  0 siblings, 2 replies; 14+ messages in thread
From: Daniel Borkmann @ 2015-10-07  8:16 UTC (permalink / raw)
  To: davem; +Cc: ast, edumazet, netdev, Daniel Borkmann

Similar to commit c29390c6dfee ("xps: must clear sender_cpu before
forwarding"), we also need to clear the skb->sender_cpu when moving
from RX to TX via skb_do_redirect() due to the shared location of
napi_id (used on RX) and sender_cpu (used on TX).

Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
 ( It's also needed here in the net-next commit 27b29f63058d. )

 net/core/filter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index da3e535..8f4603c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1462,6 +1462,7 @@ int skb_do_redirect(struct sk_buff *skb)
 		return dev_forward_skb(dev, skb);
 
 	skb->dev = dev;
+	skb_sender_cpu_clear(skb);
 	return dev_queue_xmit(skb);
 }
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-11-16 18:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07  8:16 [PATCH net-next] bpf, skb_do_redirect: clear sender_cpu before xmit Daniel Borkmann
2015-10-07 15:46 ` Alexei Starovoitov
2015-10-09  0:50   ` Devon H. O'Dell
2015-10-09  2:35     ` Alexei Starovoitov
2015-10-09 16:40       ` Devon H. O'Dell
2015-10-10  3:11         ` Alexei Starovoitov
2015-10-09 17:33       ` Daniel Borkmann
2015-10-10  3:19         ` Alexei Starovoitov
2015-10-10  4:38           ` Eric Dumazet
2015-10-10  4:55             ` Alexei Starovoitov
2015-10-10  4:56             ` Alexei Starovoitov
2015-10-10 17:12               ` Eric Dumazet
2015-11-16 18:07         ` Eric Dumazet
2015-10-08 12:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).