]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/vxlan.c
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / net / vxlan.c
index 78df8f39e57cec7e9280811005b4a417b45ff35d..0358c07f7669142034e089660425a8fdb88236e2 100644 (file)
@@ -1880,11 +1880,19 @@ 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_tstats);
        if (!dev->tstats)
                return -ENOMEM;
 
+       for_each_possible_cpu(i) {
+               struct pcpu_tstats *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) {