svn commit: r335282 - head/contrib/ofed/librdmacm/examples
Slava Shwartsman
slavash at FreeBSD.org
Sun Jun 17 07:08:49 UTC 2018
Author: slavash
Date: Sun Jun 17 07:08:47 2018
New Revision: 335282
URL: https://svnweb.freebsd.org/changeset/base/335282
Log:
Fix false positive on failure
When running mckey, errors may happen in the init/connect stage.
When leaving multicast groups, we override this value.
Fix that by saving the return value from rdma_leave_multicast to different
parameter, and only in case of failure in rdma_leave_multicast override it.
MFC after: 1 week
Approved by: hselasky (mentor), kib (mentor)
Sponsored by: Mellanox Technologies
Modified:
head/contrib/ofed/librdmacm/examples/mckey.c
Modified: head/contrib/ofed/librdmacm/examples/mckey.c
==============================================================================
--- head/contrib/ofed/librdmacm/examples/mckey.c Sun Jun 17 06:25:32 2018 (r335281)
+++ head/contrib/ofed/librdmacm/examples/mckey.c Sun Jun 17 07:08:47 2018 (r335282)
@@ -475,7 +475,7 @@ static int get_dst_addr(char *dst, struct sockaddr *ad
static int run(void)
{
- int i, ret;
+ int i, ret, err;
printf("mckey: starting %s\n", is_sender ? "client" : "server");
if (src_addr) {
@@ -543,10 +543,12 @@ static int run(void)
}
out:
for (i = 0; i < connections; i++) {
- ret = rdma_leave_multicast(test.nodes[i].cma_id,
+ err = rdma_leave_multicast(test.nodes[i].cma_id,
test.dst_addr);
- if (ret)
+ if (err) {
perror("mckey: failure leaving");
+ ret = err;
+ }
}
return ret;
}
More information about the svn-src-head
mailing list