Skip to content

Commit

Permalink
prov/efa: fix rxr in comments and documents
Browse files Browse the repository at this point in the history
Replace the term RXR will proper terms in comments and documents

Signed-off-by: Wei Zhang <[email protected]>
  • Loading branch information
wzamazon committed Jul 4, 2023
1 parent e0dc241 commit a309bc2
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 43 deletions.
4 changes: 2 additions & 2 deletions prov/efa/docs/pkt-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion prov/efa/src/efa_av.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions prov/efa/src/efa_mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/efa_user_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions prov/efa/src/rdm/efa_rdm_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 */
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_ep_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
11 changes: 5 additions & 6 deletions prov/efa/src/rdm/efa_rdm_ope.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions prov/efa/src/rdm/efa_rdm_pke_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,20 +977,20 @@ 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);
}

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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions prov/efa/src/rdm/efa_rdm_pke_nonreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke_rta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke_rtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions prov/efa/src/rdm/efa_rdm_pke_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions prov/efa/test/efa_unit_test_ep.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -46,31 +46,31 @@ 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)
{
test_efa_rdm_ep_host_id(state, false, NULL, 0);
}

/**
* @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)
{
test_efa_rdm_ep_host_id(state, true, "i-01234567812345678", 0x1234567812345678);
}

/**
* @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)
{
test_efa_rdm_ep_host_id(state, true, "i-012345678", 0);
}

/**
* @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)
{
Expand All @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a309bc2

Please sign in to comment.