All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch net-next] openvswitch: rename ->sync to ->syncp
@ 2014-02-14 23:10 Cong Wang
  2014-02-14 23:46 ` Flavio Leitner
  2014-02-15  7:06 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2014-02-14 23:10 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Cong Wang

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>

---
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 3a95406..36f8872c 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -256,10 +256,10 @@ 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)++;
 	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 = {
@@ -295,9 +295,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;
 }
@@ -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);
 
 		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 6be9fbb..0531738 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -55,7 +55,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;
 };
 
 /**

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch net-next] openvswitch: rename ->sync to ->syncp
  2014-02-14 23:10 [Patch net-next] openvswitch: rename ->sync to ->syncp Cong Wang
@ 2014-02-14 23:46 ` Flavio Leitner
  2014-02-15  7:06 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Flavio Leitner @ 2014-02-14 23:46 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, David S. Miller

On Fri, Feb 14, 2014 at 03:10:46PM -0800, Cong Wang wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch net-next] openvswitch: rename ->sync to ->syncp
  2014-02-14 23:10 [Patch net-next] openvswitch: rename ->sync to ->syncp Cong Wang
  2014-02-14 23:46 ` Flavio Leitner
@ 2014-02-15  7:06 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-02-15  7:06 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: netdev

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri, 14 Feb 2014 15:10:46 -0800

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-15  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 23:10 [Patch net-next] openvswitch: rename ->sync to ->syncp Cong Wang
2014-02-14 23:46 ` Flavio Leitner
2014-02-15  7:06 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.