Skip to content

prov/efa: fix missing mem_desc and iface initialization in non-p2p path#12066

Merged
shijin-aws merged 1 commit intoofiwg:mainfrom
shijin-aws:fix_desc_non_p2p
Mar 28, 2026
Merged

prov/efa: fix missing mem_desc and iface initialization in non-p2p path#12066
shijin-aws merged 1 commit intoofiwg:mainfrom
shijin-aws:fix_desc_non_p2p

Conversation

@shijin-aws
Copy link
Copy Markdown
Contributor

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.

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>
@shijin-aws shijin-aws requested a review from a team March 27, 2026 20:10
@shijin-aws shijin-aws merged commit f944b37 into ofiwg:main Mar 28, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants