[libfabric-users] How to know which buffer corresponds to a completion entry

Hefty, Sean sean.hefty at intel.com
Thu Mar 19 09:17:13 PDT 2020


> The problem is, when the completion queue yields the server has no idea
> what "send" buffer is now free to use.
> 
> I'm using "FI_CQ_FORMAT_MSG" with "fi_cq_readfrom" to know which client
> the server should respond to, but the address is always 0 when the
> completion is flagged "FI_SEND".  I also tried to use
> "FI_CQ_FORMAT_DATA" to match the buffer address with the one from the
> completion entry, but "FI_SEND"-flagged entries have "buf == null".
> 
> Tested with verbs;ofi_rxm and UDP;ofi_rxd.
> 
> Should I create a completion queue for each client?  Or is there a way
> for the server to know which buffer can be reused after a completion?

You should provide a context field with the fi_send() call which references the buffer somehow.  That context will be returned as part of the completion.

- Sean


More information about the Libfabric-users mailing list