Skip to content
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

prov/rxd: Move the receive repost/remove to earlier in the pkt handling #5183

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion prov/rxd/src/rxd.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ int rxd_av_insert_dg_addr(struct rxd_av *av, const void *addr,

/* Pkt resource functions */
int rxd_ep_post_buf(struct rxd_ep *ep);
void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry);
void rxd_ep_send_ack(struct rxd_ep *rxd_ep, fi_addr_t peer);
struct rxd_pkt_entry *rxd_get_tx_pkt(struct rxd_ep *ep);
struct rxd_x_entry *rxd_get_tx_entry(struct rxd_ep *ep, uint32_t op);
Expand Down
18 changes: 6 additions & 12 deletions prov/rxd/src/rxd_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ static void rxd_remove_rx_pkt(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry
}
}

void rxd_release_repost_rx(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry)
{
ofi_buf_free(pkt_entry);
rxd_ep_post_buf(ep);
}

static void rxd_complete_rx(struct rxd_ep *ep, struct rxd_x_entry *rx_entry)
{
struct fi_cq_err_entry err_entry;
Expand Down Expand Up @@ -932,7 +926,7 @@ static void rxd_progress_buf_pkts(struct rxd_ep *ep, fi_addr_t peer)
"could not write error entry\n");
ep->peers[base_hdr->peer].rx_seq_no++;
dlist_remove(&pkt_entry->d_entry);
rxd_release_repost_rx(ep, pkt_entry);
ofi_buf_free(pkt_entry);
continue;
}
if (!rx_entry) {
Expand All @@ -951,7 +945,7 @@ static void rxd_progress_buf_pkts(struct rxd_ep *ep, fi_addr_t peer)

ep->peers[base_hdr->peer].rx_seq_no++;
dlist_remove(&pkt_entry->d_entry);
rxd_release_repost_rx(ep, pkt_entry);
ofi_buf_free(pkt_entry);
}
}

Expand Down Expand Up @@ -994,7 +988,7 @@ static void rxd_handle_data(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry)
}
free:
rxd_remove_rx_pkt(ep, pkt_entry);
rxd_release_repost_rx(ep, pkt_entry);
ofi_buf_free(pkt_entry);
}

static void rxd_handle_op(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry)
Expand Down Expand Up @@ -1062,7 +1056,7 @@ static void rxd_handle_op(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry)
rxd_ep_send_ack(ep, base_hdr->peer);
release:
rxd_remove_rx_pkt(ep, pkt_entry);
rxd_release_repost_rx(ep, pkt_entry);
ofi_buf_free(pkt_entry);
}

static void rxd_handle_cts(struct rxd_ep *ep, struct rxd_pkt_entry *pkt_entry)
Expand Down Expand Up @@ -1159,7 +1153,7 @@ void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp)
"got recv completion (type: %s)\n",
rxd_pkt_type_str[(rxd_pkt_type(pkt_entry))]);

ep->posted_bufs--;
rxd_ep_post_buf(ep);

pkt_entry->pkt_size = comp->len;
switch (rxd_pkt_type(pkt_entry)) {
Expand Down Expand Up @@ -1188,7 +1182,7 @@ void rxd_handle_recv_comp(struct rxd_ep *ep, struct fi_cq_msg_entry *comp)
}

rxd_remove_rx_pkt(ep, pkt_entry);
rxd_release_repost_rx(ep, pkt_entry);
ofi_buf_free(pkt_entry);
}

void rxd_handle_error(struct rxd_ep *ep)
Expand Down
6 changes: 0 additions & 6 deletions prov/rxd/src/rxd_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,12 +978,6 @@ void rxd_ep_progress(struct util_ep *util_ep)
}

out:
while (ep->posted_bufs < ep->rx_size) {
ret = rxd_ep_post_buf(ep);
if (ret)
break;
}

fastlock_release(&ep->util_ep.lock);
}

Expand Down