Skip to contentSkip to conversation

net/mlx5: fix probing the device in legacy bonding mode

PATCH In review Viacheslav Ovsiienko 2 participants 2 messages Apr 21, 2021 – Apr 28, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix probing the device in legacy bonding mode

If the device was configured as legacy bond one (without involving E-Switch), the mlx5 PMD erroneously tried to deduce the vport index raising the fatal error and preventing device from being used.

The patch checks whether there is E-Switch present and we should use vport index indeed.

Fixes 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes d5c06b1b10ae ("net/mlx5: query vport index match mode and parameters")
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/linux/mlx5_os.c +2 -1
index ad43141e47..8f4b34e577 100644
@@ -1097,7 +1097,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	}
 	if (devx_port.comp_mask & MLX5DV_DEVX_PORT_VPORT) {
 		priv->vport_id = devx_port.vport_num;
-	} else if (spawn->pf_bond >= 0) {
+	} else if (spawn->pf_bond >= 0 &&
+		   (switch_info->representor || switch_info->master)) {
 		DRV_LOG(ERR, "can't deduce vport index for port %d"
 			     " on bonding device %s",
 			     spawn->phys_port,
Signature · 1 line
2.28.0
#1 lore raw

Hi,

Quoted 15 lines

-----Original Message-----
From: Viacheslav Ovsiienko <[email protected]>
Sent: Wednesday, April 21, 2021 11:10 AM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix probing the device in legacy bonding mode

If the device was configured as legacy bond one (without involving E-Switch), the mlx5 PMD erroneously tried to deduce the vport index raising the fatal error and preventing device from being used.

The patch checks whether there is E-Switch present and we should use vport index indeed.

Quoted 6 lines
Fixes 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes d5c06b1b10ae ("net/mlx5: query vport index match mode and

parameters")
Cc: [email protected]

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh