-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[rdma-core] Add new port #51531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
chris1786
wants to merge
1
commit into
microsoft:master
Choose a base branch
from
chris1786:rdma-core
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[rdma-core] Add new port #51531
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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, ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| 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" | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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", | ||
|
chris1786 marked this conversation as resolved.
|
||
| "supports": "linux", | ||
| "dependencies": [ | ||
| { | ||
| "name": "python3", | ||
| "host": true, | ||
| "default-features": false | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "versions": [ | ||
| { | ||
| "git-tree": "1df4cdc0f94b5d31e47dddc888516d7ec014d435", | ||
| "version": "62.0", | ||
| "port-version": 0 | ||
| } | ||
| ] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(extreme nitpick) Please add the missing newline here