diff options
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index b0f705c2378f..dec9820bc182 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1978,19 +1978,11 @@ static int vxlan_init(struct net_device *dev) struct vxlan_dev *vxlan = netdev_priv(dev); struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); struct vxlan_sock *vs; - int i; - dev->tstats = alloc_percpu(struct pcpu_sw_netstats); + dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); if (!dev->tstats) return -ENOMEM; - for_each_possible_cpu(i) { - struct pcpu_sw_netstats *vxlan_stats; - vxlan_stats = per_cpu_ptr(dev->tstats, i); - u64_stats_init(&vxlan_stats->syncp); - } - - spin_lock(&vn->sock_lock); vs = vxlan_find_sock(dev_net(dev), vxlan->dst_port); if (vs) { |