Skip to content

Commit 03d7f1d

Browse files
committed
prov/efa: Disable resource management when user set FI_OPT_EFA_RNR_RETRY
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]>
1 parent b30ce18 commit 03d7f1d

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

prov/efa/src/rdm/efa_rdm_ep.h

-21
Original file line numberDiff line numberDiff line change
@@ -263,27 +263,6 @@ struct efa_domain *efa_rdm_ep_domain(struct efa_rdm_ep *ep)
263263

264264
void efa_rdm_ep_post_internal_rx_pkts(struct efa_rdm_ep *ep);
265265

266-
/**
267-
* @brief return whether this endpoint should write error cq entry for RNR.
268-
*
269-
* For an endpoint to write RNR completion, two conditions must be met:
270-
*
271-
* First, the end point must be able to receive RNR completion from rdma-core,
272-
* which means rnr_etry must be less then EFA_RNR_INFINITE_RETRY.
273-
*
274-
* Second, the app need to request this feature when opening endpoint
275-
* (by setting info->domain_attr->resource_mgmt to FI_RM_DISABLED).
276-
* The setting was saved as efa_rdm_ep->handle_resource_management.
277-
*
278-
* @param[in] ep endpoint
279-
*/
280-
static inline
281-
bool efa_rdm_ep_should_write_rnr_completion(struct efa_rdm_ep *ep)
282-
{
283-
return (efa_env.rnr_retry < EFA_RNR_INFINITE_RETRY) &&
284-
(ep->handle_resource_management == FI_RM_DISABLED);
285-
}
286-
287266
/*
288267
* @brief: check whether we should use p2p for this transaction
289268
*

prov/efa/src/rdm/efa_rdm_ep_fiops.c

+1
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,7 @@ static int efa_rdm_ep_setopt(fid_t fid, int level, int optname,
16971697
return -FI_ENOSYS;
16981698
}
16991699
efa_rdm_ep->base_ep.rnr_retry = *(size_t *)optval;
1700+
efa_rdm_ep->handle_resource_management = FI_RM_DISABLED;
17001701
break;
17011702
case FI_OPT_FI_HMEM_P2P:
17021703
if (optlen != sizeof(int))

0 commit comments

Comments
 (0)