summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_nic.c
diff options
context:
space:
mode:
authorFaisal Latif <faisal.latif@intel.com>2010-02-12 19:55:03 +0000
committerRoland Dreier <rolandd@cisco.com>2010-02-19 11:38:14 -0800
commit6e10d2e407542605b2bdca43dc88c35fa8bd24b2 (patch)
treec79261a233ea24d7b3cee6fb011a6b8f5243a8e4 /drivers/infiniband/hw/nes/nes_nic.c
parent676ad585531e965416fd958747894541dabcec96 (diff)
downloadlinux-6e10d2e407542605b2bdca43dc88c35fa8bd24b2.tar.bz2
RDMA/nes: Use atomic counters for CM listener create and destroy
After running long iterative MPI tests, sometimes ethtool reports a "CM Destroy Listener" count more than the "CM Create Listener" count. This inconsistency is fixed by making counter variables atomic. Signed-off-by: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_nic.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index ab1102780186..3d550dc77d0d 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -1230,8 +1230,8 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = cm_packets_received;
target_stat_values[++index] = cm_packets_dropped;
target_stat_values[++index] = cm_packets_retrans;
- target_stat_values[++index] = cm_listens_created;
- target_stat_values[++index] = cm_listens_destroyed;
+ target_stat_values[++index] = atomic_read(&cm_listens_created);
+ target_stat_values[++index] = atomic_read(&cm_listens_destroyed);
target_stat_values[++index] = cm_backlog_drops;
target_stat_values[++index] = atomic_read(&cm_loopbacks);
target_stat_values[++index] = atomic_read(&cm_nodes_created);