netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bpf: clear sender_cpu before xmit
@ 2015-10-07  3:46 Alexei Starovoitov
  2015-10-07  8:17 ` Daniel Borkmann
  2015-10-08 12:06 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2015-10-07  3:46 UTC (permalink / raw)
  To: David S. Miller; +Cc: Daniel Borkmann, Eric Dumazet, netdev

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")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
---
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(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index 87b78ef0c3d4..bb18c3680001 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -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);
 }
 
-- 
1.7.9.5

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

* Re: [PATCH net] bpf: clear sender_cpu before xmit
  2015-10-07  3:46 [PATCH net] bpf: clear sender_cpu before xmit Alexei Starovoitov
@ 2015-10-07  8:17 ` Daniel Borkmann
  2015-10-07 15:44   ` Alexei Starovoitov
  2015-10-08 12:06 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2015-10-07  8:17 UTC (permalink / raw)
  To: Alexei Starovoitov, David S. Miller; +Cc: Eric Dumazet, netdev

On 10/07/2015 05:46 AM, Alexei Starovoitov wrote:
> 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")
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

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

Cheers,
Daniel

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

* Re: [PATCH net] bpf: clear sender_cpu before xmit
  2015-10-07  8:17 ` Daniel Borkmann
@ 2015-10-07 15:44   ` Alexei Starovoitov
  2015-10-07 16:09     ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2015-10-07 15:44 UTC (permalink / raw)
  To: Daniel Borkmann, David S. Miller; +Cc: Eric Dumazet, netdev

On 10/7/15 1:17 AM, Daniel Borkmann wrote:
> On 10/07/2015 05:46 AM, Alexei Starovoitov wrote:
>> 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")
>> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
>
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>
> 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.

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

* Re: [PATCH net] bpf: clear sender_cpu before xmit
  2015-10-07 15:44   ` Alexei Starovoitov
@ 2015-10-07 16:09     ` Daniel Borkmann
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2015-10-07 16:09 UTC (permalink / raw)
  To: Alexei Starovoitov, David S. Miller; +Cc: Eric Dumazet, netdev

On 10/07/2015 05:44 PM, Alexei Starovoitov wrote:
> On 10/7/15 1:17 AM, Daniel Borkmann wrote:
>> On 10/07/2015 05:46 AM, Alexei Starovoitov wrote:
>>> 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")
>>> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
>>
>> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>>
>> 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. :)

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

* Re: [PATCH net] bpf: clear sender_cpu before xmit
  2015-10-07  3:46 [PATCH net] bpf: clear sender_cpu before xmit Alexei Starovoitov
  2015-10-07  8:17 ` Daniel Borkmann
@ 2015-10-08 12:06 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2015-10-08 12:06 UTC (permalink / raw)
  To: ast; +Cc: daniel, edumazet, netdev

From: Alexei Starovoitov <ast@plumgrid.com>
Date: Tue,  6 Oct 2015 20:46:07 -0700

> 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")
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>

Applied and queued up for -stable.

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

end of thread, other threads:[~2015-10-08 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07  3:46 [PATCH net] bpf: clear sender_cpu before xmit Alexei Starovoitov
2015-10-07  8:17 ` Daniel Borkmann
2015-10-07 15:44   ` Alexei Starovoitov
2015-10-07 16:09     ` Daniel Borkmann
2015-10-08 12:06 ` 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).