Skip to content

Commit

Permalink
[v1.19.x] prov/efa: Fix typos in packet macros
Browse files Browse the repository at this point in the history
The RTA in EFA_RDM_LONGREAD_RTA_MSGRTM_PKT,
EFA_RDM_LONGREAD_RTA_TAGRTM_PKT, and EFA_RDM_LONGREAD_RTA_RTW_PKT
should be removed. RTA means "request to atomic".

Signed-off-by: Shi Jin <sjina@amazon.com>
(cherry picked from commit 4f03be1)
  • Loading branch information
shijin-aws committed Oct 3, 2023
1 parent b01da89 commit 469192f
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
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 @@ -52,7 +52,7 @@ int efa_rdm_msg_select_rtm(struct efa_rdm_ep *efa_rdm_ep, struct efa_rdm_ope *tx
assert(EFA_RDM_EAGER_MSGRTM_PKT + 1 == EFA_RDM_EAGER_TAGRTM_PKT);
assert(EFA_RDM_MEDIUM_MSGRTM_PKT + 1 == EFA_RDM_MEDIUM_TAGRTM_PKT);
assert(EFA_RDM_LONGCTS_MSGRTM_PKT + 1 == EFA_RDM_LONGCTS_TAGRTM_PKT);
assert(EFA_RDM_LONGREAD_RTA_MSGRTM_PKT + 1 == EFA_RDM_LONGREAD_RTA_TAGRTM_PKT);
assert(EFA_RDM_LONGREAD_MSGRTM_PKT + 1 == EFA_RDM_LONGREAD_TAGRTM_PKT);
assert(EFA_RDM_DC_EAGER_MSGRTM_PKT + 1 == EFA_RDM_DC_EAGER_TAGRTM_PKT);
assert(EFA_RDM_DC_MEDIUM_MSGRTM_PKT + 1 == EFA_RDM_DC_MEDIUM_TAGRTM_PKT);
assert(EFA_RDM_DC_LONGCTS_MSGRTM_PKT + 1 == EFA_RDM_DC_LONGCTS_TAGRTM_PKT);
Expand Down
4 changes: 2 additions & 2 deletions prov/efa/src/rdm/efa_rdm_peer.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ int efa_rdm_peer_select_readbase_rtm(struct efa_rdm_peer *peer, int op, uint64_t
return (op == ofi_op_tagged) ? EFA_RDM_RUNTREAD_TAGRTM_PKT
: EFA_RDM_RUNTREAD_MSGRTM_PKT;
} else {
return (op == ofi_op_tagged) ? EFA_RDM_LONGREAD_RTA_TAGRTM_PKT
: EFA_RDM_LONGREAD_RTA_MSGRTM_PKT;
return (op == ofi_op_tagged) ? EFA_RDM_LONGREAD_TAGRTM_PKT
: EFA_RDM_LONGREAD_MSGRTM_PKT;
}
}
24 changes: 12 additions & 12 deletions prov/efa/src/rdm/efa_rdm_pke_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ int efa_rdm_pke_fill_data(struct efa_rdm_pke *pkt_entry,
assert(data_offset == 0 && data_size == -1);
ret = efa_rdm_pke_init_longcts_tagrtm(pkt_entry, ope);
break;
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
assert(data_offset == -1 && data_size == -1);
ret = efa_rdm_pke_init_longread_msgrtm(pkt_entry, ope);
break;
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
assert(data_offset == -1 && data_size == -1);
ret = efa_rdm_pke_init_longread_tagrtm(pkt_entry, ope);
break;
Expand All @@ -162,7 +162,7 @@ int efa_rdm_pke_fill_data(struct efa_rdm_pke *pkt_entry,
assert(data_offset == 0 && data_size == -1);
ret = efa_rdm_pke_init_longcts_rtw(pkt_entry, ope);
break;
case EFA_RDM_LONGREAD_RTA_RTW_PKT:
case EFA_RDM_LONGREAD_RTW_PKT:
assert(data_offset == -1 && data_size == -1);
ret = efa_rdm_pke_init_longread_rtw(pkt_entry, ope);
break;
Expand Down Expand Up @@ -282,8 +282,8 @@ void efa_rdm_pke_handle_sent(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_DC_LONGCTS_TAGRTM_PKT:
efa_rdm_pke_handle_longcts_rtm_sent(pkt_entry);
break;
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
efa_rdm_pke_handle_longread_rtm_sent(pkt_entry);
break;
case EFA_RDM_RUNTREAD_MSGRTM_PKT:
Expand All @@ -297,7 +297,7 @@ void efa_rdm_pke_handle_sent(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_DC_LONGCTS_RTW_PKT:
efa_rdm_pke_handle_longcts_rtw_sent(pkt_entry);
break;
case EFA_RDM_LONGREAD_RTA_RTW_PKT:
case EFA_RDM_LONGREAD_RTW_PKT:
/* nothing to do when LONGREAD RTW is sent */
break;
case EFA_RDM_SHORT_RTR_PKT:
Expand Down Expand Up @@ -595,8 +595,8 @@ void efa_rdm_pke_handle_send_completion(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_LONGCTS_TAGRTM_PKT:
efa_rdm_pke_handle_longcts_rtm_send_completion(pkt_entry);
break;
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
/* nothing to do */
break;
case EFA_RDM_RUNTREAD_MSGRTM_PKT:
Expand All @@ -609,7 +609,7 @@ void efa_rdm_pke_handle_send_completion(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_LONGCTS_RTW_PKT:
efa_rdm_pke_handle_longcts_rtw_send_completion(pkt_entry);
break;
case EFA_RDM_LONGREAD_RTA_RTW_PKT:
case EFA_RDM_LONGREAD_RTW_PKT:
/* nothing to do when long rtw send completes*/
break;
case EFA_RDM_SHORT_RTR_PKT:
Expand Down Expand Up @@ -818,8 +818,8 @@ void efa_rdm_pke_proc_received(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_LONGCTS_TAGRTM_PKT:
case EFA_RDM_DC_LONGCTS_MSGRTM_PKT:
case EFA_RDM_DC_LONGCTS_TAGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
case EFA_RDM_RUNTREAD_MSGRTM_PKT:
case EFA_RDM_RUNTREAD_TAGRTM_PKT:
case EFA_RDM_WRITE_RTA_PKT:
Expand All @@ -835,7 +835,7 @@ void efa_rdm_pke_proc_received(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_DC_LONGCTS_RTW_PKT:
efa_rdm_pke_handle_longcts_rtw_recv(pkt_entry);
return;
case EFA_RDM_LONGREAD_RTA_RTW_PKT:
case EFA_RDM_LONGREAD_RTW_PKT:
efa_rdm_pke_handle_longread_rtw_recv(pkt_entry);
return;
case EFA_RDM_SHORT_RTR_PKT:
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ uint32_t efa_rdm_pke_get_req_rma_iov_count(struct efa_rdm_pke *pkt_entry)
pkt_type == EFA_RDM_DC_EAGER_RTW_PKT ||
pkt_type == EFA_RDM_LONGCTS_RTW_PKT ||
pkt_type == EFA_RDM_DC_LONGCTS_RTW_PKT ||
pkt_type == EFA_RDM_LONGREAD_RTA_RTW_PKT)
pkt_type == EFA_RDM_LONGREAD_RTW_PKT)
return efa_rdm_pke_get_rtw_base_hdr(pkt_entry)->rma_iov_count;

if (pkt_type == EFA_RDM_SHORT_RTR_PKT ||
Expand Down
14 changes: 7 additions & 7 deletions prov/efa/src/rdm/efa_rdm_pke_rtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ size_t efa_rdm_pke_get_rtm_msg_length(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_DC_LONGCTS_MSGRTM_PKT:
case EFA_RDM_DC_LONGCTS_TAGRTM_PKT:
return efa_rdm_pke_get_longcts_rtm_base_hdr(pkt_entry)->msg_length;
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
return efa_rdm_pke_get_longread_rtm_base_hdr(pkt_entry)->msg_length;
case EFA_RDM_RUNTREAD_MSGRTM_PKT:
case EFA_RDM_RUNTREAD_TAGRTM_PKT:
Expand Down Expand Up @@ -250,7 +250,7 @@ ssize_t efa_rdm_pke_proc_matched_rtm(struct efa_rdm_pke *pkt_entry)

rxe->msg_id = efa_rdm_pke_get_rtm_base_hdr(pkt_entry)->msg_id;

if (pkt_type == EFA_RDM_LONGREAD_RTA_MSGRTM_PKT || pkt_type == EFA_RDM_LONGREAD_RTA_TAGRTM_PKT)
if (pkt_type == EFA_RDM_LONGREAD_MSGRTM_PKT || pkt_type == EFA_RDM_LONGREAD_TAGRTM_PKT)
return efa_rdm_pke_proc_matched_longread_rtm(pkt_entry);

if (efa_rdm_pkt_type_is_mulreq(pkt_type))
Expand Down Expand Up @@ -383,7 +383,7 @@ ssize_t efa_rdm_pke_proc_rtm_rta(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_EAGER_MSGRTM_PKT:
case EFA_RDM_MEDIUM_MSGRTM_PKT:
case EFA_RDM_LONGCTS_MSGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_MSGRTM_PKT:
case EFA_RDM_LONGREAD_MSGRTM_PKT:
case EFA_RDM_RUNTREAD_MSGRTM_PKT:
case EFA_RDM_DC_EAGER_MSGRTM_PKT:
case EFA_RDM_DC_MEDIUM_MSGRTM_PKT:
Expand All @@ -392,7 +392,7 @@ ssize_t efa_rdm_pke_proc_rtm_rta(struct efa_rdm_pke *pkt_entry)
case EFA_RDM_EAGER_TAGRTM_PKT:
case EFA_RDM_MEDIUM_TAGRTM_PKT:
case EFA_RDM_LONGCTS_TAGRTM_PKT:
case EFA_RDM_LONGREAD_RTA_TAGRTM_PKT:
case EFA_RDM_LONGREAD_TAGRTM_PKT:
case EFA_RDM_RUNTREAD_TAGRTM_PKT:
case EFA_RDM_DC_EAGER_TAGRTM_PKT:
case EFA_RDM_DC_MEDIUM_TAGRTM_PKT:
Expand Down Expand Up @@ -1098,7 +1098,7 @@ ssize_t efa_rdm_pke_init_longread_rtm(struct efa_rdm_pke *pkt_entry,
ssize_t efa_rdm_pke_init_longread_msgrtm(struct efa_rdm_pke *pkt_entry,
struct efa_rdm_ope *txe)
{
return efa_rdm_pke_init_longread_rtm(pkt_entry, EFA_RDM_LONGREAD_RTA_MSGRTM_PKT, txe);
return efa_rdm_pke_init_longread_rtm(pkt_entry, EFA_RDM_LONGREAD_MSGRTM_PKT, txe);
}

/**
Expand All @@ -1111,7 +1111,7 @@ ssize_t efa_rdm_pke_init_longread_tagrtm(struct efa_rdm_pke *pkt_entry,
ssize_t err;
struct efa_rdm_base_hdr *base_hdr;

err = efa_rdm_pke_init_longread_rtm(pkt_entry, EFA_RDM_LONGREAD_RTA_TAGRTM_PKT, txe);
err = efa_rdm_pke_init_longread_rtm(pkt_entry, EFA_RDM_LONGREAD_TAGRTM_PKT, txe);
if (err)
return err;

Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pke_rtw.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ ssize_t efa_rdm_pke_init_longread_rtw(struct efa_rdm_pke *pkt_entry,
rtw_hdr->msg_length = txe->total_len;
rtw_hdr->send_id = txe->tx_id;
rtw_hdr->read_iov_count = txe->iov_count;
efa_rdm_pke_init_req_hdr_common(pkt_entry, EFA_RDM_LONGREAD_RTA_RTW_PKT, txe);
efa_rdm_pke_init_req_hdr_common(pkt_entry, EFA_RDM_LONGREAD_RTW_PKT, txe);

rma_iov = rtw_hdr->rma_iov;
for (i = 0; i < txe->rma_iov_count; ++i) {
Expand Down
6 changes: 3 additions & 3 deletions prov/efa/src/rdm/efa_rdm_pkt_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ struct efa_rdm_pkt_type_req_info EFA_RDM_PKT_TYPE_REQ_INFO_VEC[] = {
[EFA_RDM_MEDIUM_TAGRTM_PKT] = {0, sizeof(struct efa_rdm_medium_tagrtm_hdr), 0},
[EFA_RDM_LONGCTS_MSGRTM_PKT] = {0, sizeof(struct efa_rdm_longcts_msgrtm_hdr), 0},
[EFA_RDM_LONGCTS_TAGRTM_PKT] = {0, sizeof(struct efa_rdm_longcts_tagrtm_hdr), 0},
[EFA_RDM_LONGREAD_RTA_MSGRTM_PKT] = {0, sizeof(struct efa_rdm_longread_msgrtm_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_LONGREAD_RTA_TAGRTM_PKT] = {0, sizeof(struct efa_rdm_longread_tagrtm_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_LONGREAD_MSGRTM_PKT] = {0, sizeof(struct efa_rdm_longread_msgrtm_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_LONGREAD_TAGRTM_PKT] = {0, sizeof(struct efa_rdm_longread_tagrtm_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_DC_EAGER_MSGRTM_PKT] = {0, sizeof(struct efa_rdm_dc_eager_msgrtm_hdr), EFA_RDM_EXTRA_FEATURE_DELIVERY_COMPLETE},
[EFA_RDM_DC_EAGER_TAGRTM_PKT] = {0, sizeof(struct efa_rdm_dc_eager_tagrtm_hdr), EFA_RDM_EXTRA_FEATURE_DELIVERY_COMPLETE},
[EFA_RDM_DC_MEDIUM_MSGRTM_PKT] = {0, sizeof(struct efa_rdm_dc_medium_msgrtm_hdr), EFA_RDM_EXTRA_FEATURE_DELIVERY_COMPLETE},
Expand All @@ -30,7 +30,7 @@ struct efa_rdm_pkt_type_req_info EFA_RDM_PKT_TYPE_REQ_INFO_VEC[] = {
[EFA_RDM_DC_EAGER_RTW_PKT] = {0, sizeof(struct efa_rdm_dc_eager_rtw_hdr), EFA_RDM_EXTRA_FEATURE_DELIVERY_COMPLETE},
[EFA_RDM_LONGCTS_RTW_PKT] = {0, sizeof(struct efa_rdm_longcts_rtw_hdr), 0},
[EFA_RDM_DC_LONGCTS_RTW_PKT] = {0, sizeof(struct efa_rdm_longcts_rtw_hdr), EFA_RDM_EXTRA_FEATURE_DELIVERY_COMPLETE},
[EFA_RDM_LONGREAD_RTA_RTW_PKT] = {0, sizeof(struct efa_rdm_longread_rtw_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_LONGREAD_RTW_PKT] = {0, sizeof(struct efa_rdm_longread_rtw_hdr), EFA_RDM_EXTRA_FEATURE_RDMA_READ},
[EFA_RDM_RUNTCTS_RTW_PKT] = {0, sizeof(struct efa_rdm_runtcts_rtw_hdr), EFA_RDM_EXTRA_FEATURE_RUNT},
[EFA_RDM_RUNTREAD_RTW_PKT] = {0, sizeof(struct efa_rdm_runtread_rtw_hdr), EFA_RDM_EXTRA_FEATURE_RUNT},
/* rtr header */
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_pkt_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int efa_rdm_pkt_type_contains_rma_iov(int pkt_type)
case EFA_RDM_DC_EAGER_RTW_PKT:
case EFA_RDM_LONGCTS_RTW_PKT:
case EFA_RDM_DC_LONGCTS_RTW_PKT:
case EFA_RDM_LONGREAD_RTA_RTW_PKT:
case EFA_RDM_LONGREAD_RTW_PKT:
case EFA_RDM_SHORT_RTR_PKT:
case EFA_RDM_LONGCTS_RTR_PKT:
case EFA_RDM_WRITE_RTA_PKT:
Expand Down
6 changes: 3 additions & 3 deletions prov/efa/src/rdm/efa_rdm_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ struct efa_ep_addr {
#define EFA_RDM_BASELINE_REQ_PKT_END 77

#define EFA_RDM_EXTRA_REQ_PKT_BEGIN 128
#define EFA_RDM_LONGREAD_RTA_MSGRTM_PKT 128
#define EFA_RDM_LONGREAD_RTA_TAGRTM_PKT 129
#define EFA_RDM_LONGREAD_RTA_RTW_PKT 130
#define EFA_RDM_LONGREAD_MSGRTM_PKT 128
#define EFA_RDM_LONGREAD_TAGRTM_PKT 129
#define EFA_RDM_LONGREAD_RTW_PKT 130
#define EFA_RDM_READ_RTR_PKT 131

#define EFA_RDM_DC_REQ_PKT_BEGIN 132
Expand Down
2 changes: 1 addition & 1 deletion prov/efa/src/rdm/efa_rdm_rma.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ ssize_t efa_rdm_rma_post_write(struct efa_rdm_ep *ep, struct efa_rdm_ope *txe)
if (txe->total_len >= efa_rdm_ep_domain(ep)->hmem_info[iface].min_read_write_size &&
efa_rdm_interop_rdma_read(ep, peer) &&
(txe->desc[0] || efa_is_cache_available(efa_rdm_ep_domain(ep)))) {
err = efa_rdm_ope_post_send(txe, EFA_RDM_LONGREAD_RTA_RTW_PKT);
err = efa_rdm_ope_post_send(txe, EFA_RDM_LONGREAD_RTW_PKT);
if (err != -FI_ENOMEM)
return err;
/*
Expand Down

0 comments on commit 469192f

Please sign in to comment.