-
Notifications
You must be signed in to change notification settings - Fork 499
prov/efa: Minor changes necessary for the protocol path refactor #12010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9c7d405
d6a189d
8b53f2b
b8c0665
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,21 @@ struct efa_rdm_ep_queued_copy { | |
|
|
||
| #define EFA_RDM_MAX_QUEUED_COPY (8) | ||
|
|
||
| /* | ||
| * The default memory alignment | ||
| */ | ||
| #define EFA_RDM_EP_DEFAULT_MEMORY_ALIGNMENT (8) | ||
|
|
||
| /* | ||
| * The CUDA memory alignment | ||
| */ | ||
| #define EFA_RDM_EP_CUDA_MEMORY_ALIGNMENT (64) | ||
|
|
||
| /* | ||
| * The alignment to support in-order aligned ops. | ||
| */ | ||
| #define EFA_RDM_EP_IN_ORDER_ALIGNMENT (128) | ||
|
|
||
| /** | ||
| * Max number of opes queued before handshake is made | ||
| * with their peers. This cnt is per EP. | ||
|
|
@@ -195,7 +210,8 @@ struct efa_rdm_ep { | |
| struct efa_rdm_pke **pke_vec; | ||
| /* Work arrays for efa_rdm_ope_post_send to avoid stack allocation */ | ||
| struct efa_rdm_pke **send_pkt_entry_vec; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it be cleaner if we create a send_pkt_entry struct to wrap these 3 together?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about this. It will add another layer of redirection and I'm not sure if it helps. I did not add a new struct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having an nested struct does not cause an extra layer of indirection. It does however help in organizing this giant and messy struct |
||
| int *send_pkt_entry_size_vec; | ||
| size_t *send_pkt_entry_vec_data_sizes; | ||
| size_t send_pkt_entry_vec_size; | ||
|
sunkuamzn marked this conversation as resolved.
|
||
| struct dlist_entry entry; | ||
| /* the count of opes queued before handshake is made with their peers */ | ||
| size_t ope_queued_before_handshake_cnt; | ||
|
|
@@ -220,13 +236,6 @@ struct efa_rdm_peer *efa_rdm_ep_get_peer_explicit(struct efa_rdm_ep *ep, fi_addr | |
| int32_t efa_rdm_ep_get_peer_ahn(struct efa_rdm_ep *ep, fi_addr_t addr); | ||
| struct efa_rdm_peer *efa_rdm_ep_get_peer_implicit(struct efa_rdm_ep *ep, fi_addr_t addr); | ||
|
|
||
| struct efa_rdm_ope *efa_rdm_ep_alloc_txe(struct efa_rdm_ep *efa_rdm_ep, | ||
| struct efa_rdm_peer *peer, | ||
| const struct fi_msg *msg, | ||
| uint32_t op, | ||
| uint64_t tag, | ||
| uint64_t flags); | ||
|
|
||
| struct efa_rdm_ope *efa_rdm_ep_alloc_rxe(struct efa_rdm_ep *ep, | ||
| struct efa_rdm_peer *peer, uint32_t op); | ||
|
|
||
|
|
@@ -253,7 +262,26 @@ void efa_rdm_ep_queue_rnr_pkt(struct efa_rdm_ep *ep, struct efa_rdm_pke *pkt_ent | |
| ssize_t efa_rdm_ep_post_queued_pkts(struct efa_rdm_ep *ep, | ||
| struct dlist_entry *pkts); | ||
|
|
||
| size_t efa_rdm_ep_get_memory_alignment(struct efa_rdm_ep *ep, enum fi_hmem_iface iface); | ||
| /** | ||
| * @brief Get memory alignment for given ep and hmem iface | ||
| * | ||
| * @param ep efa rdm ep | ||
| * @param iface hmem iface | ||
| * @return size_t the memory alignment | ||
| */ | ||
| static inline size_t efa_rdm_ep_get_memory_alignment(struct efa_rdm_ep *ep, | ||
| enum fi_hmem_iface iface) | ||
| { | ||
| size_t memory_alignment = EFA_RDM_EP_DEFAULT_MEMORY_ALIGNMENT; | ||
|
|
||
| if (ep->sendrecv_in_order_aligned_128_bytes) { | ||
| memory_alignment = EFA_RDM_EP_IN_ORDER_ALIGNMENT; | ||
| } else if (iface == FI_HMEM_CUDA) { | ||
| memory_alignment = EFA_RDM_EP_CUDA_MEMORY_ALIGNMENT; | ||
| } | ||
|
|
||
| return memory_alignment; | ||
| } | ||
|
|
||
| static inline | ||
| struct efa_domain *efa_rdm_ep_domain(struct efa_rdm_ep *ep) | ||
|
|
@@ -547,4 +575,10 @@ fi_addr_t efa_rdm_ep_get_explicit_shm_fi_addr(struct efa_rdm_ep *ep, fi_addr_t a | |
| conn = efa_av_addr_to_conn(ep->base_ep.av, addr); | ||
| return conn ? conn->shm_fi_addr : FI_ADDR_NOTAVAIL; | ||
| } | ||
|
|
||
| static inline size_t efa_rdm_ep_get_available_tx_pkts(struct efa_rdm_ep *ep) | ||
| { | ||
| return ep->efa_max_outstanding_tx_ops - ep->efa_outstanding_tx_ops - | ||
| ep->efa_rnr_queued_pkt_cnt; | ||
| } | ||
| #endif | ||
Uh oh!
There was an error while loading. Please reload this page.