From 64946e7e05f956847c78970c6a07e811ae84e2ee Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Thu, 2 May 2024 17:00:10 -0400 Subject: [PATCH] srx: Add memory registration cb to fi_ops_srx_peer Add a memory registration callback to the fi_ops_srx_peer. This allows core providers to expose a memory registration callback which the parent or peer provider can use to register memory on the receive path. For example the CXI provider registers memory with the NIC on the receive path. When using the peer infrastructure this can not happen because we do not know which provider will perform the receive operation. But if the source NID is specified then we can know and therefore we can perform the receive buffer registration at the top of the receive path. Signed-off-by: Amir Shehata --- include/rdma/providers/fi_peer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/rdma/providers/fi_peer.h b/include/rdma/providers/fi_peer.h index 98bff10852e..9968027c3aa 100644 --- a/include/rdma/providers/fi_peer.h +++ b/include/rdma/providers/fi_peer.h @@ -173,8 +173,10 @@ struct fi_peer_rx_entry { size_t count; void **desc; void *peer_context; + void *peer_md; void *owner_context; struct iovec *iov; + uint32_t match_id; }; struct fi_peer_match { @@ -182,6 +184,7 @@ struct fi_peer_match { uint64_t tag; size_t size; void *context; + uint32_t match_id; }; struct fi_ops_srx_owner { @@ -207,6 +210,8 @@ struct fi_ops_srx_peer { int (*discard_msg)(struct fi_peer_rx_entry *entry); int (*discard_tag)(struct fi_peer_rx_entry *entry); int (*addr_match)(fi_addr_t addr, struct fi_peer_match *match); + int (*mem_reg)(struct fid_ep *ep, struct iovec *iov, fi_addr_t addr, + void **md, uint32_t *match_id); }; struct fid_peer_srx {