net: introduce netdev_alloc_pcpu_stats() for drivers
[deliverable/linux.git] / net / ipv6 / ip6_gre.c
index f3ffb43f59c08634187f939db338413dd9a5514f..c98338b81d30779f9410ea413eb359d72a7dd76e 100644 (file)
@@ -1454,7 +1454,6 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
 static int ip6gre_tap_init(struct net_device *dev)
 {
        struct ip6_tnl *tunnel;
-       int i;
 
        tunnel = netdev_priv(dev);
 
@@ -1464,16 +1463,10 @@ static int ip6gre_tap_init(struct net_device *dev)
 
        ip6gre_tnl_link_config(tunnel, 1);
 
-       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 *ip6gre_tap_stats;
-               ip6gre_tap_stats = per_cpu_ptr(dev->tstats, i);
-               u64_stats_init(&ip6gre_tap_stats->syncp);
-       }
-
        return 0;
 }
 
This page took 0.029097 seconds and 5 git commands to generate.