netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET
	DRIVERS), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH net 3/7] ixgbe: Initialize 64-bit stats seqcounts
Date: Tue,  1 Aug 2017 12:11:08 -0700	[thread overview]
Message-ID: <20170801191113.8754-4-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.

Fixes: 4197aa7bb818 ("ixgbevf: provide 64 bit statistics")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 084c53582793..032f8ac06357 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2988,6 +2988,8 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
 	if (!tx_ring->tx_buffer_info)
 		goto err;
 
+	u64_stats_init(&tx_ring->syncp);
+
 	/* round up to nearest 4K */
 	tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
 	tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -3046,6 +3048,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_ring *rx_ring)
 	if (!rx_ring->rx_buffer_info)
 		goto err;
 
+	u64_stats_init(&rx_ring->syncp);
+
 	/* Round up to nearest 4K */
 	rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
 	rx_ring->size = ALIGN(rx_ring->size, 4096);
-- 
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 ` Florian Fainelli [this message]
2017-08-01 19:11 ` [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts 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
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-4-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).