Skip to content

Commit

Permalink
prov/efa: Implement the rma interface
Browse files Browse the repository at this point in the history
Rename efa_dgram_rma.c to efa_rma.c and move it to prov/efa/src as
a common RMA interface for both rdm and dgram ep type.
Update that dgram does not support rma.
Implement rdma write and inject. Support inline rdma write.

Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan authored and j-xiong committed Nov 23, 2024
1 parent d5d8694 commit f12f5ea
Show file tree
Hide file tree
Showing 6 changed files with 421 additions and 157 deletions.
2 changes: 1 addition & 1 deletion libfabric.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -885,9 +885,9 @@
<ClCompile Include="prov\efa\src\efa_env.c" />
<ClCompile Include="prov\efa\src\efa_cntr.c" />
<ClCompile Include="prov\efa\src\efa_msg.c" />
<ClCompile Include="prov\efa\src\efa_rma.c" />
<ClCompile Include="prov\efa\src\dgram\efa_dgram_ep.c" />
<ClCompile Include="prov\efa\src\dgram\efa_dgram_cq.c" />
<ClCompile Include="prov\efa\src\dgram\efa_dgram_rma.c" />
<ClCompile Include="prov\efa\src\rdm\efa_rdm_ope.c" />
<ClCompile Include="prov\efa\src\rdm\efa_rdm_rxe_map.c" />
<ClCompile Include="prov\efa\src\rdm\efa_rdm_atomic.c" />
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ _efa_files = \
prov/efa/src/efa_env.c \
prov/efa/src/efa_cntr.c \
prov/efa/src/efa_msg.c \
prov/efa/src/efa_rma.c \
prov/efa/src/dgram/efa_dgram_ep.c \
prov/efa/src/dgram/efa_dgram_cq.c \
prov/efa/src/dgram/efa_dgram_rma.c \
prov/efa/src/rdm/efa_rdm_peer.c \
prov/efa/src/rdm/efa_rdm_cq.c \
prov/efa/src/rdm/efa_rdm_ep_utils.c \
Expand Down
148 changes: 0 additions & 148 deletions prov/efa/src/dgram/efa_dgram_rma.c

This file was deleted.

10 changes: 9 additions & 1 deletion prov/efa/src/efa_base_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ int efa_qp_create(struct efa_qp **qp, struct ibv_qp_init_attr_ex *init_attr_ex,
init_attr_ex);
} else {
assert(init_attr_ex->qp_type == IBV_QPT_DRIVER);
if (efa_device_support_rdma_read())
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_READ;
if (efa_device_support_rdma_write()) {
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_WRITE;
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM;
}
#if HAVE_CAPS_UNSOLICITED_WRITE_RECV
if (efa_rdm_use_unsolicited_write_recv())
efa_attr.flags |= EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV;
Expand Down Expand Up @@ -362,7 +368,9 @@ int efa_base_ep_construct(struct efa_base_ep *base_ep,
base_ep->max_msg_size = info->ep_attr->max_msg_size;
base_ep->max_rma_size = info->ep_attr->max_msg_size;
base_ep->inject_msg_size = info->tx_attr->inject_size;
base_ep->inject_rma_size = info->tx_attr->inject_size;
/* TODO: update inject_rma_size to inline size after firmware
* supports inline rdma write */
base_ep->inject_rma_size = 0;
return 0;
}

Expand Down
Loading

0 comments on commit f12f5ea

Please sign in to comment.