Skip to content
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

UCT/IB/EFA/SRD: Initial add of endpoint #10447

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

tvegas1
Copy link
Contributor

@tvegas1 tvegas1 commented Jan 23, 2025

What?

Add initial SRD endpoint creation.

src/uct/ib/efa/srd/srd_ep.c Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.c Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.h Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_iface.c Outdated Show resolved Hide resolved
brminich
brminich previously approved these changes Jan 27, 2025
src/uct/ib/efa/srd/srd_def.h Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.c Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.c Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.c Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.c Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.h Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.h Outdated Show resolved Hide resolved
src/uct/ib/efa/srd/srd_ep.h Outdated Show resolved Hide resolved
void uct_srd_iface_remove_ep(uct_srd_iface_t *iface, uct_srd_ep_t *ep);

ucs_status_t uct_srd_iface_unpack_peer_address(uct_srd_iface_t *iface,
const uct_ib_address_t *ib_addr,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indented

Comment on lines +628 to +634
/**
* Instantiate the parametrized test case for the SRD transports
*
* @param _test_case Test case class, derived from uct_test.
*/
#define UCT_INSTANTIATE_SRD_TEST_CASE(_test_case) \
_UCT_INSTANTIATE_TEST_CASE(_test_case, srd)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need such macro if we plan to add it to UCT_INSTANTIATE_TEST_CASE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we most likely will end-up having to add srd specific tests cases (as there are ud and rc TC)

Comment on lines 71 to 91
if (ucs_test_all_flags(params->field_mask,
UCT_EP_PARAM_FIELD_DEV_ADDR |
UCT_EP_PARAM_FIELD_IFACE_ADDR)) {

self->conn_sn = ucs_atomic_fadd64(&uct_srd_ep_conn_sn, 1);

/* Connect it to the interface */
status = uct_srd_ep_connect_to_iface(self, ib_addr, if_addr);
if (status != UCS_OK) {
goto err_ep_destroy;
}

/* Generate peer address */
status = uct_srd_iface_unpack_peer_address(iface, ib_addr, if_addr,
self->path_index,
&self->peer_address);
if (status != UCS_OK) {
goto err_ep_destroy;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor:

Suggested change
if (ucs_test_all_flags(params->field_mask,
UCT_EP_PARAM_FIELD_DEV_ADDR |
UCT_EP_PARAM_FIELD_IFACE_ADDR)) {
self->conn_sn = ucs_atomic_fadd64(&uct_srd_ep_conn_sn, 1);
/* Connect it to the interface */
status = uct_srd_ep_connect_to_iface(self, ib_addr, if_addr);
if (status != UCS_OK) {
goto err_ep_destroy;
}
/* Generate peer address */
status = uct_srd_iface_unpack_peer_address(iface, ib_addr, if_addr,
self->path_index,
&self->peer_address);
if (status != UCS_OK) {
goto err_ep_destroy;
}
}
if (!ucs_test_all_flags(params->field_mask,
UCT_EP_PARAM_FIELD_DEV_ADDR |
UCT_EP_PARAM_FIELD_IFACE_ADDR)) {
return UCS_OK;
}
self->conn_sn = ucs_atomic_fadd64(&uct_srd_ep_conn_sn, 1);
/* Connect it to the interface */
status = uct_srd_ep_connect_to_iface(self, ib_addr, if_addr);
if (status != UCS_OK) {
goto err_ep_destroy;
}
/* Generate peer address */
status = uct_srd_iface_unpack_peer_address(iface, ib_addr, if_addr,
self->path_index,
&self->peer_address);
if (status != UCS_OK) {
goto err_ep_destroy;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

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.

3 participants