Skip to contentSkip to conversation

net/mana: support rdma-core via pkg-config in meson

PATCH Applied Shreesh Adiga 3 participants 3 messages Sep 20, 2024 – Sep 22, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mana: support rdma-core via pkg-config in meson

Currently building with custom rdma-core installed in /opt/rdma-core after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0
Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO

Thus to fix this, the libs is updated in meson.build and is passed to the cc.has_header_symbol call using dependencies. After this change, the libmana header files are getting included and net/mana is successfully enabled.

Fixes 517ed6e2d590 ("net/mana: add basic driver with build environment")
---
 drivers/net/mana/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/mana/meson.build +3 -1
index 2d72eca5a8..3ddc230ab4 100644
@@ -19,12 +19,14 @@ sources += files(
 )
 
 libnames = ['ibverbs', 'mana']
+libs = []
 foreach libname:libnames
     lib = dependency('lib' + libname, required:false)
     if not lib.found()
         lib = cc.find_library(libname, required:false)
     endif
     if lib.found()
+        libs += lib
         ext_deps += lib
     else
         build = false
@@ -43,7 +45,7 @@ required_symbols = [
 ]
 
 foreach arg:required_symbols
-    if not cc.has_header_symbol(arg[0], arg[1])
+    if not cc.has_header_symbol(arg[0], arg[1], dependencies: libs, args: cflags)
         build = false
         reason = 'missing symbol "' + arg[1] + '" in "' + arg[0] + '"'
         subdir_done()
Signature · 1 line
2.44.2
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

Subject: [PATCH] net/mana: support rdma-core via pkg-config in meson

Currently building with custom rdma-core installed in /opt/rdma-core after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0 Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO

Quoted 8 lines

Thus to fix this, the libs is updated in meson.build and is passed to the cc.has_header_symbol call using dependencies. After this change, the libmana header files are getting included and net/mana is successfully enabled.

Fixes 517ed6e2d590 ("net/mana: add basic driver with build environment")
Quoted 35 lines
---
 drivers/net/mana/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/mana/meson.build index renamed from drivers/net/mana/meson.build +0 -0

2d72eca5a8..3ddc230ab4 100644

drivers/net/mana/meson.build +4 -2
@@ -19,12 +19,14 @@ sources += files(
 )
 
 libnames = ['ibverbs', 'mana']
+libs = []
 foreach libname:libnames
     lib = dependency('lib' + libname, required:false)
     if not lib.found()
         lib = cc.find_library(libname, required:false)
     endif
     if lib.found()
+        libs += lib
         ext_deps += lib
     else
         build = false
@@ -43,7 +45,7 @@ required_symbols = [
 ]
 
 foreach arg:required_symbols
-    if not cc.has_header_symbol(arg[0], arg[1])
+    if not cc.has_header_symbol(arg[0], arg[1], dependencies: libs,
+ args: cflags)
         build = false
         reason = 'missing symbol "' + arg[1] + '" in "' + arg[0] + '"'
         subdir_done()
--

2.44.2

Applied
#2 lore raw
Quoted 12 lines · Long Li
Quoted 12 lines

Subject: [PATCH] net/mana: support rdma-core via pkg-config in meson

Currently building with custom rdma-core installed in /opt/rdma-core after setting PKG_CONFIG_PATH=/opt/rdma-core/lib64/pkgconfig/ results in the below meson logs:
Run-time dependency libmana found: YES 1.0.54.0 Header "infiniband/manadv.h" has symbol "manadv_set_context_attr" : NO

Thus to fix this, the libs is updated in meson.build and is passed to the cc.has_header_symbol call using dependencies. After this change, the libmana header files are getting included and net/mana is successfully enabled.

Quoted 7 lines
Quoted 4 lines
Fixes 517ed6e2d590 ("net/mana: add basic driver with build environment")

Applied to dpdk-next-net/main, thanks.