Skip to content

Commit

Permalink
ibdiags: Do not panic on ibstat query failure
Browse files Browse the repository at this point in the history
ibstat relies on umad_get_ca() to retrieve device's statistics.
However, in case the latter function fails on a certain device, ibstat
panics and exits before processing and displaying other device's
statistics which may be obtainable.

Thus, warn on failed device query and continue querying the remaining
devices instead of an early exit.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
  • Loading branch information
msanalla authored and Yishai Hadas committed Sep 25, 2024
1 parent dd29f7c commit 703b52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infiniband-diags/ibstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ int main(int argc, char *argv[])
if (list_only)
printf("%s\n", ca_name);
else if (ca_stat(ca_name, dev_port, short_format) < 0)
IBPANIC("stat of IB device '%s' failed", ca_name);
IBWARN("stat of IB device '%s' failed", ca_name);
}
umad_free_ca_device_list(device_list);
return 0;
Expand Down

0 comments on commit 703b52c

Please sign in to comment.