Skip to content

Commit 5a10e82

Browse files
committed
prov/efa: Implement the rma interface
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]>
1 parent 08648bf commit 5a10e82

File tree

6 files changed

+411
-157
lines changed

6 files changed

+411
-157
lines changed

libfabric.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,9 @@
885885
<ClCompile Include="prov\efa\src\efa_env.c" />
886886
<ClCompile Include="prov\efa\src\efa_cntr.c" />
887887
<ClCompile Include="prov\efa\src\efa_msg.c" />
888+
<ClCompile Include="prov\efa\src\efa_rma.c" />
888889
<ClCompile Include="prov\efa\src\dgram\efa_dgram_ep.c" />
889890
<ClCompile Include="prov\efa\src\dgram\efa_dgram_cq.c" />
890-
<ClCompile Include="prov\efa\src\dgram\efa_dgram_rma.c" />
891891
<ClCompile Include="prov\efa\src\rdm\efa_rdm_ope.c" />
892892
<ClCompile Include="prov\efa\src\rdm\efa_rdm_rxe_map.c" />
893893
<ClCompile Include="prov\efa\src\rdm\efa_rdm_atomic.c" />

prov/efa/Makefile.include

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ _efa_files = \
4848
prov/efa/src/efa_env.c \
4949
prov/efa/src/efa_cntr.c \
5050
prov/efa/src/efa_msg.c \
51+
prov/efa/src/efa_rma.c \
5152
prov/efa/src/dgram/efa_dgram_ep.c \
5253
prov/efa/src/dgram/efa_dgram_cq.c \
53-
prov/efa/src/dgram/efa_dgram_rma.c \
5454
prov/efa/src/rdm/efa_rdm_peer.c \
5555
prov/efa/src/rdm/efa_rdm_cq.c \
5656
prov/efa/src/rdm/efa_rdm_ep_utils.c \

prov/efa/src/dgram/efa_dgram_rma.c

-148
This file was deleted.

prov/efa/src/efa_base_ep.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ int efa_qp_create(struct efa_qp **qp, struct ibv_qp_init_attr_ex *init_attr_ex,
186186
init_attr_ex);
187187
} else {
188188
assert(init_attr_ex->qp_type == IBV_QPT_DRIVER);
189+
if (efa_device_support_rdma_read())
190+
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_READ;
191+
if (efa_device_support_rdma_write()) {
192+
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_WRITE;
193+
init_attr_ex->send_ops_flags |= IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM;
194+
}
189195
#if HAVE_CAPS_UNSOLICITED_WRITE_RECV
190196
if (efa_rdm_use_unsolicited_write_recv())
191197
efa_attr.flags |= EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV;
@@ -362,7 +368,9 @@ int efa_base_ep_construct(struct efa_base_ep *base_ep,
362368
base_ep->max_msg_size = info->ep_attr->max_msg_size;
363369
base_ep->max_rma_size = info->ep_attr->max_msg_size;
364370
base_ep->inject_msg_size = info->tx_attr->inject_size;
365-
base_ep->inject_rma_size = info->tx_attr->inject_size;
371+
/* TODO: update inject_rma_size to inline size after firmware
372+
* supports inline rdma write */
373+
base_ep->inject_rma_size = 0;
366374
return 0;
367375
}
368376

0 commit comments

Comments
 (0)