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/verbs: account for off-by-one credit initialization #6212

Merged
merged 1 commit into from
Aug 26, 2020
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
2 changes: 1 addition & 1 deletion prov/verbs/src/fi_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ struct vrb_ep {
uint64_t sq_credits;
uint64_t peer_rq_credits;
/* Protected by recv CQ lock */
uint64_t rq_credits_avail;
int64_t rq_credits_avail;
uint64_t threshold;

union {
Expand Down
6 changes: 6 additions & 0 deletions prov/verbs/src/verbs_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ vrb_alloc_init_ep(struct fi_info *info, struct vrb_domain *domain,
return NULL;
}

// When we are enabling flow control, we artificially inject
// a credit so that the credit messaging itself is not blocked
// by a lack of credits. To counter this, we will adjust the number
// of credit we send the first time by initializing to -1.
ep->rq_credits_avail = -1;

ep->info = fi_dupinfo(info);
if (!ep->info)
goto err1;
Expand Down