-
Notifications
You must be signed in to change notification settings - Fork 434
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 interface add #10412
Conversation
src/uct/ib/efa/srd/srd_iface.c
Outdated
qp_init_attr.cap.max_send_sge = 1 + ucs_min(config->super.tx.min_sge, | ||
efa_attr->max_sq_sge - 1); |
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.
seems simpler
qp_init_attr.cap.max_send_sge = 1 + ucs_min(config->super.tx.min_sge, | |
efa_attr->max_sq_sge - 1); | |
qp_init_attr.cap.max_send_sge = ucs_min(config->super.tx.min_sge + 1, | |
efa_attr->max_sq_sge); |
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.
fixed
src/uct/ib/efa/srd/srd_iface.c
Outdated
iface->super.config.max_inl_cqe[UCT_IB_DIR_RX]); | ||
|
||
/* Transition the QP to RTS */ | ||
memset(&qp_attr, 0, sizeof(qp_attr)); |
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.
why not initializing in place as other attrs in this func?
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.
fixed
src/uct/ib/efa/srd/srd_iface.c
Outdated
return status; | ||
} | ||
|
||
memset(&init_attr, 0, sizeof(init_attr)); |
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.
maybe init in place?
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.
fixed
src/uct/ib/efa/srd/srd_iface.c
Outdated
ret = ibv_modify_qp(iface->qp, &qp_attr, | ||
IBV_QP_STATE | IBV_QP_PKEY_INDEX | | ||
IBV_QP_PORT | IBV_QP_QKEY); | ||
if (ret) { |
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.
if (ret) { | |
if (ret != 0) { |
?
or use the same style for all places in this file
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.
fixed
src/uct/ib/efa/srd/srd_iface.c
Outdated
/* TAG */ | ||
iface_attr->cap.tag.rndv.max_zcopy = iface->config.max_get_zcopy; | ||
|
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.
no need to initialize, because SRD does not support tag offload
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 removed
src/uct/ib/efa/srd/srd_iface.c
Outdated
iface_attr->cap.am.max_short = uct_ib_iface_hdr_size( | ||
iface->config.max_inline, sizeof(uct_srd_neth_t)); |
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.
you can move this part to line 313 (when AM short support is checked)
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.
fixed
src/uct/ib/efa/srd/srd_iface.c
Outdated
iface_attr->cap.am.max_short = uct_ib_iface_hdr_size( | ||
md->dev.max_inline_data, sizeof(uct_srd_neth_t)); |
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.
you already initialized on line 300 using different value. What is the correct one?
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.
removed
src/uct/ib/efa/srd/srd_iface.h
Outdated
|
||
#include "srd_def.h" | ||
|
||
/** @file srd_iface.h */ |
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.
why needed?
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.
fixed
src/uct/ib/efa/srd/srd_iface.h
Outdated
#ifndef UCT_SRD_IFACE_H | ||
#define UCT_SRD_IFACE_H | ||
|
||
#include <uct/ib/base/ib_iface.h> |
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.
minor - it is already included in srd_def.h
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.
removed, will rely implicitly on it
src/uct/ib/efa/srd/srd_iface.c
Outdated
memset(&self->tx.wr_inl, 0, sizeof(self->tx.wr_inl)); | ||
self->tx.wr_inl.opcode = IBV_WR_SEND; | ||
self->tx.wr_inl.wr_id = 0xBEEBBEEB; | ||
self->tx.wr_inl.wr.ud.remote_qkey = UCT_IB_KEY; | ||
self->tx.wr_inl.imm_data = 0; | ||
self->tx.wr_inl.next = 0; | ||
self->tx.wr_inl.sg_list = self->tx.sge; | ||
|
||
memset(&self->tx.wr_desc, 0, sizeof(self->tx.wr_desc)); | ||
self->tx.wr_desc.opcode = IBV_WR_SEND; | ||
self->tx.wr_desc.wr_id = 0xFAAFFAAF; | ||
self->tx.wr_desc.wr.ud.remote_qkey = UCT_IB_KEY; | ||
self->tx.wr_desc.imm_data = 0; | ||
self->tx.wr_desc.next = 0; | ||
self->tx.wr_desc.sg_list = self->tx.sge; | ||
self->tx.wr_desc.num_sge = 1; |
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.
we can add it to ud_iface_common.h/c
src/uct/ib/efa/srd/srd_iface.h
Outdated
@@ -12,10 +12,10 @@ | |||
#include <ucs/datastruct/ptr_array.h> | |||
#include <ucs/datastruct/conn_match.h> | |||
|
|||
#include "srd_def.h" |
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.
minor: include local files before the other includes
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.
fixed
src/uct/ib/ud/verbs/ud_verbs.c
Outdated
@@ -790,6 +790,25 @@ ucs_status_t uct_ud_verbs_qp_max_send_sge(uct_ud_verbs_iface_t *iface, | |||
return UCS_OK; | |||
} | |||
|
|||
void uct_ud_iface_send_wr_init(struct ibv_send_wr *wr, struct ibv_sge *sge, |
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.
is it preparation for the next PR?
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.
no, it is already being used where applicable
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.
why not to make it static then?
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.
it is being used in INIT iface function in srd_iface.c
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.
double checking, you are right, there is naming issue.
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.
fixed, thanks!
src/uct/ib/efa/srd/srd_iface.c
Outdated
iface_attr->overhead = 105e-9; | ||
|
||
/* AM */ | ||
|
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.
minor: extra line
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.
fixed
src/uct/ib/ud/verbs/ud_verbs.c
Outdated
@@ -790,6 +790,25 @@ ucs_status_t uct_ud_verbs_qp_max_send_sge(uct_ud_verbs_iface_t *iface, | |||
return UCS_OK; | |||
} | |||
|
|||
void uct_ud_iface_send_wr_init(struct ibv_send_wr *wr, struct ibv_sge *sge, |
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.
why not to make it static then?
What?
Initial add of SRD transport with bare interface instantiation with QP, tested like below.
Depends on #10069 to implement build and testing in CI.
Test