net/mlx5: fix UAR lock sharing for multiport devices
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 16 Jul 2020 08:23:06 +0000 (08:23 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 13:44:36 +0000 (15:44 +0200)
commit24feb04596af9ca1893fb589d6a0404ebe088771
tree2a68624346422bdc9fb63d9f783bef859a7bc811
parent8f848f32fc24f6db2dc4366b8f4111cdc3e67356
net/mlx5: fix UAR lock sharing for multiport devices

The master and representors might be created over the multiport
Infiniband devices and the UAR resource allocated for sibling
ports might belong to the same underlying Infiniband device.
Hardware requires the write access to the UAR must be performed
as atomic 64-bit write, on 32-bit systems this is two sequential
writes, protected by lock. Due to possibility to share the same
UAR between sibling devices the locks must be moved to shared
context.

Fixes: f048f3d479a6 ("net/mlx5: switch to the shared IB device context")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_txq.c