patch ofa_kernel to prepare for build-time dependency elimination for downstream GPU kmod#17512
Open
arsdragonfly wants to merge 3 commits into
Open
patch ofa_kernel to prepare for build-time dependency elimination for downstream GPU kmod#17512arsdragonfly wants to merge 3 commits into
arsdragonfly wants to merge 3 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
The IB peer-memory API in drivers/infiniband/core/peer_mem.c was
historically exported with EXPORT_SYMBOL. That dates back to a time when
the consumer was the NVIDIA closed-source GPU driver, which could not
link against EXPORT_SYMBOL_GPL symbols.
Today the consumers are GPL kernel modules (AMDGPU, NVIDIA open-source
driver). Exposing the peer-memory client registration API as
EXPORT_SYMBOL_GPL more accurately reflects the GPL licensing of
mlnx-ofa_kernel and matches the kernel's modern expectations around
in-kernel API surfaces.
In addition, switching to EXPORT_SYMBOL_GPL allows out-of-tree drivers
(AMDGPU, NVIDIA open-source GPU driver) to discover the peer-memory
client API via module symbol resolution at runtime instead of having
to hard-link against the mlnx-ofa_kernel build, which is required to
break the diamond build-time dependency between an OOT GPU driver and
multiple OOT NIC drivers that all consume the same API, which is the
situation we are facing with AMD GPU (MI300X works with Mellanox while
MI455X comes with Vulcano NIC, and we would like the same kmod to be
able to work with both hardware).
Change Log
Does this affect the toolchain?
NO
Associated issues
Test Methodology
tested locally with adjusted ofa_kernel and amdgpu-with-eliminated-build-time-dependency: