Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701354 > unrolled thread

[PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2017-08-01 21:20 +0200
Last post2017-08-01 22:10 +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.


Contents

  [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts Florian Fainelli <f.fainelli@gmail.com> - 2017-08-01 21:20 +0200
    Re: [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats  seqcounts Simon Horman <simon.horman@netronome.com> - 2017-08-01 22:10 +0200

#1701354 — [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-08-01 21:20 +0200
Subject[PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts
Message-ID<u9KRY-82o-13@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.

Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 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

[toc] | [next] | [standalone]


#1701421 — Re: [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts

FromSimon Horman <simon.horman@netronome.com>
Date2017-08-01 22:10 +0200
SubjectRe: [PATCH net 4/7] nfp: Initialize RX and TX ring 64-bit stats seqcounts
Message-ID<u9LEl-6p-13@gated-at.bofh.it>
In reply to#1701354
On Tue, Aug 01, 2017 at 12:11:09PM -0700, Florian Fainelli 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.
> 
> Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Reviewed-by: Simon Horman <simon.horman@netronome.com>

FYI, Jakub is on leave this week.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web