Skip to contentSkip to conversation

net/mlx5: support no host PF configuration

PATCH In review Jiawei Wang 5 participants 5 messages Oct 11, 2023 – Oct 28, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: support no host PF configuration

From: Xueming Li <[email protected]>

In BlueField, a new firmware configuration option NUM_OF_PF=0 disables PF on the x86 host side, no HPF on the ARM side, and the only RDMA port on the ARM side is the bonding device(PF0). A device probe with devargs of representor=pf[0-1]vf[...] will probe PF0 and PF1 one by one, and it's possible that PF1 device scan results in no switch ports.

This patch supports the new configuration by allowing a PF scan with empty switch ports.

---
 drivers/net/mlx5/linux/mlx5_os.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/mlx5/linux/mlx5_os.c +0 -7
index d5ef695e6d..75f53ade8e 100644
@@ -2195,13 +2195,6 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
 				     list[ns].info.master))
 				ns++;
 		}
-		if (!ns) {
-			DRV_LOG(ERR,
-				"Unable to recognize master/representors on the IB device with multiple ports.");
-			rte_errno = ENOENT;
-			ret = -rte_errno;
-			goto exit;
-		}
 	} else {
 		/*
 		 * The existence of several matching entries (nd > 1) means
Signature · 1 line
2.18.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 47 lines

-----Original Message-----
From: Jiawei Wang <[email protected]>
Sent: Wednesday, October 11, 2023 2:42 PM
To: Suanming Mou <[email protected]>; Xueming(Steven) Li <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: support no host PF configuration

External email: Use caution opening links or attachments

From: Xueming Li <[email protected]>

In BlueField, a new firmware configuration option NUM_OF_PF=0 disables PF on the x86 host side, no HPF on the ARM side, and the only RDMA port on the ARM side is the bonding device(PF0). A device probe with devargs of representor=pf[0-1]vf[...] will probe PF0 and PF1 one by one, and it's possible that PF1 device scan results in no switch ports.

This patch supports the new configuration by allowing a PF scan with empty switch ports.

---
 drivers/net/mlx5/linux/mlx5_os.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/mlx5/linux/mlx5_os.c +0 -7
index d5ef695e6d..75f53ade8e 100644
@@ -2195,13 +2195,6 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device
 *cdev,
                                     list[ns].info.master))
                                ns++;
                }
-               if (!ns) {
-                       DRV_LOG(ERR,
-                               "Unable to recognize master/representors
 on the IB device with multiple ports.");
-                       rte_errno = ENOENT;
-                       ret = -rte_errno;
-                       goto exit;
-               }
        } else {
Quoted 4 lines

/*
* The existence of several matching entries (nd > 1)
means
--

Thanks

Quoted 1 line

2.18.1

#2 lore raw
Quoted 67 lines

-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Friday, September 27, 2024 09:12
To: Jiawei(Jonny) Wang <[email protected]>; Suanming Mou <[email protected]>; Xueming Li <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: RE: [PATCH] net/mlx5: support no host PF configuration

External email: Use caution opening links or attachments

Hi,

drivers/net/mlx5/linux/mlx5_os.c mlx5_os_pci_probe_pf(struct

Quoted 34 lines

-----Original Message-----
From: Jiawei Wang <[email protected]>
Sent: Wednesday, October 11, 2023 2:42 PM
To: Suanming Mou <[email protected]>; Xueming(Steven) Li <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: support no host PF configuration

External email: Use caution opening links or attachments

From: Xueming Li <[email protected]>

In BlueField, a new firmware configuration option NUM_OF_PF=0 disables PF on the x86 host side, no HPF on the ARM side, and the only RDMA port on the ARM side is the bonding device(PF0). A device probe with devargs of representor=pf[0-1]vf[...] will probe PF0 and PF1 one by one, and it's possible that PF1 device scan results in no switch ports.

This patch supports the new configuration by allowing a PF scan with empty switch ports.

---
 drivers/net/mlx5/linux/mlx5_os.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/mlx5/linux/mlx5_os.c +0 -0
index d5ef695e6d..75f53ade8e 100644
@@ -2195,13 +2195,6 @@ mlx5_os_pci_probe_pf(struct

mlx5_common_device

Quoted 13 lines
drivers/net/mlx5/linux/mlx5_os.c +0 -7
 *cdev,
                                     list[ns].info.master))
                                ns++;
                }
-               if (!ns) {
-                       DRV_LOG(ERR,
-                               "Unable to recognize master/representors
 on the IB device with multiple ports.");
-                       rte_errno = ENOENT;
-                       ret = -rte_errno;
-                       goto exit;
-               }
        } else {
Quoted 4 lines

/*
* The existence of several matching entries (nd > 1)
means
--

Quoted 4 lines

Thanks

Best regards,
Dariusz Sosnowski

Acked-by on v1 1/1
#3 lore raw
In reply to Jiawei Wang
Quoted 8 lines · On Wed, 11 Oct 2023 09:41:53 +0300 Jiawei Wang <[email protected]> wrote:

From: Xueming Li <[email protected]>

In BlueField, a new firmware configuration option NUM_OF_PF=0 disables PF on the x86 host side, no HPF on the ARM side, and the only RDMA port on the ARM side is the bonding device(PF0). A device probe with devargs of representor=pf[0-1]vf[...] will probe PF0 and PF1 one by one, and it's possible that PF1 device scan results in no switch ports.

Quoted 5 lines

This patch supports the new configuration by allowing a PF scan with empty switch ports.

Not sure why it never got merged but looks fine.

#4 lore raw
In reply to Jiawei Wang

Hi,

From: Jiawei(Jonny) Wang <[email protected]>
Sent: Wednesday, October 11, 2023 9:41 AM
To: Suanming Mou; Xueming(Steven) Li; Slava Ovsiienko
Cc: [email protected]; Raslan Darawsheh
Subject: [PATCH] net/mlx5: support no host PF configuration

From: Xueming Li <[email protected]>

In BlueField, a new firmware configuration option NUM_OF_PF=0 disables PF on the x86 host side, no HPF on the ARM side, and the only RDMA port on the ARM side is the bonding device(PF0). A device probe with devargs of representor=pf[0-1]vf[...] will probe PF0 and PF1 one by one, and it's possible that PF1 device scan results in no switch ports.

This patch supports the new configuration by allowing a PF scan with empty switch ports.

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh