[RFC] mlx5: add parameter to disable enhanced IPoIB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Recent ConnextX-[45] HCA have enhanced IPoIB enabled which prevents the use of the connected mode.
Although not an issue in a fully compatible setup, it can be an issue in a mixed HW one.

Mellanox OFED uses a ipoib_enhanced flag on the ib_ipoib module to work around the issue.
This patch adds a similarly name flag to the mlx5_ib module to disable enhanced IPoIB for
all mlx5 HCA and allow users to pick datagram/connected the usual way.

Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@xxxxxxxx>
- ---
 drivers/infiniband/hw/mlx5/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index c2a5780cb394..779a35883494 100644
- --- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -78,6 +78,10 @@ MODULE_AUTHOR("Eli Cohen <eli@xxxxxxxxxxxx>");
 MODULE_DESCRIPTION("Mellanox Connect-IB HCA IB driver");
 MODULE_LICENSE("Dual BSD/GPL");
 
+static int ipoib_enhanced = 1;
+module_param(ipoib_enhanced, int, 0444);
+MODULE_PARM_DESC(ipoib_enhanced, "Enable IPoIB enhanced for capable devices (default = 1) (0-1)");
+
 static char mlx5_version[] =
 	DRIVER_NAME ": Mellanox Connect-IB Infiniband driver v"
 	DRIVER_VERSION "\n";
@@ -6383,6 +6387,7 @@ static int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev)
 		(1ull << IB_USER_VERBS_EX_CMD_DESTROY_FLOW);
 
 	if (MLX5_CAP_GEN(mdev, ipoib_enhanced_offloads) &&
+	    ipoib_enhanced &&
 	    IS_ENABLED(CONFIG_MLX5_CORE_IPOIB))
 		ib_set_device_ops(&dev->ib_dev,
 				  &mlx5_ib_dev_ipoib_enhanced_ops);
- -- 
2.21.0

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEQtJThcGhwCuLGxxvgBvduCWYj2QFAl0/QXMACgkQgBvduCWY
j2TqCQf/YjNVtRd/EbsZUt5bnwIevHPaETwJ7Xa88cjG8kW7THZCokom1fh5UWmV
4ZBGep2b4UEfeJ0u3NMI1ux3G9qFnhhE/hmwMNlsLalc2vQzqX0OIcvcYrpYwEys
ipo78KQjQHFSZAEc+AGq/PfvKp//zi/BWLRAivncF1nM4u3kQ0bO4eGK7NaNiLOK
D43hrAgsLLu+tYxFMX9rLi/RcZkHiMCJwMvp6i9PTKghSow7FbzyK2p8KSzBWzGa
urtYs66ckvyfHSoUKcoMlGfeTBbUYC8yziKqXobRbI7n4CttCxOlrNqLCFF1kzAl
PsnK1EDFTaKHamblNrdQzZTqLiywzQ==
=FENl
-----END PGP SIGNATURE-----



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux