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

TL/MLX5: Add configuration to set IB QP SL #1057

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/tl/mlx5/tl_mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ static ucc_config_field_t ucc_tl_mlx5_lib_config_table[] = {
ucc_offsetof(ucc_tl_mlx5_lib_config_t, qp_conf.qp_max_atomic),
UCC_CONFIG_TYPE_UINT},

{"QP_SL", "0", "IB QP Service Level",
ucc_offsetof(ucc_tl_mlx5_lib_config_t, qp_conf.qp_sl),
UCC_CONFIG_TYPE_UINT},

{"MCAST_SX_DEPTH", "512", "Send context depth of the Mcast comm",
ucc_offsetof(ucc_tl_mlx5_lib_config_t, mcast_conf.sx_depth),
UCC_CONFIG_TYPE_INT},
Expand Down
1 change: 1 addition & 0 deletions src/components/tl/mlx5/tl_mlx5.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ typedef struct ucc_tl_mlx5_iface {
extern ucc_tl_mlx5_iface_t ucc_tl_mlx5;

typedef struct ucc_tl_mlx5_ib_qp_conf {
uint8_t qp_sl;
uint32_t qp_rnr_retry;
uint32_t qp_rnr_timer;
uint32_t qp_retry_cnt;
Expand Down
4 changes: 3 additions & 1 deletion src/components/tl/mlx5/tl_mlx5_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ ucc_status_t ucc_tl_mlx5_qp_connect(struct ibv_qp *qp, uint32_t qp_num,
qp_attr.min_rnr_timer = qp_conf->qp_rnr_timer;
qp_attr.max_dest_rd_atomic = qp_conf->qp_max_atomic;
qp_attr.ah_attr.dlid = lid;
qp_attr.ah_attr.sl = 0;
qp_attr.ah_attr.sl = qp_conf->qp_sl;
qp_attr.ah_attr.src_path_bits = 0;
qp_attr.ah_attr.port_num = port;

Expand Down Expand Up @@ -199,6 +199,7 @@ ucc_status_t ucc_tl_mlx5_init_dct(struct ibv_pd *pd, struct ibv_context *ctx,
qp_attr_to_rtr.min_rnr_timer = qp_conf->qp_rnr_timer;
qp_attr_to_rtr.ah_attr.port_num = port_num;
qp_attr_to_rtr.ah_attr.is_global = 0;
qp_attr_to_rtr.ah_attr.sl = qp_conf->qp_sl;

attr_ex.qp_type = IBV_QPT_DRIVER;
attr_ex.send_cq = cq;
Expand Down Expand Up @@ -289,6 +290,7 @@ ucc_status_t ucc_tl_mlx5_init_dci(ucc_tl_mlx5_dci_t *dci, struct ibv_pd *pd,
qp_attr_to_rtr.min_rnr_timer = qp_conf->qp_rnr_timer;
qp_attr_to_rtr.ah_attr.port_num = port_num;
qp_attr_to_rtr.ah_attr.is_global = 0;
qp_attr_to_rtr.ah_attr.sl = qp_conf->qp_sl;

qp_attr_to_rts.qp_state = IBV_QPS_RTS;
qp_attr_to_rts.timeout = qp_conf->qp_timeout;
Expand Down
1 change: 1 addition & 0 deletions test/gtest/tl/mlx5/test_tl_mlx5_qps.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class test_tl_mlx5_qp : public test_tl_mlx5 {
qp_conf.qp_retry_cnt = 7;
qp_conf.qp_timeout = 18;
qp_conf.qp_max_atomic = 1;
qp_conf.qp_sl = 1;
}
};

Expand Down
Loading