Skip to contentSkip to conversation

bpf: clear sender_cpu before xmit

PATCH In review Alexei Starovoitov 3 participants 5 messages Oct 7, 2015 – Oct 8, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: clear sender_cpu before xmit

Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding") the skb->sender_cpu needs to be cleared before xmit.

Fixes 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper")

---
That is similar to pending patches for xps:
http://patchwork.ozlabs.org/patch/526952/
and for act_mirred:
http://patchwork.ozlabs.org/patch/527066/

though Fixes tag is different, since bpf_clone_redirect() came in after commit 2bd82484bb4c ("xps: fix xps for stacked devices")

---
 net/core/filter.c |    1 +
 1 file changed, 1 insertion(+)
net/core/filter.c +1 -0
index 87b78ef0c3d4..bb18c3680001 100644
@@ -1415,6 +1415,7 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5)
 		return dev_forward_skb(dev, skb2);
 
 	skb2->dev = dev;
+	skb_sender_cpu_clear(skb2);
 	return dev_queue_xmit(skb2);
 }
 
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 11 lines · Daniel Borkmann
Quoted 6 lines · Alexei Starovoitov

Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared before xmit.

Fixes 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper")

There's one more, but for net-next, see my other email.

Of course. I left it for the morning, but you beat me to it.

maintainer
#3 lore raw
Quoted 6 lines · Alexei Starovoitov
Quoted 5 lines · Daniel Borkmann
Quoted 4 lines · Alexei Starovoitov

Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared before xmit.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Fixes 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper")

There's one more, but for net-next, see my other email.

Of course. I left it for the morning, but you beat me to it.

Ahh okay, fair enough. :)