Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701367 > unrolled thread
| Started by | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| First post | 2017-08-01 21:20 +0200 |
| Last post | 2017-08-02 04:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net 6/7] netvsc: Initialize 64-bit stats seqcount Florian Fainelli <f.fainelli@gmail.com> - 2017-08-01 21:20 +0200
Re: [PATCH net 6/7] netvsc: Initialize 64-bit stats seqcount Stephen Hemminger <stephen@networkplumber.org> - 2017-08-02 04:50 +0200
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-08-01 21:20 +0200 |
| Subject | [PATCH net 6/7] netvsc: Initialize 64-bit stats seqcount |
| Message-ID | <u9KRZ-82o-49@gated-at.bofh.it> |
On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a
lockdep splat indicating this seqcount is not correctly initialized, fix
that. In commit 6c80f3fc2398 ("netvsc: report per-channel stats in
ethtool statistics") netdev_alloc_pcpu_stats() was removed in favor of
open-coding the 64-bits statistics, except that u64_stats_init() was
missed.
Fixes: 6c80f3fc2398 ("netvsc: report per-channel stats in ethtool statistics")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/hyperv/netvsc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 0a9167dd72fb..96f90c75d1b7 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1302,6 +1302,8 @@ int netvsc_device_add(struct hv_device *device,
struct netvsc_channel *nvchan = &net_device->chan_table[i];
nvchan->channel = device->channel;
+ u64_stats_init(&nvchan->tx_stats.syncp);
+ u64_stats_init(&nvchan->rx_stats.syncp);
}
/* Enable NAPI handler before init callbacks */
--
2.9.3
[toc] | [next] | [standalone]
| From | Stephen Hemminger <stephen@networkplumber.org> |
|---|---|
| Date | 2017-08-02 04:50 +0200 |
| Message-ID | <u9RTr-3Xy-5@gated-at.bofh.it> |
| In reply to | #1701367 |
On Tue, 1 Aug 2017 12:11:12 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:
> On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a
> lockdep splat indicating this seqcount is not correctly initialized, fix
> that. In commit 6c80f3fc2398 ("netvsc: report per-channel stats in
> ethtool statistics") netdev_alloc_pcpu_stats() was removed in favor of
> open-coding the 64-bits statistics, except that u64_stats_init() was
> missed.
>
> Fixes: 6c80f3fc2398 ("netvsc: report per-channel stats in ethtool statistics")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/hyperv/netvsc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
> index 0a9167dd72fb..96f90c75d1b7 100644
> --- a/drivers/net/hyperv/netvsc.c
> +++ b/drivers/net/hyperv/netvsc.c
> @@ -1302,6 +1302,8 @@ int netvsc_device_add(struct hv_device *device,
> struct netvsc_channel *nvchan = &net_device->chan_table[i];
>
> nvchan->channel = device->channel;
> + u64_stats_init(&nvchan->tx_stats.syncp);
> + u64_stats_init(&nvchan->rx_stats.syncp);
> }
>
> /* Enable NAPI handler before init callbacks */
Looks good, thanks. 32 bit guests are still supported but rarely tested.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web