-
Hi, I'm working with @shijin-aws on implementing the peer API to offload shared memory message processing from the EFA provider to the SHM provider. We want some clarification about the use of We want to use one of these fields to point to a struct that contains the data received during an unexpected receive. Which field is better suited for that? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Hi @sunkuamzn The owner_context and peer_context can be used however you want. The owner_context is set by the owner of the srx and can only be used by the owner and the peer_context can only be used by the peer (the one calling into the srx to get a msg). The reason shm uses both is because it can be both an owner and a peer. It uses the owner_context to point to the head rx_entry (this is only for FI_MULTI_RECV). And it uses the peer_context to point to the incoming cmd when posting an unexpected message. |
Beta Was this translation helpful? Give feedback.
-
My understanding after reading SHM's code base is that SHM is using |
Beta Was this translation helpful? Give feedback.
-
@shijin-aws I think the fields were added after the peer API was defined so I guess they didn't make it in there. I will clarify in the man pages. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@aingerson thank you for the quick answer! |
Beta Was this translation helpful? Give feedback.
-
Thanks @aingerson! The man pages also refer to |
Beta Was this translation helpful? Give feedback.
-
@sunkuamzn @shijin-aws Opened #8648 to clarify usage. Let me know if you think that's sufficient! |
Beta Was this translation helpful? Give feedback.
-
PR is merged and the discussion can be closed. |
Beta Was this translation helpful? Give feedback.
Hi @sunkuamzn The owner_context and peer_context can be used however you want. The owner_context is set by the owner of the srx and can only be used by the owner and the peer_context can only be used by the peer (the one calling into the srx to get a msg). The reason shm uses both is because it can be both an owner and a peer. It uses the owner_context to point to the head rx_entry (this is only for FI_MULTI_RECV). And it uses the peer_context to point to the incoming cmd when posting an unexpected message.