* [PATCH net-next,1/1] hv_netvsc: change member name of struct netvsc_stats
@ 2015-05-15 9:33 ` Simon Xiao
0 siblings, 0 replies; 3+ messages in thread
From: Simon Xiao @ 2015-05-15 9:33 UTC (permalink / raw)
To: kys, haiyangz, devel, netdev, linux-kernel; +Cc: Simon Xiao
Currently the struct netvsc_stats has a member s_sync
of type u64_stats_sync.
This definition will break kernel build as the macro
netdev_alloc_pcpu_stats requires this member name to be syncp.
(see netdev_alloc_pcpu_stats definition in ./include/linux/netdevice.h)
This patch changes netvsc_stats's member name from s_sync to syncp to fix
the build break.
Signed-off-by: Simon Xiao <sixiao@microsoft.com>
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers/net/hyperv/netvsc_drv.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 5a92b36..ddcc7f8 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -614,7 +614,7 @@ struct multi_send_data {
struct netvsc_stats {
u64 packets;
u64 bytes;
- struct u64_stats_sync s_sync;
+ struct u64_stats_sync syncp;
};
/* The context of the netvsc device */
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 0c858724..d9c88bc 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -580,10 +580,10 @@ do_send:
drop:
if (ret == 0) {
- u64_stats_update_begin(&tx_stats->s_sync);
+ u64_stats_update_begin(&tx_stats->syncp);
tx_stats->packets++;
tx_stats->bytes += skb_length;
- u64_stats_update_end(&tx_stats->s_sync);
+ u64_stats_update_end(&tx_stats->syncp);
} else {
if (ret != -EAGAIN) {
dev_kfree_skb_any(skb);
@@ -692,10 +692,10 @@ int netvsc_recv_callback(struct hv_device *device_obj,
skb_record_rx_queue(skb, packet->channel->
offermsg.offer.sub_channel_index);
- u64_stats_update_begin(&rx_stats->s_sync);
+ u64_stats_update_begin(&rx_stats->syncp);
rx_stats->packets++;
rx_stats->bytes += packet->total_data_buflen;
- u64_stats_update_end(&rx_stats->s_sync);
+ u64_stats_update_end(&rx_stats->syncp);
/*
* Pass the skb back up. Network stack will deallocate the skb when it
@@ -776,16 +776,16 @@ static struct rtnl_link_stats64 *netvsc_get_stats64(struct net_device *net,
unsigned int start;
do {
- start = u64_stats_fetch_begin_irq(&tx_stats->s_sync);
+ start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
tx_packets = tx_stats->packets;
tx_bytes = tx_stats->bytes;
- } while (u64_stats_fetch_retry_irq(&tx_stats->s_sync, start));
+ } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
do {
- start = u64_stats_fetch_begin_irq(&rx_stats->s_sync);
+ start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
rx_packets = rx_stats->packets;
rx_bytes = rx_stats->bytes;
- } while (u64_stats_fetch_retry_irq(&rx_stats->s_sync, start));
+ } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
t->tx_bytes += tx_bytes;
t->tx_packets += tx_packets;
--
1.8.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH net-next, 1/1] hv_netvsc: change member name of struct netvsc_stats
@ 2015-05-15 9:33 ` Simon Xiao
0 siblings, 0 replies; 3+ messages in thread
From: Simon Xiao @ 2015-05-15 9:33 UTC (permalink / raw)
To: kys, haiyangz, devel, netdev, linux-kernel; +Cc: Simon Xiao
Currently the struct netvsc_stats has a member s_sync
of type u64_stats_sync.
This definition will break kernel build as the macro
netdev_alloc_pcpu_stats requires this member name to be syncp.
(see netdev_alloc_pcpu_stats definition in ./include/linux/netdevice.h)
This patch changes netvsc_stats's member name from s_sync to syncp to fix
the build break.
Signed-off-by: Simon Xiao <sixiao@microsoft.com>
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers/net/hyperv/netvsc_drv.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 5a92b36..ddcc7f8 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -614,7 +614,7 @@ struct multi_send_data {
struct netvsc_stats {
u64 packets;
u64 bytes;
- struct u64_stats_sync s_sync;
+ struct u64_stats_sync syncp;
};
/* The context of the netvsc device */
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 0c858724..d9c88bc 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -580,10 +580,10 @@ do_send:
drop:
if (ret == 0) {
- u64_stats_update_begin(&tx_stats->s_sync);
+ u64_stats_update_begin(&tx_stats->syncp);
tx_stats->packets++;
tx_stats->bytes += skb_length;
- u64_stats_update_end(&tx_stats->s_sync);
+ u64_stats_update_end(&tx_stats->syncp);
} else {
if (ret != -EAGAIN) {
dev_kfree_skb_any(skb);
@@ -692,10 +692,10 @@ int netvsc_recv_callback(struct hv_device *device_obj,
skb_record_rx_queue(skb, packet->channel->
offermsg.offer.sub_channel_index);
- u64_stats_update_begin(&rx_stats->s_sync);
+ u64_stats_update_begin(&rx_stats->syncp);
rx_stats->packets++;
rx_stats->bytes += packet->total_data_buflen;
- u64_stats_update_end(&rx_stats->s_sync);
+ u64_stats_update_end(&rx_stats->syncp);
/*
* Pass the skb back up. Network stack will deallocate the skb when it
@@ -776,16 +776,16 @@ static struct rtnl_link_stats64 *netvsc_get_stats64(struct net_device *net,
unsigned int start;
do {
- start = u64_stats_fetch_begin_irq(&tx_stats->s_sync);
+ start = u64_stats_fetch_begin_irq(&tx_stats->syncp);
tx_packets = tx_stats->packets;
tx_bytes = tx_stats->bytes;
- } while (u64_stats_fetch_retry_irq(&tx_stats->s_sync, start));
+ } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start));
do {
- start = u64_stats_fetch_begin_irq(&rx_stats->s_sync);
+ start = u64_stats_fetch_begin_irq(&rx_stats->syncp);
rx_packets = rx_stats->packets;
rx_bytes = rx_stats->bytes;
- } while (u64_stats_fetch_retry_irq(&rx_stats->s_sync, start));
+ } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start));
t->tx_bytes += tx_bytes;
t->tx_packets += tx_packets;
--
1.8.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next,1/1] hv_netvsc: change member name of struct netvsc_stats
2015-05-15 9:33 ` [PATCH net-next, 1/1] " Simon Xiao
(?)
@ 2015-05-18 3:38 ` David Miller
-1 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2015-05-18 3:38 UTC (permalink / raw)
To: sixiao; +Cc: kys, haiyangz, devel, netdev, linux-kernel
From: Simon Xiao <sixiao@microsoft.com>
Date: Fri, 15 May 2015 02:33:03 -0700
> Currently the struct netvsc_stats has a member s_sync
> of type u64_stats_sync.
> This definition will break kernel build as the macro
> netdev_alloc_pcpu_stats requires this member name to be syncp.
> (see netdev_alloc_pcpu_stats definition in ./include/linux/netdevice.h)
>
> This patch changes netvsc_stats's member name from s_sync to syncp to fix
> the build break.
>
> Signed-off-by: Simon Xiao <sixiao@microsoft.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-18 3:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 9:33 [PATCH net-next,1/1] hv_netvsc: change member name of struct netvsc_stats Simon Xiao
2015-05-15 9:33 ` [PATCH net-next, 1/1] " Simon Xiao
2015-05-18 3:38 ` [PATCH net-next,1/1] " 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.