Skip to contentSkip to conversation

ipvs: call skb_sender_cpu_clear

PATCH In review Julian Anastasov 2 participants 5 messages Jul 9, 2015 – Jul 10, 2015

Subsystems (3)
lore
Share & tools
lore

Julian Anastasov

author maintainer
#0 lore raw

PATCH 1/1 ipvs: call skb_sender_cpu_clear

Reset XPS's sender_cpu on forwarding.

---
 net/netfilter/ipvs/ip_vs_xmit.c | 6 ++++++
 1 file changed, 6 insertions(+)

I see similar patches for other forwarding places...
that is the reason for this patch.

net/netfilter/ipvs/ip_vs_xmit.c +6 -0
index 34dc142..258a0b0 100644
@@ -529,6 +529,8 @@ static inline int ip_vs_tunnel_xmit_prepare(struct sk_buff *skb,
 	if (ret == NF_ACCEPT) {
 		nf_reset(skb);
 		skb_forward_csum(skb);
+		if (!skb->sk)
+			skb_sender_cpu_clear(skb);
 	}
 	return ret;
 }
@@ -569,6 +571,8 @@ static inline int ip_vs_nat_send_or_cont(int pf, struct sk_buff *skb,
 
 	if (!local) {
 		skb_forward_csum(skb);
+		if (!skb->sk)
+			skb_sender_cpu_clear(skb);
 		NF_HOOK(pf, NF_INET_LOCAL_OUT, NULL, skb,
 			NULL, skb_dst(skb)->dev, dst_output_sk);
 	} else
@@ -589,6 +593,8 @@ static inline int ip_vs_send_or_cont(int pf, struct sk_buff *skb,
 	if (!local) {
 		ip_vs_drop_early_demux_sk(skb);
 		skb_forward_csum(skb);
+		if (!skb->sk)
+			skb_sender_cpu_clear(skb);
 		NF_HOOK(pf, NF_INET_LOCAL_OUT, NULL, skb,
 			NULL, skb_dst(skb)->dev, dst_output_sk);
 	} else
Signature · 1 line
1.9.3
maintainer
#1 lore raw
Quoted 9 lines · Julian Anastasov

Reset XPS's sender_cpu on forwarding.

---
 net/netfilter/ipvs/ip_vs_xmit.c | 6 ++++++
 1 file changed, 6 insertions(+)

I see similar patches for other forwarding places...
that is the reason for this patch.

Am I right in thinking this is not a bug fix?

author maintainer
#2 lore raw

Hello,

Quoted 8 lines · Simon Horman
Quoted 7 lines · Julian Anastasov

Reset XPS's sender_cpu on forwarding.

---
 net/netfilter/ipvs/ip_vs_xmit.c | 6 ++++++
 1 file changed, 6 insertions(+)
Quoted 4 lines
Quoted 2 lines

I see similar patches for other forwarding places...
that is the reason for this patch.

Am I right in thinking this is not a bug fix?

I saw Eric fixes for sender_cpu. Here are
some references:

- from today @netdev, targets net tree:
bridge: fix potential crash in __netdev_pick_tx()

- this commit explains the problem:
commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")

Regards

--
Julian Anastasov <[email protected]>

maintainer
#3 lore raw
Quoted 18 lines · Julian Anastasov

Hello,

Quoted 8 lines · Simon Horman
Quoted 7 lines · Julian Anastasov

Reset XPS's sender_cpu on forwarding.

---
 net/netfilter/ipvs/ip_vs_xmit.c | 6 ++++++
 1 file changed, 6 insertions(+)
Quoted 4 lines
Quoted 2 lines

I see similar patches for other forwarding places...
that is the reason for this patch.

Am I right in thinking this is not a bug fix?

Quoted 8 lines

I saw Eric fixes for sender_cpu. Here are
some references:

- from today @netdev, targets net tree:
bridge: fix potential crash in __netdev_pick_tx()

- this commit explains the problem:
commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")

Thanks, I have queued this up in the ipvs tree with

Fixes 2bd82484bb4c ("xps: fix xps for stacked devices")
author maintainer
#4 lore raw

Hello,

Quoted 8 lines · Simon Horman
Quoted 7 lines · Julian Anastasov

I saw Eric fixes for sender_cpu. Here are
some references:

- from today @netdev, targets net tree:
bridge: fix potential crash in __netdev_pick_tx()

Quoted 6 lines
Quoted 2 lines

- this commit explains the problem:
commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")

Thanks, I have queued this up in the ipvs tree with

Fixes 2bd82484bb4c ("xps: fix xps for stacked devices")

Thanks, that looks correct.

Regards

--
Julian Anastasov <[email protected]>