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

Fixed fabtests issues with the change of cq/eq_read return value #194

Merged
merged 4 commits into from
Mar 26, 2015

Conversation

shantonu
Copy link
Contributor

  • Allowed wait_for_completion to continue when fi_cq/eq_read returns -FI_EAGAIN
  • Fixed the loop issue which was based on "0" return value from fi_cq/eq_read
  • Fixed a missing -f option in option list for ported/librdmacm/cmatose

Fixes #192 @patrickmacarthur @bturrubiates @jithinjosepkl, can you please review?

Signed-off-by: Shantonu Hossain shantonu.hossain@intel.com

Signed-off-by: Shantonu Hossain <shantonu.hossain@intel.com>
if (ret == -FI_EAVAIL) {
if (ret == -FI_EAGAIN)
continue;
else if (ret == -FI_EAVAIL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow the coding guidelines, if either portion of an if statement uses braces, both portions should. I.e. rewrite as

if (ret == -FI_EAGAIN) {
continue;
} else ...

Problem repeated throughout patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that! Fixing it.

Signed-off-by: Shantonu Hossain <shantonu.hossain@intel.com>
Signed-off-by: Shantonu Hossain <shantonu.hossain@intel.com>
@shantonu
Copy link
Contributor Author

Pushed all the suggested changes!

@@ -379,7 +383,9 @@ static int shutdown_events(void)

while (disconnects_left && !ret) {
ret = fi_eq_sread(eq, &event, &entry, sizeof entry, -1, 0);
if (ret < 0) {
if (ret == -FI_EAGAIN)
continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break out of the while loop

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually in both loops above, we're blocking forever until we read an event. So even seeing EAGAIN would be unexpected. Both changes above should probably be reverted.

Signed-off-by: Shantonu Hossain <shantonu.hossain@intel.com>
shefty added a commit that referenced this pull request Mar 26, 2015
Fixed fabtests issues with the change of cq/eq_read return value
@shefty shefty merged commit 8b9a45a into ofiwg:master Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simple/rdm_tagged_search always returns fi_cq_read(): 102, -35 (Resource temporarily unavailable)
2 participants