From dbc685d8cb8c7c92cfc9abd3aac1a4ac35fb56b9 Mon Sep 17 00:00:00 2001 From: Alexia Ingerson Date: Wed, 14 Aug 2024 10:34:29 -0700 Subject: [PATCH] man/fi_peer: update peer fid initialization language Add clarification in the man page indicating that the owner is responsible for creating unique fi_peer_*_contexts for each peer and that the peers are only allowed to set the peer ops of that context. Signed-off-by: Alexia Ingerson --- man/fi_peer.3.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man/fi_peer.3.md b/man/fi_peer.3.md index 0dc4dd43077..fc58c16f507 100644 --- a/man/fi_peer.3.md +++ b/man/fi_peer.3.md @@ -83,6 +83,20 @@ similar, independent from the object being shared. However, because the goal of using peer providers is to avoid overhead, providers must be explicitly written to support the peer provider mechanisms. +When importing any shared fabric object into a peer, the owner will create a +separate fid_peer_* for each peer provider it intends to import into. The owner +will pass this unique fid_peer_* into each peer through the context parameter of +the init call for the resource (i.e. fi_cq_open, fi_srx_context, fi_cntr_open, +etc). The fi_peer_*_context will indicate the owner-allocated fid_peer_* for +the peer to use but is temporary for the init call and may not be accessed by +the peer after initialization. The peer will set just the peer_ops of the +owner-allocated fid and save a reference to the imported fid_peer_* for use in +the peer API flow. The peer will allocate its own fid for internal uses and +return that fid to the owner through the regular fid parameter of the init call +(as if it were just another opened resource). The owner is responsible for +saving the returned peer fid from the open call in order to close it later +(or to drive progress in the case of the cq_fid). + There are two peer provider models. In the example listed above, both peers are full providers in their own right and usable in a stand-alone fashion. In a second model, one of the peers is known as an offload provider. An