Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Thu, 12 Nov 2015 17:35:58 +0100 > Drivers like vxlan use the recently introduced > udp_tunnel_xmit_skb/udp_tunnel6_xmit_skb APIs. udp_tunnel6_xmit_skb > makes use of ip6tunnel_xmit, and ip6tunnel_xmit, after sending the > packet, updates the

Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-16 Thread Jason A. Donenfeld
On Mon, Nov 16, 2015 at 8:17 PM, David Miller wrote: > So another fix could have been to do local_bh_disable() in the > udp_tunnel6_xmit_skb() helper. This would have fixed one problem, but everywhere udp_tunnel_xmit_skb() (4, not 6) is called, iptunnel_xmit_stats is called

Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-16 Thread Hannes Frederic Sowa
On Thu, Nov 12, 2015, at 17:35, Jason A. Donenfeld wrote: > Drivers like vxlan use the recently introduced > udp_tunnel_xmit_skb/udp_tunnel6_xmit_skb APIs. udp_tunnel6_xmit_skb > makes use of ip6tunnel_xmit, and ip6tunnel_xmit, after sending the > packet, updates the struct stats using the usual >

[PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-12 Thread Jason A. Donenfeld
Drivers like vxlan use the recently introduced udp_tunnel_xmit_skb/udp_tunnel6_xmit_skb APIs. udp_tunnel6_xmit_skb makes use of ip6tunnel_xmit, and ip6tunnel_xmit, after sending the packet, updates the struct stats using the usual u64_stats_update_begin/end calls on this_cpu_ptr(dev->tstats).