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
prov/verbs: refactor initialization and fi_getinfo #5259
Conversation
This patch refactors how the different EP types are handled without changing the behavior. If hints specified one of the two endpoints fi_ibv_get_matching_info would have filtered out the unmatching EP type and only one of fi_ibv_handle_sock_addr or fi_ibv_handle_ib_ud_addr would be run. Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
- define a new function which gets rdma info (if available) given a struct ifaddrs. This function doesn't have failure logging unlike fi_ibv_get_rai_id. Failure are expected when trying out different interfaces and so it's good to keep the logging verbosity low. - also return ENODATA when no valid IPoIB interfaces are found. Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
@a-ilango - With this PR I'm seeing 2 Node, 1 PPN XRC test fail with the following assert (RC seems fine): prov/rxm/src/rxm.h:271: rxm_cmap_acquire_handle: Assertion `fi_addr < cmap->num_allocated' failed. backtrace: I don't know why the destination if_addr is crazy with XRC and not RC. |
@swelch That's weird. Do you know which commit cause in this series causes the issue? |
I'll check. |
Thanks. Does the test node have some verbs devices which don't have an IP address configured? If possible please verify |
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.
One question on the old code, and one concern on a possible memory leak.
prov/verbs/src/verbs_info.c
Outdated
if (ret) | ||
continue; | ||
|
||
ret = fi_ibv_add_rai(verbs_devs, id, rai); | ||
ret = fi_ibv_add_rai(verbs_devs, dev_name, rai); |
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.
I think dev_name leaks memory on failure here.
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.
Thanks, fixed it.
static void fi_ibv_remove_nosrc_info(struct fi_info **info) | ||
{ | ||
struct fi_info **fi = info, *next; | ||
while (*fi && ((*fi)->ep_attr->type == FI_EP_MSG)) { |
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.
This loop assumes that all fi_info structures associated with msg endpoints are grouped together. Is that always the case, even when XRC is used?
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.
Good point. It seems the MSG endpoints may not be grouped together (based on the loop in fi_ibv_init_info) and this function would miss to remove some "no src fi_info". I think the issue wasn't caught since apps are most likely to use the first matching fi_info.
The newer patch would not have this problem as we iterate through the complete list of devices and endpoint types to remove any fi_info that doesn't have IPoIB address configured.
All of the RDMA devices are configured with IPs. If I do a |
2cc5884
to
3fb34d5
Compare
Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
Rather than detecting RDMA capable interfaces on every fi_getinfo call do it once instead as part of the verbs provider initialization (fi_ini). This reduces unnecessary processing. Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
Removing fi_info which doesn't have src_addr set is not needed anymore since the previous commit made a change which avoids adding such info for FI_EP_MSG endpoint type. Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
The previous code wasn't handling IPv6 or other address types. Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
@shefty this PR should be ready to merge once the CI completes. |
LANL CI failure seems to be an irrelevant issue. Merging this. |
This PR removes some technical debt and refactors verbs provider initialization and fi_getinfo to reduce overhead and improve logging.