From c78f2386d5bd336b501687cf0221e14196d65e33 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Fri, 14 Feb 2014 15:10:46 -0800 Subject: [PATCH] openvswitch: rename ->sync to ->syncp 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 Fixes: 1c213bd24ad04f4430031 (net: introduce netdev_alloc_pcpu_stats() for drivers) Cc: David S. Miller Signed-off-by: Cong Wang Reviewed-by: Flavio Leitner Signed-off-by: David S. Miller Change-Id: I12536247d88850e64d4ef9b71a3ec4332aca32c2 --- net/openvswitch/datapath.c | 12 ++++++------ net/openvswitch/datapath.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 0efb131c541..47b7f796583 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -260,9 +260,9 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb) out: /* Update datapath statistics. */ - u64_stats_update_begin(&stats->sync); + u64_stats_update_begin(&stats->syncp); (*stats_counter)++; - u64_stats_update_end(&stats->sync); + u64_stats_update_end(&stats->syncp); } static struct genl_family dp_packet_genl_family = { @@ -305,9 +305,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; } @@ -816,9 +816,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_bh(&percpu_stats->sync); + start = u64_stats_fetch_begin_bh(&percpu_stats->syncp); local_stats = *percpu_stats; - } while (u64_stats_fetch_retry_bh(&percpu_stats->sync, start)); + } while (u64_stats_fetch_retry_bh(&percpu_stats->syncp, start)); stats->n_hit += local_stats.n_hit; stats->n_missed += local_stats.n_missed; diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 16b84069521..d22c0d24798 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h @@ -50,7 +50,7 @@ struct dp_stats_percpu { u64 n_hit; u64 n_missed; u64 n_lost; - struct u64_stats_sync sync; + struct u64_stats_sync syncp; }; /** -- 2.20.1