From 754236223a8fd2b6c72be40ffa7ba8c8411182e9 Mon Sep 17 00:00:00 2001 From: Seth Zegelstein Date: Fri, 29 Dec 2023 23:44:38 +0000 Subject: [PATCH] prov/efa: efa_rdm_ep_record_tx_op_submitted() rm peer lookup 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 --- prov/efa/src/rdm/efa_rdm_ep_utils.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/prov/efa/src/rdm/efa_rdm_ep_utils.c b/prov/efa/src/rdm/efa_rdm_ep_utils.c index 6e26a6b5c12..64528ab2293 100644 --- a/prov/efa/src/rdm/efa_rdm_ep_utils.c +++ b/prov/efa/src/rdm/efa_rdm_ep_utils.c @@ -338,7 +338,6 @@ 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; @@ -346,15 +345,14 @@ void efa_rdm_ep_record_tx_op_submitted(struct efa_rdm_ep *ep, struct efa_rdm_pke * 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++;