* [PATCH FIX net-next v1] net-forcedeth: fix possible stats inaccuracies on 32b hosts
[not found] <cover.1321558587.git.david.decotigny@google.com>
@ 2011-11-17 19:38 ` David Decotigny
2011-11-17 20:08 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: David Decotigny @ 2011-11-17 19:38 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: David S. Miller, Eric Dumazet, Ian Campbell, Rick Jones,
David Decotigny
The software stats are updated from BH, this change ensures that 32b
UP hosts use appropriate protection.
Tested:
- HW/SW stats consistent with pktgen (in particular tx=rx)
- HW/SW stats consistent when tx/rx offloads disabled
- no problem with+without lockdep (SMP 16-way)
Signed-off-by: David Decotigny <david.decotigny@google.com>
---
drivers/net/ethernet/nvidia/forcedeth.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 0d8d5c0..4990534 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -1756,19 +1756,19 @@ nv_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage)
/* software stats */
do {
- syncp_start = u64_stats_fetch_begin(&np->swstats_rx_syncp);
+ syncp_start = u64_stats_fetch_begin_bh(&np->swstats_rx_syncp);
storage->rx_packets = np->stat_rx_packets;
storage->rx_bytes = np->stat_rx_bytes;
storage->rx_dropped = np->stat_rx_dropped;
storage->rx_missed_errors = np->stat_rx_missed_errors;
- } while (u64_stats_fetch_retry(&np->swstats_rx_syncp, syncp_start));
+ } while (u64_stats_fetch_retry_bh(&np->swstats_rx_syncp, syncp_start));
do {
- syncp_start = u64_stats_fetch_begin(&np->swstats_tx_syncp);
+ syncp_start = u64_stats_fetch_begin_bh(&np->swstats_tx_syncp);
storage->tx_packets = np->stat_tx_packets;
storage->tx_bytes = np->stat_tx_bytes;
storage->tx_dropped = np->stat_tx_dropped;
- } while (u64_stats_fetch_retry(&np->swstats_tx_syncp, syncp_start));
+ } while (u64_stats_fetch_retry_bh(&np->swstats_tx_syncp, syncp_start));
/* If the nic supports hw counters then retrieve latest values */
if (np->driver_data & DEV_HAS_STATISTICS_V123) {
--
1.7.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH FIX net-next v1] net-forcedeth: fix possible stats inaccuracies on 32b hosts
2011-11-17 19:38 ` [PATCH FIX net-next v1] net-forcedeth: fix possible stats inaccuracies on 32b hosts David Decotigny
@ 2011-11-17 20:08 ` Eric Dumazet
2011-11-18 7:09 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-11-17 20:08 UTC (permalink / raw)
To: David Decotigny
Cc: netdev, linux-kernel, David S. Miller, Ian Campbell, Rick Jones
Le jeudi 17 novembre 2011 à 11:38 -0800, David Decotigny a écrit :
> The software stats are updated from BH, this change ensures that 32b
> UP hosts use appropriate protection.
>
> Tested:
> - HW/SW stats consistent with pktgen (in particular tx=rx)
> - HW/SW stats consistent when tx/rx offloads disabled
> - no problem with+without lockdep (SMP 16-way)
>
>
>
> Signed-off-by: David Decotigny <david.decotigny@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH FIX net-next v1] net-forcedeth: fix possible stats inaccuracies on 32b hosts
2011-11-17 20:08 ` Eric Dumazet
@ 2011-11-18 7:09 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-11-18 7:09 UTC (permalink / raw)
To: eric.dumazet
Cc: david.decotigny, netdev, linux-kernel, ian.campbell, rick.jones2
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 17 Nov 2011 21:08:15 +0100
> Le jeudi 17 novembre 2011 à 11:38 -0800, David Decotigny a écrit :
>> The software stats are updated from BH, this change ensures that 32b
>> UP hosts use appropriate protection.
>>
>> Tested:
>> - HW/SW stats consistent with pktgen (in particular tx=rx)
>> - HW/SW stats consistent when tx/rx offloads disabled
>> - no problem with+without lockdep (SMP 16-way)
>>
>>
>>
>> Signed-off-by: David Decotigny <david.decotigny@google.com>
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-18 7:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1321558587.git.david.decotigny@google.com>
2011-11-17 19:38 ` [PATCH FIX net-next v1] net-forcedeth: fix possible stats inaccuracies on 32b hosts David Decotigny
2011-11-17 20:08 ` Eric Dumazet
2011-11-18 7:09 ` David Miller
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).