Commit 8310e327 authored by Alex Vesker's avatar Alex Vesker Committed by Jason Gunthorpe
Browse files

RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices

sw_owner_v2 will replace sw_owner for future devices, this means that if
sw_owner_v2 is set sw_owner should be ignored and DM allocation is
required for sw_owner_v2 devices to function.

Link: https://lore.kernel.org/r/20200903073857.1129166-3-leon@kernel.org


Signed-off-by: default avatarAlex Vesker <valex@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 9d8feb46
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2347,7 +2347,9 @@ static inline int check_dm_type_support(struct mlx5_ib_dev *dev,
			return -EPERM;

		if (!(MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner) ||
		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner)))
		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner) ||
		      MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner_v2) ||
		      MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner_v2)))
			return -EOPNOTSUPP;
		break;
	}