aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 2ef5b6219f3f..01ab64d5f9a4 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1884,11 +1884,19 @@ static int vxlan_init(struct net_device *dev)
1884 struct vxlan_dev *vxlan = netdev_priv(dev); 1884 struct vxlan_dev *vxlan = netdev_priv(dev);
1885 struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id); 1885 struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
1886 struct vxlan_sock *vs; 1886 struct vxlan_sock *vs;
1887 int i;
1887 1888
1888 dev->tstats = alloc_percpu(struct pcpu_tstats); 1889 dev->tstats = alloc_percpu(struct pcpu_tstats);
1889 if (!dev->tstats) 1890 if (!dev->tstats)
1890 return -ENOMEM; 1891 return -ENOMEM;
1891 1892
1893 for_each_possible_cpu(i) {
1894 struct pcpu_tstats *vxlan_stats;
1895 vxlan_stats = per_cpu_ptr(dev->tstats, i);
1896 u64_stats_init(&vxlan_stats->syncp);
1897 }
1898
1899
1892 spin_lock(&vn->sock_lock); 1900 spin_lock(&vn->sock_lock);
1893 vs = vxlan_find_sock(dev_net(dev), vxlan->dst_port); 1901 vs = vxlan_find_sock(dev_net(dev), vxlan->dst_port);
1894 if (vs) { 1902 if (vs) {