Skip to content

Commit

Permalink
srx: Add memory registration cb to fi_ops_srx_peer
Browse files Browse the repository at this point in the history
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 <shehataa@ornl.gov>
  • Loading branch information
amirshehataornl committed May 9, 2024
1 parent 162e420 commit ac64828
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/rdma/providers/fi_peer.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,18 @@ 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 {
fi_addr_t addr;
uint64_t tag;
size_t size;
void *context;
uint32_t match_id;
};

struct fi_ops_srx_owner {
Expand All @@ -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 {
Expand Down

0 comments on commit ac64828

Please sign in to comment.