net/mana: fix dependencies

Message ID 20221009135337.1317477-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series net/mana: fix dependencies |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Thomas Monjalon Oct. 9, 2022, 1:53 p.m. UTC
  The reason for not building is updated
to be consistent with other drivers.

The libibverbs was not detected through pkg-config.
The method dependency() needs to be used first.

The support in rdma-core and Linux is not released yet,
so the documentation is updated.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/nics/mana.rst     | 6 ++++--
 drivers/net/mana/meson.build | 9 ++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)
  

Comments

Thomas Monjalon Oct. 9, 2022, 2:03 p.m. UTC | #1
Long,

For the reasons below, we should not have merged the MANA PMD in DPDK 22.11.
We must not assume dependencies until they are upstream.
This is a red flag on the PMD, a revert is possible.

Jason,

Please could you tell us what is the expected date of release
of the MANA support in Linux and rdma-core?


09/10/2022 15:53, Thomas Monjalon:
[...]
> The libibverbs was not detected through pkg-config.
> The method dependency() needs to be used first.
> 
> The support in rdma-core and Linux is not released yet,
> so the documentation is updated.

[...]
> -  The minimum required version of rdma-core with libmana is v43.
> +
> +  The support of MANA is not merged in rdma-core 42.
>  
>  - **Kernel modules**
>  
> @@ -56,6 +56,8 @@ and must be installed separately:
>    - mana_ib: InifiniBand device driver.
>    - ib_uverbs: user space driver for verbs (entry point for libibverbs).
>  
> +  The support of MANA is planned in Linux 6.2.
  
Jason Gunthorpe Oct. 9, 2022, 2:08 p.m. UTC | #2
I'm hopeful for 6.2, but it needs a respin I haven't seen yet.

Get Outlook for Android<https://aka.ms/AAb9ysg>
  
Thomas Monjalon Oct. 9, 2022, 2:18 p.m. UTC | #3
09/10/2022 15:53, Thomas Monjalon:
> The reason for not building is updated
> to be consistent with other drivers.
> 
> The libibverbs was not detected through pkg-config.
> The method dependency() needs to be used first.
> 
> The support in rdma-core and Linux is not released yet,
> so the documentation is updated.

Forgot this line:
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
  
Ferruh Yigit Oct. 10, 2022, 8:18 a.m. UTC | #4
On 10/9/2022 3:03 PM, Thomas Monjalon wrote:
> Long,
> 
> For the reasons below, we should not have merged the MANA PMD in DPDK 22.11.
> We must not assume dependencies until they are upstream.
> This is a red flag on the PMD, a revert is possible.
> 

I missed that dependencies are not ready :(

What do you think to update the MAINTAINERS file like following until 
all dependencies met:

  -Microsoft mana
  +Microsoft mana - EXPERIMENTAL

perhaps add similar not to 'doc/guides/nics/mana.rst' to highlight the same?

They can be updated back in the future when dependencies met.

> Jason,
> 
> Please could you tell us what is the expected date of release
> of the MANA support in Linux and rdma-core?
> 
> 
> 09/10/2022 15:53, Thomas Monjalon:
> [...]
>> The libibverbs was not detected through pkg-config.
>> The method dependency() needs to be used first.
>>
>> The support in rdma-core and Linux is not released yet,
>> so the documentation is updated.
> 
> [...]
>> -  The minimum required version of rdma-core with libmana is v43.
>> +
>> +  The support of MANA is not merged in rdma-core 42.
>>   
>>   - **Kernel modules**
>>   
>> @@ -56,6 +56,8 @@ and must be installed separately:
>>     - mana_ib: InifiniBand device driver.
>>     - ib_uverbs: user space driver for verbs (entry point for libibverbs).
>>   
>> +  The support of MANA is planned in Linux 6.2.
> 
> 
>
  
Long Li Oct. 10, 2022, 6:53 p.m. UTC | #5
I will send respin as soon as patch submission window reopens.

Thanks,
Long

From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Sunday, October 9, 2022 7:08 AM
To: thomas <thomas@monjalon.net>; Long Li <longli@microsoft.com>
Cc: dev@dpdk.org; ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; stephen@networkplumber.org
Subject: Re: [PATCH] net/mana: fix dependencies

I'm hopeful for 6.2, but it needs a respin I haven't seen yet.

Get Outlook for Android<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2FAAb9ysg&data=05%7C01%7Clongli%40microsoft.com%7C94edd67fca644efd172908daa9ffb037%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638009212903090034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qxczZz8McOnU2LUcOh3jx4HouSVYzylCNGAheGmVPDg%3D&reserved=0>
  
Thomas Monjalon Oct. 10, 2022, 7:55 p.m. UTC | #6
10/10/2022 20:53, Long Li:
> I will send respin as soon as patch submission window reopens.

So what do we do in DPDK?
Do you agree with the patch I sent to correct wrong assumptions
in the doc?

My fear is that if we keep mana PMD as-is,
it could break compilation when libmana will be released
if there is an incompatibility with what you have in staging.

Please remember that rdma-core is also used for mlx PMDs,
and we don't want mana to break compilation when updating rdma-core.


> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Sunday, October 9, 2022 7:08 AM
> To: thomas <thomas@monjalon.net>; Long Li <longli@microsoft.com>
> Cc: dev@dpdk.org; ferruh.yigit@amd.com; andrew.rybchenko@oktetlabs.ru; stephen@networkplumber.org
> Subject: Re: [PATCH] net/mana: fix dependencies
> 
> I'm hopeful for 6.2, but it needs a respin I haven't seen yet.
> 
> From: Thomas Monjalon <thomas@monjalon.net<mailto:thomas@monjalon.net>>
> 
> Long,
> 
> For the reasons below, we should not have merged the MANA PMD in DPDK 22.11.
> We must not assume dependencies until they are upstream.
> This is a red flag on the PMD, a revert is possible.
> 
> Jason,
> 
> Please could you tell us what is the expected date of release
> of the MANA support in Linux and rdma-core?
> 
> 
> 09/10/2022 15:53, Thomas Monjalon:
> [...]
> > The libibverbs was not detected through pkg-config.
> > The method dependency() needs to be used first.
> >
> > The support in rdma-core and Linux is not released yet,
> > so the documentation is updated.
> 
> [...]
> > -  The minimum required version of rdma-core with libmana is v43.
> > +
> > +  The support of MANA is not merged in rdma-core 42.
> >
> >  - **Kernel modules**
> >
> > @@ -56,6 +56,8 @@ and must be installed separately:
> >    - mana_ib: InifiniBand device driver.
> >    - ib_uverbs: user space driver for verbs (entry point for libibverbs).
> >
> > +  The support of MANA is planned in Linux 6.2.
  
Long Li Oct. 10, 2022, 8:20 p.m. UTC | #7
> Subject: Re: [PATCH] net/mana: fix dependencies
> 
> 10/10/2022 20:53, Long Li:
> > I will send respin as soon as patch submission window reopens.
> 
> So what do we do in DPDK?
> Do you agree with the patch I sent to correct wrong assumptions in the doc?

Yes, the patch looks good to me.

> 
> My fear is that if we keep mana PMD as-is, it could break compilation when
> libmana will be released if there is an incompatibility with what you have in
> staging.

I hope that will not happen. After MANA PMD is merged, any changes in libmana while in staging will not break the PMD. (At minimum, it will guarantee not to break compilation)

> 
> Please remember that rdma-core is also used for mlx PMDs, and we don't
> want mana to break compilation when updating rdma-core.
> 
> 
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Sunday, October 9, 2022 7:08 AM
> > To: thomas <thomas@monjalon.net>; Long Li <longli@microsoft.com>
> > Cc: dev@dpdk.org; ferruh.yigit@amd.com;
> andrew.rybchenko@oktetlabs.ru;
> > stephen@networkplumber.org
> > Subject: Re: [PATCH] net/mana: fix dependencies
> >
> > I'm hopeful for 6.2, but it needs a respin I haven't seen yet.
> >
> > From: Thomas Monjalon
> > <thomas@monjalon.net<mailto:thomas@monjalon.net>>
> >
> > Long,
> >
> > For the reasons below, we should not have merged the MANA PMD in
> DPDK 22.11.
> > We must not assume dependencies until they are upstream.
> > This is a red flag on the PMD, a revert is possible.
> >
> > Jason,
> >
> > Please could you tell us what is the expected date of release of the
> > MANA support in Linux and rdma-core?
> >
> >
> > 09/10/2022 15:53, Thomas Monjalon:
> > [...]
> > > The libibverbs was not detected through pkg-config.
> > > The method dependency() needs to be used first.
> > >
> > > The support in rdma-core and Linux is not released yet, so the
> > > documentation is updated.
> >
> > [...]
> > > -  The minimum required version of rdma-core with libmana is v43.
> > > +
> > > +  The support of MANA is not merged in rdma-core 42.
> > >
> > >  - **Kernel modules**
> > >
> > > @@ -56,6 +56,8 @@ and must be installed separately:
> > >    - mana_ib: InifiniBand device driver.
> > >    - ib_uverbs: user space driver for verbs (entry point for libibverbs).
> > >
> > > +  The support of MANA is planned in Linux 6.2.
> 
>
  
Thomas Monjalon Oct. 10, 2022, 9:58 p.m. UTC | #8
09/10/2022 16:18, Thomas Monjalon:
> 09/10/2022 15:53, Thomas Monjalon:
> > The reason for not building is updated
> > to be consistent with other drivers.
> > 
> > The libibverbs was not detected through pkg-config.
> > The method dependency() needs to be used first.
> > 
> > The support in rdma-core and Linux is not released yet,
> > so the documentation is updated.
> 
> Forgot this line:
> Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
> 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Applied
  

Patch

diff --git a/doc/guides/nics/mana.rst b/doc/guides/nics/mana.rst
index 30e3fd1cb6..005c0b2ca7 100644
--- a/doc/guides/nics/mana.rst
+++ b/doc/guides/nics/mana.rst
@@ -29,7 +29,6 @@  and must be installed separately:
   It allows slow and privileged operations
   (context initialization, hardware resources allocations)
   to be managed by the kernel and fast operations to never leave user space.
-  The minimum required rdma-core version is v43.
 
   In most cases, rdma-core is shipped as a package with an OS distribution.
   User can also install the upstream version of the rdma-core from
@@ -40,7 +39,8 @@  and must be installed separately:
   Low-level user space driver library
   for Microsoft Azure Network Adapter devices,
   it is automatically loaded by libibverbs.
-  The minimum required version of rdma-core with libmana is v43.
+
+  The support of MANA is not merged in rdma-core 42.
 
 - **Kernel modules**
 
@@ -56,6 +56,8 @@  and must be installed separately:
   - mana_ib: InifiniBand device driver.
   - ib_uverbs: user space driver for verbs (entry point for libibverbs).
 
+  The support of MANA is planned in Linux 6.2.
+
 Driver compilation and testing
 ------------------------------
 
diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build
index bdf526e846..493f0d26d4 100644
--- a/drivers/net/mana/meson.build
+++ b/drivers/net/mana/meson.build
@@ -3,7 +3,7 @@ 
 
 if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
     build = false
-    reason = 'mana is supported on Linux X86_64'
+    reason = 'only supported on x86_64 Linux'
     subdir_done()
 endif
 
@@ -18,9 +18,12 @@  sources += files(
         'tx.c',
 )
 
-libnames = ['ibverbs', 'mana' ]
+libnames = ['ibverbs', 'mana']
 foreach libname:libnames
-    lib = cc.find_library(libname, required:false)
+    lib = dependency('lib' + libname, required:false)
+    if not lib.found()
+        lib = cc.find_library(libname, required:false)
+    endif
     if lib.found()
         ext_deps += lib
     else