Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Support multiple auth keys per EP
fi_domain_attr::max_ep_auth_key_cnt is used to reported the number of authorization keys supported by an endpoint. If this value is non-zero, connectionless endpoints must implement FI_AV_AUTH_KEY. FI_AV_AUTH_KEY is set by libfabric users via fi_domain_attr:::auth_key_size to denoted if MR and EP authorization keys from the AV instead of MR and EP attrs. When set, providers will ignore fi_ep_attr::auth_key during endpoint enable. From MRs, fi_mr_regattr() must be used with fi_mr_attr::auth_key pointing to a struct fi_mr_auth_key and fi_mr_attr:auth_key_size equal to sizeof(struct fi_mr_auth_key). fi_mr_auth_key::av should point to the AV the MR authorization keys should come from. If FI_DIRECTED_RECV is supported, fi_mr_auth_key::key is used to restrict the MR to a specific authorization key. All eligible authorization keys must be pre-inserted into the AV via fi_av_insert_auth_key(). Acceptable flags are the following: - FI_TRANSMIT: Restrict the authorization key to outbound data transfers. This includes send message, RMA, and atomic operations. - FI_RECV: Restrict the authorization key to inbound data transfers. This includes received messages and target MRs of RMA and atomic operations. fi_av_insert_auth_key() output is an fi_addr_t handle specific to this authorization key. If the EP is configured with FI_DIRECTED_RECV, this fi_addr_t can be used to match all EP addrs associated with this authorization key. Calling fi_av_remove() with this fi_addr_t will delete the authorization key. -FI_EBUSY will be returned from fi_av_remove() should this key still be used by en EP. In other words, all EPs using this authorization key need to be closed for fi_av_remove() to succeed. Once the AV is bound to an EP and the EP is successfully enabled, the EP will be configured to support all auth keys in the AV at that point in time. Users must provide an authorization key fi_addr_t with fi_av_insert_{addr, svc, sym}. This is done by using the fi_addr as input. For fi_av_insert_{addr, sym}, since fi_addr may be an array, only index 0 will be looked at for the authorization key fi_addr_t. That is only a single authorization key fi_addr_t will be supported for these functions. The output of fi_av_insert_{addr, svc, sym} is an fi_addr_t mapping to a specific <EP addr, auth_key> tuple. For FI_EADDRNOTAVAIL CQ errors, fi_cq_err_entry::src_addr will return the authorization key handle associated with the incoming data transfer. This, combined with the existing behavior of fi_cq_err_entry::err_data enables users to generate a fi_addr_t mapping to the specific <EP addr, auth_key> tuple which triggered the FI_EADDRNOTAVAIL event. Signed-off-by: Ian Ziemba <[email protected]>
- Loading branch information