From a309bc2896765423e048d7d204a24f5332e211df Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Fri, 30 Jun 2023 04:41:14 +0000 Subject: [PATCH] prov/efa: fix rxr in comments and documents Replace the term RXR will proper terms in comments and documents Signed-off-by: Wei Zhang --- prov/efa/docs/pkt-processing.md | 4 ++-- prov/efa/src/efa_av.c | 2 +- prov/efa/src/efa_mr.c | 5 ----- prov/efa/src/efa_user_info.c | 2 +- prov/efa/src/rdm/efa_rdm_ep.h | 6 +++--- prov/efa/src/rdm/efa_rdm_ep_progress.c | 2 +- prov/efa/src/rdm/efa_rdm_msg.c | 2 +- prov/efa/src/rdm/efa_rdm_msg.h | 2 +- prov/efa/src/rdm/efa_rdm_ope.c | 11 +++++------ prov/efa/src/rdm/efa_rdm_pke.c | 2 +- prov/efa/src/rdm/efa_rdm_pke_cmd.c | 8 ++++---- prov/efa/src/rdm/efa_rdm_pke_nonreq.c | 4 ++-- prov/efa/src/rdm/efa_rdm_pke_rta.c | 2 +- prov/efa/src/rdm/efa_rdm_pke_rtm.c | 2 +- prov/efa/src/rdm/efa_rdm_pke_utils.c | 8 ++++---- prov/efa/src/rdm/efa_rdm_util.c | 2 +- prov/efa/test/efa_unit_test_ep.c | 16 ++++++++-------- 17 files changed, 37 insertions(+), 43 deletions(-) diff --git a/prov/efa/docs/pkt-processing.md b/prov/efa/docs/pkt-processing.md index eb5479960cc..fae6644f000 100644 --- a/prov/efa/docs/pkt-processing.md +++ b/prov/efa/docs/pkt-processing.md @@ -50,7 +50,7 @@ store state about a send or receive to be acted on later. The first case is control messages that have to be queued, for example, we may send parts of a message and then hit the device limit when sending a segmented, medium message, or fail to send a control packet containing information that -can't be reconstructed in the future. `rxr_pkt_post_ctrl_or_queue` handles +can't be reconstructed in the future. `efa_rdm_ope_post_send_or_queue` handles those cases. We also may queue an rxe/te if we're unable to continue sending segments @@ -76,6 +76,6 @@ retransmit we start random exponential backoff for that peer. We stop sending to that peer until the peer exits backoff, meaning we either received a successful send completion for that peer or the backoff timer expires. -See `rxr_cq_queue_rnr_pkt` for where the packets are queued and backoff timers are +See `efa_rdm_ep_queue_rnr_pkt` for where the packets are queued and backoff timers are set, and see `efa_rdm_ep_check_peer_backoff_timer` for where those timers are checked and we allow sends to that remote peer again. diff --git a/prov/efa/src/efa_av.c b/prov/efa/src/efa_av.c index fa64e99083f..af99fcb9660 100644 --- a/prov/efa/src/efa_av.c +++ b/prov/efa/src/efa_av.c @@ -920,7 +920,7 @@ int efa_av_open(struct fid_domain *domain_fid, struct fi_av_attr *attr, return -FI_ENOSYS; /* - * TODO: remove me once RxR supports resizing members tied to the AV + * TODO: remove me once EFA RDM endpoint supports resizing members tied to the AV * size. */ if (!attr->count) diff --git a/prov/efa/src/efa_mr.c b/prov/efa/src/efa_mr.c index 44bc4f6efd3..fce84a2f4b0 100644 --- a/prov/efa/src/efa_mr.c +++ b/prov/efa/src/efa_mr.c @@ -222,11 +222,6 @@ static int efa_mr_hmem_setup(struct efa_mr *efa_mr, } if (efa_mr->domain->util_domain.info_domain_caps & FI_HMEM) { - /* - * Skipping the domain type check above is okay here since - * util_domain is at the beginning of both efa_domain and - * rxr_domain. - */ if (efa_mr->domain->hmem_info[attr->iface].initialized) { efa_mr->peer.iface = attr->iface; } else { diff --git a/prov/efa/src/efa_user_info.c b/prov/efa/src/efa_user_info.c index b38b1e36b21..8eef343d9d0 100644 --- a/prov/efa/src/efa_user_info.c +++ b/prov/efa/src/efa_user_info.c @@ -573,7 +573,7 @@ int efa_user_info_get_rdm(uint32_t version, const char *node, /* If application asked for FI_REMOTE_COMM but not FI_LOCAL_COMM, it * does not want to use shm. In this case, we honor the request by - * unsetting the FI_LOCAL_COMM flag in info. This way rxr_endpoint() + * unsetting the FI_LOCAL_COMM flag in info. This way efa_rdm_ep_open() * should disable shm transfer for the endpoint */ if (hints && hints->caps & FI_REMOTE_COMM && !(hints->caps & FI_LOCAL_COMM)) diff --git a/prov/efa/src/rdm/efa_rdm_ep.h b/prov/efa/src/rdm/efa_rdm_ep.h index c5717542b13..11de51949d1 100644 --- a/prov/efa/src/rdm/efa_rdm_ep.h +++ b/prov/efa/src/rdm/efa_rdm_ep.h @@ -89,7 +89,7 @@ struct efa_rdm_ep { struct fid_ep *shm_ep; /* - * RxR rx/tx queue sizes. These may be different from the core + * EFA RDM endpoint rx/tx queue sizes. These may be different from the core * provider's rx/tx size and will either limit the number of possible * receives/sends or allow queueing. */ @@ -124,7 +124,7 @@ struct efa_rdm_ep { /* Applicaiton's message prefix size. */ size_t msg_prefix_size; - /* RxR protocol's max header size */ + /* EFA RDM protocol's max header size */ size_t max_proto_hdr_size; /* tx iov limit of EFA device */ @@ -146,7 +146,7 @@ struct efa_rdm_ep { int rx_readcopy_pkt_pool_used; int rx_readcopy_pkt_pool_max_used; - /* datastructure to maintain rxr send/recv states */ + /* datastructure to maintain send/recv states */ struct ofi_bufpool *ope_pool; /* data structure to maintain pkt rx map */ struct ofi_bufpool *map_entry_pool; diff --git a/prov/efa/src/rdm/efa_rdm_ep_progress.c b/prov/efa/src/rdm/efa_rdm_ep_progress.c index 61875aa1465..f3fde10ab46 100644 --- a/prov/efa/src/rdm/efa_rdm_ep_progress.c +++ b/prov/efa/src/rdm/efa_rdm_ep_progress.c @@ -200,7 +200,7 @@ void efa_rdm_ep_progress_post_internal_rx_pkts(struct efa_rdm_ep *ep) * * If application did not post any receive buffer, * we post one internal buffer so endpoint can - * receive RxR control packets such as handshake. + * receive control packets such as handshake. * * If buffers have posted to the device, we do NOT * repost internal buffers to maximize the chance diff --git a/prov/efa/src/rdm/efa_rdm_msg.c b/prov/efa/src/rdm/efa_rdm_msg.c index 7485dce61ce..9855577008d 100644 --- a/prov/efa/src/rdm/efa_rdm_msg.c +++ b/prov/efa/src/rdm/efa_rdm_msg.c @@ -1066,7 +1066,7 @@ ssize_t efa_rdm_msg_trecvmsg(struct fid_ep *ep_fid, const struct fi_msg_tagged * } /** - * Ops structures used by rxr_endpoint() + * Ops structures used by #efa_rdm_ep_open() */ struct fi_ops_msg efa_rdm_msg_ops = { .size = sizeof(struct fi_ops_msg), diff --git a/prov/efa/src/rdm/efa_rdm_msg.h b/prov/efa/src/rdm/efa_rdm_msg.h index 0c819081ea0..f247494304b 100644 --- a/prov/efa/src/rdm/efa_rdm_msg.h +++ b/prov/efa/src/rdm/efa_rdm_msg.h @@ -63,7 +63,7 @@ struct efa_rdm_ope *efa_rdm_msg_split_rxe(struct efa_rdm_ep *ep, struct efa_rdm_pke *pkt_entry); /* * The following 2 OP structures are defined in efa_rdm_msg.c and is - * used by rxr_endpoint() + * used by #efa_rdm_ep_open() */ extern struct fi_ops_msg efa_rdm_msg_ops; diff --git a/prov/efa/src/rdm/efa_rdm_ope.c b/prov/efa/src/rdm/efa_rdm_ope.c index 177ba85d958..1226192f8c5 100644 --- a/prov/efa/src/rdm/efa_rdm_ope.c +++ b/prov/efa/src/rdm/efa_rdm_ope.c @@ -863,7 +863,7 @@ void efa_rdm_rxe_report_completion(struct efa_rdm_ope *rxe) * * There are two situations that txe should not write CQ entry: * - * 1. there are RXR_NO_COMPLETEION flag in txe->fi_flags, which + * 1. there are EFA_RDM_OPE_NO_COMPLETEION flag in txe->fi_flags, which * is because this txe is for an emulated inject operation * * 2. user does not want CQ entry for this operation, this behavior @@ -979,7 +979,7 @@ void efa_rdm_txe_report_completion(struct efa_rdm_ope *txe) * of all the packets that contains data. * * In both cases, the "all data has been send" event mark the end of the operation, - * therefore this function will call rxr_tx/rx_ope_report_completion(), and + * therefore this function will call efa_rdm_txe/ope_report_completion(), and * release the ope * * @param[in] ope inforatminon of op entry that sends data @@ -1133,7 +1133,7 @@ void efa_rdm_ope_handle_recv_completed(struct efa_rdm_ope *ope) * If EOR is inflight, the rxe cannot be released because the rxe * is needed to handle the send completion of the EOR. * - * see #rxr_pkt_handle_eor_send_completion + * see #efa_rdm_pke_handle_eor_send_completion */ if (ope->internal_flags & EFA_RDM_RXE_EOR_IN_FLIGHT) { return; @@ -1736,12 +1736,11 @@ ssize_t efa_rdm_ope_post_send(struct efa_rdm_ope *ope, int pkt_type) /** * @brief post packet(s) according to packet type. Queue the post if -FI_EAGAIN is encountered. * - * This function will cal efa_rdm_ope_post_send() to post packet(s) according to packet type. + * This function will call efa_rdm_ope_post_send() to post packet(s) according to packet type. * If efa_rdm_ope_post_send() returned -FI_EAGAIN, this function will put the txe in efa_rdm_ep's * queued_ctrl_list. The progress engine will try to post the packet later. * - * This function is called by rxr_pkt_post_req() to post MEDIUM RTM packets, and is - * called by packet handler to post responsive ctrl packet (such as EOR and CTS). + * This function is mainly used by packet handler to post responsive ctrl packet (such as EOR and CTS). * * @param[in] ope pointer to efa_rdm_ope. (either a txe or an rxe) * @param[in] pkt_type packet type. diff --git a/prov/efa/src/rdm/efa_rdm_pke.c b/prov/efa/src/rdm/efa_rdm_pke.c index cd54daabd42..9edf60bcd6d 100644 --- a/prov/efa/src/rdm/efa_rdm_pke.c +++ b/prov/efa/src/rdm/efa_rdm_pke.c @@ -592,7 +592,7 @@ int efa_rdm_pke_write(struct efa_rdm_ep *ep, struct efa_rdm_pke *pkt_entry, /** * @brief Post receive requests to EFA device * - * @param[in] ep rxr endpoint + * @param[in] ep EFA rdm endpoint * @param[in] pkt_entry packet entries that contains information of receive buffer * @param[in] desc Memory registration key * @param[in] flags flags to be applied to the receive operation diff --git a/prov/efa/src/rdm/efa_rdm_pke_cmd.c b/prov/efa/src/rdm/efa_rdm_pke_cmd.c index fae8bd238da..4173f02d3b4 100644 --- a/prov/efa/src/rdm/efa_rdm_pke_cmd.c +++ b/prov/efa/src/rdm/efa_rdm_pke_cmd.c @@ -977,12 +977,12 @@ void efa_rdm_pke_print_handshake(char *prefix, struct efa_rdm_handshake_hdr *handshake_hdr) { EFA_DBG(FI_LOG_EP_DATA, - "%s RxR HANDSHAKE packet - version: %" PRIu8 + "%s EFA RDM HANDSHAKE packet - version: %" PRIu8 " flags: %x\n", prefix, handshake_hdr->version, handshake_hdr->flags); EFA_DBG(FI_LOG_EP_DATA, - "%s RxR HANDSHAKE packet, nextra_p3: %d\n", + "%s EFA RDM HANDSHAKE packet, nextra_p3: %d\n", prefix, handshake_hdr->nextra_p3); } @@ -990,7 +990,7 @@ static void efa_rdm_pke_print_cts(char *prefix, struct efa_rdm_cts_hdr *cts_hdr) { EFA_DBG(FI_LOG_EP_DATA, - "%s RxR CTS packet - version: %" PRIu8 + "%s EFA RDM CTS packet - version: %" PRIu8 " flags: %x tx_id: %" PRIu32 " rx_id: %" PRIu32 " window: %" PRIu64 @@ -1012,7 +1012,7 @@ void efa_rdm_pke_print_data(char *prefix, struct efa_rdm_pke *pkt_entry) data_hdr = efa_rdm_pke_get_ctsdata_hdr(pkt_entry); EFA_DBG(FI_LOG_EP_DATA, - "%s RxR DATA packet - version: %" PRIu8 + "%s EFA RDM CTSDATA packet - version: %" PRIu8 " flags: %x rx_id: %" PRIu32 " seg_size: %" PRIu64 " seg_offset: %" PRIu64 diff --git a/prov/efa/src/rdm/efa_rdm_pke_nonreq.c b/prov/efa/src/rdm/efa_rdm_pke_nonreq.c index 28321fff338..82d5cd72db2 100644 --- a/prov/efa/src/rdm/efa_rdm_pke_nonreq.c +++ b/prov/efa/src/rdm/efa_rdm_pke_nonreq.c @@ -318,9 +318,9 @@ void efa_rdm_pke_proc_ctsdata(struct efa_rdm_pke *pkt_entry, ope->window -= seg_size; #if ENABLE_DEBUG - /* ope can be released by rxr_pkt_copy_ctsdata_to_ope + /* ope can be released by #efa_rdm_pke_copy_payload_to_ope * so the call to dlist_remove must happen before - * call to rxr_copy_ctsdata_to_ope + * call to #efa_rdm_pke_copy_payload_to_ope */ if (all_received) { dlist_remove(&ope->pending_recv_entry); diff --git a/prov/efa/src/rdm/efa_rdm_pke_rta.c b/prov/efa/src/rdm/efa_rdm_pke_rta.c index 19e491d353d..0b1c59080d6 100644 --- a/prov/efa/src/rdm/efa_rdm_pke_rta.c +++ b/prov/efa/src/rdm/efa_rdm_pke_rta.c @@ -150,7 +150,7 @@ struct efa_rdm_ope *efa_rdm_pke_alloc_rta_rxe(struct efa_rdm_pke *pkt_entry, int * response_data is not reproducible. * Because sending response packet can fail due to * -FI_EAGAIN, we need a buffer to hold response_data. - * The buffer will be release in rxr_handle_atomrsp_send_completion() + * The buffer will be release in efa_rdm_pke_handle_atomrsp_send_completion() */ rxe->atomrsp_data = ofi_buf_alloc(pkt_entry->ep->rx_atomrsp_pool); if (!rxe->atomrsp_data) { diff --git a/prov/efa/src/rdm/efa_rdm_pke_rtm.c b/prov/efa/src/rdm/efa_rdm_pke_rtm.c index 7aa76b7069e..73cfdf5602c 100644 --- a/prov/efa/src/rdm/efa_rdm_pke_rtm.c +++ b/prov/efa/src/rdm/efa_rdm_pke_rtm.c @@ -1179,7 +1179,7 @@ ssize_t efa_rdm_pke_proc_matched_longread_rtm(struct efa_rdm_pke *pkt_entry) * only thing left that need to be set is tag * * @param[out] pkt_entry pkt_entry to be initialzied - * @param[in] pkt_type RXR_RUNREAD_MSGRTM or EFA_RDM_RUNTREAD_TAGRTM + * @param[in] pkt_type EFA_RDM_RUNREAD_MSGRTM or EFA_RDM_RUNTREAD_TAGRTM * @param[in] txe contains information of the send operation * @param[in] segment_offset data offset in repect of user buffer * @param[in] data_size data size in the unit of bytes diff --git a/prov/efa/src/rdm/efa_rdm_pke_utils.c b/prov/efa/src/rdm/efa_rdm_pke_utils.c index 7773b566ada..c5b3ba1d53a 100644 --- a/prov/efa/src/rdm/efa_rdm_pke_utils.c +++ b/prov/efa/src/rdm/efa_rdm_pke_utils.c @@ -401,15 +401,15 @@ int efa_rdm_pke_copy_payload_to_cuda(struct efa_rdm_pke *pke, * If memory is on cuda GPU, and gdrcopy is not available, this function * will post a local read request to copy data. (This is because NCCL forbids its * plugin to make cuda calls). In this case, the data is not copied upon return of - * this function, and the function rxr_pkt_handle_copied() is not called. It will + * this function, and the function efa_rdm_pke_handle_data_copied() is not called. It will * be called upon the completion of local read operation by the progress engine. * - * Otherwise, this function calls efa_pke_copy_payload_to_hmem(), which will batch - * multiple copies, and perform the copy (then call rxr_pkt_handle_copied()) together + * Otherwise, this function calls efa_rdm_pke_copy_payload_to_hmem(), which will batch + * multiple copies, and perform the copy (then call efa_rdm_pke_handle_data_copied()) together * to improve performance. * * When application's receive buffer is on host, data is copied immediately, and - * rxr_pkt_handle_copied() is called. + * efa_rdm_pke_handle_data_copied() is called. * * * @param[in] pke the packet entry that contains data diff --git a/prov/efa/src/rdm/efa_rdm_util.c b/prov/efa/src/rdm/efa_rdm_util.c index e6df05d93f8..4f1eeb96fee 100644 --- a/prov/efa/src/rdm/efa_rdm_util.c +++ b/prov/efa/src/rdm/efa_rdm_util.c @@ -129,7 +129,7 @@ void efa_rdm_get_desc_for_shm(int numdesc, void **efa_desc, void **shm_desc) /** * @brief Write the error message and return its byte length - * @param[in] ep RXR endpoint + * @param[in] ep EFA RDM endpoint * @param[in] addr Remote peer fi_addr_t * @param[in] err FI_* error code(must be positive) * @param[in] prov_errno EFA provider * error code(must be positive) diff --git a/prov/efa/test/efa_unit_test_ep.c b/prov/efa/test/efa_unit_test_ep.c index 2ecc80ab600..0836ff99e26 100644 --- a/prov/efa/test/efa_unit_test_ep.c +++ b/prov/efa/test/efa_unit_test_ep.c @@ -1,7 +1,7 @@ #include "efa_unit_tests.h" /** - * @brief Verify the RXR endpoint correctly parses the host id string + * @brief Verify the EFA RDM endpoint correctly parses the host id string * @param[in] state cmocka state variable * @param[in] file_exists Toggle whether the host id file exists * @param[in] raw_id The host id string that is written in the host id file. @@ -46,7 +46,7 @@ void test_efa_rdm_ep_host_id(struct efa_resource **state, bool file_exists, char } /** - * @brief Verify the RXR endpoint ignores non-existent host id file + * @brief Verify the EFA RDM endpoint ignores non-existent host id file */ void test_efa_rdm_ep_ignore_missing_host_id_file(struct efa_resource **state) { @@ -54,7 +54,7 @@ void test_efa_rdm_ep_ignore_missing_host_id_file(struct efa_resource **state) } /** - * @brief Verify the RXR endpoint correctly parses a valid host id string + * @brief Verify the EFA RDM endpoint correctly parses a valid host id string */ void test_efa_rdm_ep_has_valid_host_id(struct efa_resource **state) { @@ -62,7 +62,7 @@ void test_efa_rdm_ep_has_valid_host_id(struct efa_resource **state) } /** - * @brief Verify the RXR endpoint ignores a short (<16 char) host id string + * @brief Verify the EFA RDM endpoint ignores a short (<16 char) host id string */ void test_efa_rdm_ep_ignore_short_host_id(struct efa_resource **state) { @@ -70,7 +70,7 @@ void test_efa_rdm_ep_ignore_short_host_id(struct efa_resource **state) } /** - * @brief Verify the RXR endpoint ignores a malformatted host id string + * @brief Verify the EFA RDM endpoint ignores a malformatted host id string */ void test_efa_rdm_ep_ignore_non_hex_host_id(struct efa_resource **state) { @@ -79,7 +79,7 @@ void test_efa_rdm_ep_ignore_non_hex_host_id(struct efa_resource **state) #if HAVE_EFADV_CQ_EX /** - * @brief Verify the RXR endpoint correctly processes and responds to a handshake packet + * @brief Verify the EFA RDM endpoint correctly processes and responds to a handshake packet * Upon receiving a handshake packet from a new remote peer, the endpoint should inspect * the packet header and set the peer host id if HOST_ID_HDR is turned on. * Then the endpoint should respond with a handshake packet, and include the local host id @@ -226,7 +226,7 @@ void test_efa_rdm_ep_handshake_receive_without_peer_host_id_and_do_not_send_loca } /** - * @brief Test rxr_endpoint handles CQ creation failure gracefully + * @brief Test efa_rdm_ep_open() handles rdma-core CQ creation failure gracefully * * @param[in] state struct efa_resource that is managed by the framework */ @@ -316,7 +316,7 @@ void test_efa_rdm_ep_pkt_pool_page_alignment(struct efa_resource **state) efa_unit_test_resource_construct(resource, FI_EP_RDM); - /* Turn on g_efa_fork_status and open a new rxr endpoint */ + /* Turn on g_efa_fork_status and open a new RDM endpoint */ g_efa_fork_status = EFA_FORK_SUPPORT_ON; ret = fi_endpoint(resource->domain, resource->info, &ep, NULL); assert_int_equal(ret, 0);