openvswitch: rename ->sync to ->syncp
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 12 Sep 2014 21:12:24 +0000 (14:12 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Fri, 12 Sep 2014 21:29:00 +0000 (14:29 -0700)
Openvswitch defines u64_stats_sync as ->sync rather than ->syncp,
so fails to compile with netdev_alloc_pcpu_stats(). So just rename it to ->syncp.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 1c213bd24ad04f4430031 (net: introduce netdev_alloc_pcpu_stats() for drivers)
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/datapath.c
datapath/datapath.h

index 965f889..ed9d7bd 100644 (file)
@@ -292,10 +292,10 @@ void ovs_dp_process_packet(struct sk_buff *skb)
 
 out:
        /* Update datapath statistics. */
-       u64_stats_update_begin(&stats->sync);
+       u64_stats_update_begin(&stats->syncp);
        (*stats_counter)++;
        stats->n_mask_hit += n_mask_hit;
-       u64_stats_update_end(&stats->sync);
+       u64_stats_update_end(&stats->syncp);
 }
 
 int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
@@ -323,9 +323,9 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
 err:
        stats = this_cpu_ptr(dp->stats_percpu);
 
-       u64_stats_update_begin(&stats->sync);
+       u64_stats_update_begin(&stats->syncp);
        stats->n_lost++;
-       u64_stats_update_end(&stats->sync);
+       u64_stats_update_end(&stats->syncp);
 
        return err;
 }
@@ -651,9 +651,9 @@ static void get_dp_stats(struct datapath *dp, struct ovs_dp_stats *stats,
                percpu_stats = per_cpu_ptr(dp->stats_percpu, i);
 
                do {
-                       start = u64_stats_fetch_begin_irq(&percpu_stats->sync);
+                       start = u64_stats_fetch_begin_irq(&percpu_stats->syncp);
                        local_stats = *percpu_stats;
-               } while (u64_stats_fetch_retry_irq(&percpu_stats->sync, start));
+               } while (u64_stats_fetch_retry_irq(&percpu_stats->syncp, start));
 
                stats->n_hit += local_stats.n_hit;
                stats->n_missed += local_stats.n_missed;
index c5d3c86..23d2c18 100644 (file)
@@ -57,7 +57,7 @@ struct dp_stats_percpu {
        u64 n_missed;
        u64 n_lost;
        u64 n_mask_hit;
-       struct u64_stats_sync sync;
+       struct u64_stats_sync syncp;
 };
 
 /**