prov/efa: fix missing mem_desc and iface initialization in non-p2p path#12066
Merged
shijin-aws merged 1 commit intoofiwg:mainfrom Mar 28, 2026
Merged
prov/efa: fix missing mem_desc and iface initialization in non-p2p path#12066shijin-aws merged 1 commit intoofiwg:mainfrom
shijin-aws merged 1 commit intoofiwg:mainfrom
Conversation
When p2p is not supported for CUDA/ROCR memory, the non-p2p path in efa_rdm_mr_reg_impl() was missing two critical initializations: efa_mr->mr_fid.mem_desc was not set (causing fi_mr_desc() to return NULL/invalid pointers) and efa_mr_hmem_setup() was not called (leaving efa_mr->iface uninitialized). Fix by adding the missing mem_desc assignment, calling efa_mr_hmem_setup() in the non-p2p path, making efa_mr_hmem_setup() non-static, and adding a unit test to verify both fields are properly initialized when p2p is disabled. Signed-off-by: Shi Jin <sjina@amazon.com>
jiaxiyan
approved these changes
Mar 27, 2026
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.
When p2p is not supported for CUDA/ROCR memory, the non-p2p path in efa_rdm_mr_reg_impl() was missing two critical initializations: efa_mr->mr_fid.mem_desc was not set (causing fi_mr_desc() to return NULL/invalid pointers) and efa_mr_hmem_setup() was not called (leaving efa_mr->iface uninitialized). Fix by adding the missing mem_desc assignment, calling efa_mr_hmem_setup() in the non-p2p path, making efa_mr_hmem_setup() non-static, and adding a unit test to verify both fields are properly initialized when p2p is disabled.