netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	open list <linux-kernel@vger.kernel.org>,
	edumazet@google.com,
	"open list:Hyper-V CORE AND DRIVERS"
	<devel@linuxdriverproject.org>,
	davem@davemloft.net
Subject: [PATCH net 6/7] netvsc: Initialize 64-bit stats seqcount
Date: Tue,  1 Aug 2017 12:11:12 -0700	[thread overview]
Message-ID: <20170801191113.8754-8-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170801191113.8754-1-f.fainelli@gmail.com>

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

  parent reply	other threads:[~2017-08-01 19:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 19:11 [PATCH net 0/7] drivers: net: Fix 64-bit statistics seqcount init Florian Fainelli
2017-08-01 19:11 ` [PATCH net 1/7] b44: Initialize 64-bit stats seqcount Florian Fainelli
2017-08-01 20:41   ` Michael Chan
2017-08-01 19:11 ` [PATCH net 2/7] i40e: Initialize 64-bit statistics TX ring seqcount Florian Fainelli
2017-08-01 19:11 ` [PATCH net 3/7] ixgbe: Initialize 64-bit stats seqcounts Florian Fainelli
2017-08-01 19:11 ` [PATCH net 4/7] nfp: Initialize RX and TX ring " Florian Fainelli
2017-08-01 20:04   ` Simon Horman
2017-08-01 19:11 ` [PATCH net 5/7] gtp: Initialize 64-bit per-cpu stats correctly Florian Fainelli
2017-08-02 10:46   ` Pablo Neira Ayuso
2017-08-01 19:11 ` [PATCH net 6/7] netvsc: Initialize 64-bit stats seqcount Florian Fainelli
2017-08-01 19:11 ` Florian Fainelli [this message]
2017-08-02  2:42   ` Stephen Hemminger
2017-08-01 19:11 ` [PATCH net 7/7] ipvlan: Fix 64-bit statistics seqcount initialization Florian Fainelli
2017-08-02  3:06 ` [PATCH net 0/7] drivers: net: Fix 64-bit statistics seqcount init David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170801191113.8754-8-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devel@linuxdriverproject.org \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).