Skip to content

Commit

Permalink
ASICFWDG-5079 fix for cxi_gpu_loopback_bw socket errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Hendrickson <jon.hendrickson@hpe.com>
  • Loading branch information
Jon Hendrickson authored and prudvi-hpe committed Feb 5, 2025
1 parent f2f2e88 commit 0f3609b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions utils/utils_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,11 @@ int run_bw_active(struct util_context *util,
*/
duration_usec = opts->duration * SEC2USEC;

rc = ctrl_barrier(ctrl, DFLT_HANDSHAKE_TIMEOUT, "Pre-run");
if (rc)
return rc;
if (ctrl->connected) {
rc = ctrl_barrier(ctrl, DFLT_HANDSHAKE_TIMEOUT, "Pre-run");
if (rc)
return rc;
}

start_time = get_time_usec(util->cxi.dev);

Expand All @@ -589,9 +591,11 @@ int run_bw_active(struct util_context *util,
elapsed = get_time_usec(util->cxi.dev) - start_time;
}

rc = ctrl_barrier(ctrl, DFLT_HANDSHAKE_TIMEOUT, "Post-run");
if (rc)
return rc;
if (ctrl->connected) {
rc = ctrl_barrier(ctrl, DFLT_HANDSHAKE_TIMEOUT, "Post-run");
if (rc)
return rc;
}

/* Final elapsed time update */
elapsed = get_time_usec(util->cxi.dev) - start_time;
Expand Down

0 comments on commit 0f3609b

Please sign in to comment.