diff options
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 78df8f39e57c..0358c07f7669 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -1880,11 +1880,19 @@ static int vxlan_init(struct net_device *dev) | |||
1880 | struct vxlan_dev *vxlan = netdev_priv(dev); | 1880 | struct vxlan_dev *vxlan = netdev_priv(dev); |
1881 | struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); | 1881 | struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); |
1882 | struct vxlan_sock *vs; | 1882 | struct vxlan_sock *vs; |
1883 | int i; | ||
1883 | 1884 | ||
1884 | dev->tstats = alloc_percpu(struct pcpu_tstats); | 1885 | dev->tstats = alloc_percpu(struct pcpu_tstats); |
1885 | if (!dev->tstats) | 1886 | if (!dev->tstats) |
1886 | return -ENOMEM; | 1887 | return -ENOMEM; |
1887 | 1888 | ||
1889 | for_each_possible_cpu(i) { | ||
1890 | struct pcpu_tstats *vxlan_stats; | ||
1891 | vxlan_stats = per_cpu_ptr(dev->tstats, i); | ||
1892 | u64_stats_init(&vxlan_stats->syncp); | ||
1893 | } | ||
1894 | |||
1895 | |||
1888 | spin_lock(&vn->sock_lock); | 1896 | spin_lock(&vn->sock_lock); |
1889 | vs = vxlan_find_sock(dev_net(dev), vxlan->dst_port); | 1897 | vs = vxlan_find_sock(dev_net(dev), vxlan->dst_port); |
1890 | if (vs) { | 1898 | if (vs) { |