Skip to content

Commit

Permalink
prov/efa: efa_rdm_ep_record_tx_op_submitted() rm peer lookup
Browse files Browse the repository at this point in the history
Since all EFA send operations use a txe, we can remove the peer lookup
from the critical path offering a performance improvement to all EFA
sends.

Signed-off-by: Seth Zegelstein <szegel@amazon.com>
  • Loading branch information
a-szegel committed Dec 30, 2023
1 parent f7d83de commit 7542362
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions prov/efa/src/rdm/efa_rdm_ep_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,23 +338,21 @@ struct efa_rdm_ope *efa_rdm_ep_alloc_txe(struct efa_rdm_ep *efa_rdm_ep,
*/
void efa_rdm_ep_record_tx_op_submitted(struct efa_rdm_ep *ep, struct efa_rdm_pke *pkt_entry)
{
struct efa_rdm_peer *peer;
struct efa_rdm_ope *ope;

ope = pkt_entry->ope;
/*
* peer can be NULL when the pkt_entry is a RMA_CONTEXT_PKT,
* and the RMA is a local read toward the endpoint itself
*/
peer = efa_rdm_ep_get_peer(ep, pkt_entry->addr);
if (peer)
if (ope->peer)
dlist_insert_tail(&pkt_entry->entry,
&peer->outstanding_tx_pkts);
&ope->peer->outstanding_tx_pkts);

assert(pkt_entry->alloc_type == EFA_RDM_PKE_FROM_EFA_TX_POOL);
ep->efa_outstanding_tx_ops++;
if (peer)
peer->efa_outstanding_tx_ops++;
if (ope->peer)
ope->peer->efa_outstanding_tx_ops++;

if (ope)
ope->efa_outstanding_tx_ops++;
Expand Down

0 comments on commit 7542362

Please sign in to comment.