[dpdk-stable] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe

Michael Baum michaelba at nvidia.com
Wed Nov 11 08:36:47 CET 2020


Bonding adjustment is done only when DEVX_PORT is supported in the
rdma-core.

Some bonding condition was done even when DEVX_PORT is not supported.

Remove it.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Cc: stable at dpdk.org

Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index c78d56f..ce25108 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1942,6 +1942,7 @@
 						(list[ns].ifindex,
 						 &list[ns].info);
 			}
+#ifdef HAVE_MLX5DV_DR_DEVX_PORT
 			if (!ret && bd >= 0) {
 				switch (list[ns].info.name_type) {
 				case MLX5_PHYS_PORT_NAME_TYPE_UPLINK:
@@ -1959,6 +1960,7 @@
 				}
 				continue;
 			}
+#endif
 			if (!ret && (list[ns].info.representor ^
 				     list[ns].info.master))
 				ns++;
-- 
1.8.3.1



More information about the stable mailing list