IB/rxe: Make counters thread safe
authorParav Pandit <parav@mellanox.com>
Fri, 14 Dec 2018 06:32:42 +0000 (00:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:37:46 +0000 (15:37 +0100)
commit94848ffd66c2ddcb725a296b71b5f8dbe2cbeaa2
tree4ecc75d69143cef8bb3fb636dabbea30130c1975
parent3a2dfdab05f913eb0cc3e4494d9e8d9d869c3611
IB/rxe: Make counters thread safe

[ Upstream commit d5108e69fe013ff47ab815b849caba9cc33ca1e5 ]

Current rxe device counters are not thread safe.
When multiple QPs are used, they can be racy.
Make them thread safe by making it atomic64.

Fixes: 0b1e5b99a48b ("IB/rxe: Add port protocol stats")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_hw_counters.c
drivers/infiniband/sw/rxe/rxe_verbs.h