net/mlx5: support no host PF configuration

Message ID 20231011064153.46486-1-jiaweiw@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: support no host PF configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Jiawei Wang Oct. 11, 2023, 6:41 a.m. UTC
From: Xueming Li <xuemingl@nvidia.com>

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.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 7 -------
 1 file changed, 7 deletions(-)
  

Comments

Bing Zhao Sept. 27, 2024, 7:11 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Jiawei Wang <jiaweiw@nvidia.com>
> Sent: Wednesday, October 11, 2023 2:42 PM
> To: Suanming Mou <suanmingm@nvidia.com>; Xueming(Steven) Li
> <xuemingl@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
> Subject: [PATCH] net/mlx5: support no host PF configuration
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Xueming Li <xuemingl@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> b/drivers/net/mlx5/linux/mlx5_os.c
> index d5ef695e6d..75f53ade8e 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -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
> --

Acked-by: Bing Zhao <bingz@nvidia.com>

Thanks

> 2.18.1
  
Stephen Hemminger Oct. 7, 2024, 6:09 p.m. UTC | #2
On Wed, 11 Oct 2023 09:41:53 +0300
Jiawei Wang <jiaweiw@nvidia.com> wrote:

> From: Xueming Li <xuemingl@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>

Not sure why it never got merged but looks fine.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Dariusz Sosnowski Oct. 28, 2024, 9:35 a.m. UTC | #3
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Friday, September 27, 2024 09:12
> To: Jiawei(Jonny) Wang <jiaweiw@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Xueming Li <xuemingl@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
> Subject: RE: [PATCH] net/mlx5: support no host PF configuration
> 
> External email: Use caution opening links or attachments
> 
> 
> Hi,
> 
> > -----Original Message-----
> > From: Jiawei Wang <jiaweiw@nvidia.com>
> > Sent: Wednesday, October 11, 2023 2:42 PM
> > To: Suanming Mou <suanmingm@nvidia.com>; Xueming(Steven) Li
> > <xuemingl@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> > Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
> > Subject: [PATCH] net/mlx5: support no host PF configuration
> >
> > External email: Use caution opening links or attachments
> >
> >
> > From: Xueming Li <xuemingl@nvidia.com>
> >
> > 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.
> >
> > Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> > Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> > ---
> >  drivers/net/mlx5/linux/mlx5_os.c | 7 -------
> >  1 file changed, 7 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> > b/drivers/net/mlx5/linux/mlx5_os.c
> > index d5ef695e6d..75f53ade8e 100644
> > --- a/drivers/net/mlx5/linux/mlx5_os.c
> > +++ b/drivers/net/mlx5/linux/mlx5_os.c
> > @@ -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
> > --
> 
> Acked-by: Bing Zhao <bingz@nvidia.com>
> 
> Thanks
> 

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Best regards,
Dariusz Sosnowski
  
Raslan Darawsheh Oct. 28, 2024, 1:12 p.m. UTC | #4
Hi,

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

From: Xueming Li <xuemingl@nvidia.com>

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.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index d5ef695e6d..75f53ade8e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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