Skip to content

Commit

Permalink
prov/efa: Disable resource management when user set FI_OPT_EFA_RNR_RETRY
Browse files Browse the repository at this point in the history
If a user is explicitly asking for a retry count that means they
also want to manage the resources themselves and the EFA provider
should disable resource management to prevent implicit retries.

Also remove the unused function.

Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Nov 19, 2024
1 parent b30ce18 commit 03d7f1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
21 changes: 0 additions & 21 deletions prov/efa/src/rdm/efa_rdm_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,27 +263,6 @@ struct efa_domain *efa_rdm_ep_domain(struct efa_rdm_ep *ep)

void efa_rdm_ep_post_internal_rx_pkts(struct efa_rdm_ep *ep);

/**
* @brief return whether this endpoint should write error cq entry for RNR.
*
* For an endpoint to write RNR completion, two conditions must be met:
*
* First, the end point must be able to receive RNR completion from rdma-core,
* which means rnr_etry must be less then EFA_RNR_INFINITE_RETRY.
*
* Second, the app need to request this feature when opening endpoint
* (by setting info->domain_attr->resource_mgmt to FI_RM_DISABLED).
* The setting was saved as efa_rdm_ep->handle_resource_management.
*
* @param[in] ep endpoint
*/
static inline
bool efa_rdm_ep_should_write_rnr_completion(struct efa_rdm_ep *ep)
{
return (efa_env.rnr_retry < EFA_RNR_INFINITE_RETRY) &&
(ep->handle_resource_management == FI_RM_DISABLED);
}

/*
* @brief: check whether we should use p2p for this transaction
*
Expand Down
1 change: 1 addition & 0 deletions prov/efa/src/rdm/efa_rdm_ep_fiops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,7 @@ static int efa_rdm_ep_setopt(fid_t fid, int level, int optname,
return -FI_ENOSYS;
}
efa_rdm_ep->base_ep.rnr_retry = *(size_t *)optval;
efa_rdm_ep->handle_resource_management = FI_RM_DISABLED;
break;
case FI_OPT_FI_HMEM_P2P:
if (optlen != sizeof(int))
Expand Down

0 comments on commit 03d7f1d

Please sign in to comment.