Commit df9d9fdf authored by WANG Cong's avatar WANG Cong Committed by David S. Miller

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: default avatarkbuild test robot <fengguang.wu@intel.com>
Fixes: 1c213bd2 (net: introduce netdev_alloc_pcpu_stats() for drivers)
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: default avatarFlavio Leitner <fbl@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73ac0cd4
...@@ -256,10 +256,10 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb) ...@@ -256,10 +256,10 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
out: out:
/* Update datapath statistics. */ /* Update datapath statistics. */
u64_stats_update_begin(&stats->sync); u64_stats_update_begin(&stats->syncp);
(*stats_counter)++; (*stats_counter)++;
stats->n_mask_hit += n_mask_hit; stats->n_mask_hit += n_mask_hit;
u64_stats_update_end(&stats->sync); u64_stats_update_end(&stats->syncp);
} }
static struct genl_family dp_packet_genl_family = { static struct genl_family dp_packet_genl_family = {
...@@ -295,9 +295,9 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb, ...@@ -295,9 +295,9 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
err: err:
stats = this_cpu_ptr(dp->stats_percpu); stats = this_cpu_ptr(dp->stats_percpu);
u64_stats_update_begin(&stats->sync); u64_stats_update_begin(&stats->syncp);
stats->n_lost++; stats->n_lost++;
u64_stats_update_end(&stats->sync); u64_stats_update_end(&stats->syncp);
return err; return err;
} }
...@@ -606,9 +606,9 @@ static void get_dp_stats(struct datapath *dp, struct ovs_dp_stats *stats, ...@@ -606,9 +606,9 @@ static void get_dp_stats(struct datapath *dp, struct ovs_dp_stats *stats,
percpu_stats = per_cpu_ptr(dp->stats_percpu, i); percpu_stats = per_cpu_ptr(dp->stats_percpu, i);
do { do {
start = u64_stats_fetch_begin_bh(&percpu_stats->sync); start = u64_stats_fetch_begin_bh(&percpu_stats->syncp);
local_stats = *percpu_stats; 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_hit += local_stats.n_hit;
stats->n_missed += local_stats.n_missed; stats->n_missed += local_stats.n_missed;
......
...@@ -55,7 +55,7 @@ struct dp_stats_percpu { ...@@ -55,7 +55,7 @@ struct dp_stats_percpu {
u64 n_missed; u64 n_missed;
u64 n_lost; u64 n_lost;
u64 n_mask_hit; u64 n_mask_hit;
struct u64_stats_sync sync; struct u64_stats_sync syncp;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment