Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbdHATLj (ORCPT ); Tue, 1 Aug 2017 15:11:39 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36980 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbdHATLg (ORCPT ); Tue, 1 Aug 2017 15:11:36 -0400 From: Florian Fainelli To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, Florian Fainelli , Jakub Kicinski , Simon Horman , Daniel Borkmann , oss-drivers@netronome.com (open list:NETRONOME ETHERNET DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts Date: Tue, 1 Aug 2017 12:11:09 -0700 Message-Id: <20170801191113.8754-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170801191113.8754-1-f.fainelli@gmail.com> References: <20170801191113.8754-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 32 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: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 18750ff0ede6..4631ca8b8eb2 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -513,6 +513,7 @@ nfp_net_tx_ring_init(struct nfp_net_tx_ring *tx_ring, tx_ring->idx = idx; tx_ring->r_vec = r_vec; tx_ring->is_xdp = is_xdp; + u64_stats_init(&tx_ring->r_vec->tx_sync); tx_ring->qcidx = tx_ring->idx * nn->stride_tx; tx_ring->qcp_q = nn->tx_bar + NFP_QCP_QUEUE_OFF(tx_ring->qcidx); @@ -532,6 +533,7 @@ nfp_net_rx_ring_init(struct nfp_net_rx_ring *rx_ring, rx_ring->idx = idx; rx_ring->r_vec = r_vec; + u64_stats_init(&rx_ring->r_vec->rx_sync); rx_ring->fl_qcidx = rx_ring->idx * nn->stride_rx; rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx); -- 2.9.3