[rdma-core] Add new port (#51531)

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
This commit is contained in:
Chris W 2026-05-11 18:28:30 +01:00 committed by GitHub
parent 940f58770c
commit 082b32b6c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 299 additions and 0 deletions

View File

@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 718b7d2dd..533860ed6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(util/tests)
add_subdirectory(Documentation)
add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
@@ -768,7 +767,6 @@ add_subdirectory(infiniband-diags/man)
if (CYTHON_EXECUTABLE)
add_subdirectory(pyverbs)
- add_subdirectory(tests)
endif()
# Binaries
@@ -779,7 +777,6 @@ endif()
if (NOT NL_KIND EQUAL 0)
add_subdirectory(iwpmd)
endif()
-add_subdirectory(libibumad/tests)
add_subdirectory(libibverbs/examples)
add_subdirectory(librdmacm/examples)
if (UDEV_FOUND)

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 533860ed6..fa1a57b4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -777,8 +777,6 @@ endif()
if (NOT NL_KIND EQUAL 0)
add_subdirectory(iwpmd)
endif()
-add_subdirectory(libibverbs/examples)
-add_subdirectory(librdmacm/examples)
if (UDEV_FOUND)
add_subdirectory(rdma-ndd)
endif()

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa1a57b4f..f0c411792 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(Documentation)
add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
# Libraries

View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0c411792..ffa784de1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -760,9 +760,6 @@ add_subdirectory(providers/siw)
add_subdirectory(libibmad)
add_subdirectory(libibnetdisc)
add_subdirectory(libibnetdisc/man)
-add_subdirectory(infiniband-diags)
-add_subdirectory(infiniband-diags/scripts)
-add_subdirectory(infiniband-diags/man)
if (CYTHON_EXECUTABLE)
add_subdirectory(pyverbs)

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffa784de1..45d736147 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -776,7 +776,6 @@ endif()
if (UDEV_FOUND)
add_subdirectory(rdma-ndd)
endif()
-add_subdirectory(srp_daemon)
ibverbs_finalize()
rdma_finalize_libs()

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45d736147..cd713f897 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
# Libraries
add_subdirectory(libibumad)

View File

@ -0,0 +1,33 @@
diff --git a/librdmacm/CMakeLists.txt b/librdmacm/CMakeLists.txt
index ea1d1550f..400c18f49 100644
--- a/librdmacm/CMakeLists.txt
+++ b/librdmacm/CMakeLists.txt
@@ -25,28 +25,6 @@ target_link_libraries(rdmacm LINK_PRIVATE
${RT_LIBRARIES}
)
-# The preload library is a bit special, it needs to be open coded
-# Since it is a LD_PRELOAD it has no soname, and is installed in sub dir
-add_library(rspreload MODULE
- preload.c
- indexer.c
- )
-# Even though this is a module we still want to use Wl,--no-undefined
-set_target_properties(rspreload PROPERTIES LINK_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
-set_target_properties(rspreload PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
-rdma_set_library_map(rspreload librspreload.map)
-target_link_libraries(rspreload LINK_PRIVATE
- rdmacm
- ${CMAKE_THREAD_LIBS_INIT}
- ${CMAKE_DL_LIBS}
-)
-install(TARGETS rspreload DESTINATION "${CMAKE_INSTALL_LIBDIR}/rsocket/")
-
-# These are for compat with old packaging, these name should not be used.
-# FIXME: Maybe we can get rid of them?
-rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1")
-rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1.0.0")
-
if (ENABLE_STATIC)
if (NOT NL_KIND EQUAL 0)
set(REQUIRES "libnl-3.0, libnl-route-3.0, ")

View File

@ -0,0 +1,79 @@
diff --git a/buildlib/rdma_functions.cmake b/buildlib/rdma_functions.cmake
index ef77d95d0..84e650497 100644
--- a/buildlib/rdma_functions.cmake
+++ b/buildlib/rdma_functions.cmake
@@ -117,7 +117,10 @@ function(rdma_library DEST VERSION_SCRIPT SOVERSION VERSION)
SOVERSION ${SOVERSION}
VERSION ${VERSION}
LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+
+ if(NOT ENABLE_STATIC)
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ endif()
endfunction()
# Create a special provider with exported symbols in it The shared provider
@@ -153,20 +156,23 @@ function(rdma_shared_provider DEST VERSION_SCRIPT SOVERSION VERSION)
SOVERSION ${SOVERSION}
VERSION ${VERSION}
LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
-
- # Compute a relative symlink from VERBS_PROVIDER_DIR to LIBDIR
- execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/buildlib/relpath
- "${CMAKE_INSTALL_FULL_LIBDIR}/lib${DEST}.so.${VERSION}"
- "${VERBS_PROVIDER_DIR}"
- OUTPUT_VARIABLE DEST_LINK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE retcode)
- if(NOT "${retcode}" STREQUAL "0")
- message(FATAL_ERROR "Unable to run buildlib/relpath, do you have python?")
- endif()
- rdma_install_symlink("${DEST_LINK_PATH}" "${VERBS_PROVIDER_DIR}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
- rdma_create_symlink("lib${DEST}.so.${VERSION}" "${BUILD_LIB}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ if(NOT ENABLE_STATIC)
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+
+ # Compute a relative symlink from VERBS_PROVIDER_DIR to LIBDIR
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/buildlib/relpath
+ "${CMAKE_INSTALL_FULL_LIBDIR}/lib${DEST}.so.${VERSION}"
+ "${VERBS_PROVIDER_DIR}"
+ OUTPUT_VARIABLE DEST_LINK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
+ RESULT_VARIABLE retcode)
+ if(NOT "${retcode}" STREQUAL "0")
+ message(FATAL_ERROR "Unable to run buildlib/relpath, do you have python?")
+ endif()
+
+ rdma_install_symlink("${DEST_LINK_PATH}" "${VERBS_PROVIDER_DIR}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ rdma_create_symlink("lib${DEST}.so.${VERSION}" "${BUILD_LIB}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ endif()
endfunction()
# Create a provider shared library for libibverbs
@@ -201,15 +207,17 @@ function(rdma_provider DEST)
# Provider Plugins do not use SONAME versioning, there is no reason to
# create the usual symlinks.
- if (VERBS_PROVIDER_DIR)
- install(TARGETS ${DEST} DESTINATION "${VERBS_PROVIDER_DIR}")
- else()
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ if(NOT ENABLE_STATIC)
+ if (VERBS_PROVIDER_DIR)
+ install(TARGETS ${DEST} DESTINATION "${VERBS_PROVIDER_DIR}")
+ else()
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
- # FIXME: This symlink is provided for compat with the old build, but it
- # never should have existed in the first place, nothing should use this
- # name, we can probably remove it.
- rdma_install_symlink("lib${DEST}${IBVERBS_PROVIDER_SUFFIX}" "${CMAKE_INSTALL_LIBDIR}/lib${DEST}.so")
+ # FIXME: This symlink is provided for compat with the old build, but it
+ # never should have existed in the first place, nothing should use this
+ # name, we can probably remove it.
+ rdma_install_symlink("lib${DEST}${IBVERBS_PROVIDER_SUFFIX}" "${CMAKE_INSTALL_LIBDIR}/lib${DEST}.so")
+ endif()
endif()
endfunction()

View File

@ -0,0 +1,60 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO linux-rdma/rdma-core
REF "v${VERSION}"
SHA512 0251340e2b3b90562f903bcc26d489516c6efba3179423932c6b9c2e8dd2c6ef934fa476d9963db26544ddb5232e0da94574774e578ea6c0268c57961a0aeb47
HEAD_REF master
PATCHES
0001-disable-tests.patch
0002-disable-examples.patch
0003-disable-documentation.patch
0004-disable-infiniband-diags.patch
0005-disable-srp-daemon.patch
0006-disable-kernel-boot.patch
0007-disable-librspreload.patch
0008-enable-static-libs-only.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DENABLE_RESOLVE_NEIGH=OFF
-DNO_MAN_PAGES=ON
-DNO_PYVERBS=ON
-DENABLE_STATIC="${ENABLE_STATIC}"
-DVCPKG_LOCK_FIND_PACKAGE_PythonLibs=ON
-DVCPKG_LOCK_FIND_PACKAGE_Systemd=OFF
-DVCPKG_LOCK_FIND_PACKAGE_UDev=OFF
-DVCPKG_LOCK_FIND_PACKAGE_cython=OFF
-DVCPKG_LOCK_FIND_PACKAGE_pandoc=OFF
-DVCPKG_LOCK_FIND_PACKAGE_rst2man=OFF
MAYBE_UNUSED_VARIABLES
VCPKG_LOCK_FIND_PACKAGE_PythonLibs
VCPKG_LOCK_FIND_PACKAGE_cython
VCPKG_LOCK_FIND_PACKAGE_pandoc
VCPKG_LOCK_FIND_PACKAGE_rst2man
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/libexec")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/libexec")
vcpkg_install_copyright(FILE_LIST
"${SOURCE_PATH}/COPYING.md"
"${SOURCE_PATH}/COPYING.BSD_MIT"
"${SOURCE_PATH}/COPYING.GPL2"
"${SOURCE_PATH}/ccan/LICENSE.CCO"
"${SOURCE_PATH}/ccan/LICENSE.MIT"
"${SOURCE_PATH}/providers/hfi1verbs/hfiverbs.h"
"${SOURCE_PATH}/providers/ipathverbs/COPYING"
"${SOURCE_PATH}/COPYING.BSD_FB"
)

View File

@ -0,0 +1,23 @@
{
"name": "rdma-core",
"version": "62.0",
"description": "The userspace components for the Linux Kernel's drivers/infiniband subsystem.",
"homepage": "https://github.com/linux-rdma/rdma-core",
"license": "(GPL-2.0-only OR Linux-OpenIB) AND (GPL-2.0-only OR BSD-3-Clause) AND (GPL-2.0-only OR BSD-2-Clause) AND CC0-1.0 AND MIT",
"supports": "linux",
"dependencies": [
{
"name": "python3",
"host": true,
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -8640,6 +8640,10 @@
"baseline": "3.3.1",
"port-version": 0
},
"rdma-core": {
"baseline": "62.0",
"port-version": 0
},
"re2": {
"baseline": "2025-11-05",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "33b95cc4f1a4eb8f5051cf643392fe50ee09e7db",
"version": "62.0",
"port-version": 0
}
]
}