Skip to content

Conversation

shasson5
Copy link
Contributor

What?

Create different flags to store dp_ordering support for DevX and DV API

Why?

In case we use both DevX and DV API for different objects and OOO semantics was selected, we need to make sure it's supported for both.

@shasson5 shasson5 requested review from yosefe and gleon99 August 19, 2025 15:00
@shasson5
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@shasson5
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

gleon99
gleon99 previously approved these changes Aug 26, 2025
@gleon99
Copy link
Contributor

gleon99 commented Sep 8, 2025

@yosefe please review

@shasson5
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 5 pipeline(s).

Copy link
Contributor

@yosefe yosefe left a comment

Choose a reason for hiding this comment

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

also, can we add some test for it, that runs with UCX_IB_MLX5_DEVX=no ?

}

static ucs_status_t
uct_ib_mlx5dv_check_ddp(struct ibv_context *ctx, uct_ib_mlx5_md_t *md);
Copy link
Contributor

Choose a reason for hiding this comment

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

since this function is small, maybe just move it here? instead of forward declaration

Comment on lines +451 to +452
int rc;
int dc;
Copy link
Contributor

Choose a reason for hiding this comment

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

we can make those uint8_t as well

uct_rc_mlx5_dp_ordering_ooo_init(uct_ib_mlx5_md_t *md,
uct_rc_mlx5_iface_common_t *iface,
uct_ib_mlx5_dp_ordering_t dp_ordering_cap,
int ddp_supported_dv,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe rename dp_ordering_cap param to dp_ordering_cap_devx

uint8_t dp_ordering;
uint8_t dp_ordering_devx;
uint8_t dp_ordering_force;
int ddp_enabled_dv;
Copy link
Contributor

Choose a reason for hiding this comment

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

uint8_t

Comment on lines +682 to +686
if ((config->ddp_enable == UCS_YES) && !ddp_supported_dv) {
ucs_error("%s/%s: ddp is not supported for DV",
uct_ib_device_name(&md->super.dev), tl_name);
return UCS_ERR_INVALID_PARAM;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

here we would fail even if UCT_IB_MLX5_MD_FLAG_DEVX is set, and we don't need to fail in this case.
IMO this function should check first if UCT_IB_MLX5_MD_FLAG_DEVX is not set, and in such case handle "dv" flow and set config.dp_ordering_devx/dp_ordering_force to stub values. Otherwise, initialize the devx fields like today and set ddp_enabled_dv to 0.

Comment on lines +688 to +690
iface->config.ddp_enabled_dv = (config->ddp_enable == UCS_NO) ?
0 :
ddp_supported_dv;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
iface->config.ddp_enabled_dv = (config->ddp_enable == UCS_NO) ?
0 :
ddp_supported_dv;
iface->config.ddp_enabled_dv = (config->ddp_enable != UCS_NO) && ddp_supported_dv;

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