diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2016-02-19 22:47:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 15:14:01 -0800 |
commit | dcf24f77e4b4acac0f82f0b435541360a5a515ab (patch) | |
tree | cfb79a698216c08950de7aa935a839e7b1cc7265 /drivers/staging/octeon/ethernet.c | |
parent | a89e28e3e20f141b777d544b9342be6864dd1577 (diff) |
staging: octeon: drop atomic usage from rx counters
We have only one NAPI poll running at a time, so virtual port rx counters
can be updated normally.
Update of rx_dropped can still race with the gathering of statistics,
but full accuracy is not required there.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet.c')
-rw-r--r-- | drivers/staging/octeon/ethernet.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 8d239e23e5c7..9fa552f64a03 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -226,18 +226,7 @@ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev) priv->stats.multicast += rx_status.multicast_packets; priv->stats.rx_crc_errors += rx_status.inb_errors; priv->stats.rx_frame_errors += rx_status.fcs_align_err_packets; - - /* - * The drop counter must be incremented atomically - * since the RX tasklet also increments it. - */ -#ifdef CONFIG_64BIT - atomic64_add(rx_status.dropped_packets, - (atomic64_t *)&priv->stats.rx_dropped); -#else - atomic_add(rx_status.dropped_packets, - (atomic_t *)&priv->stats.rx_dropped); -#endif + priv->stats.rx_dropped += rx_status.dropped_packets; } return &priv->stats; |