svn commit: r335614 - stable/11/contrib/ofed/librdmacm/examples
Slava Shwartsman
slavash at FreeBSD.org
Mon Jun 25 07:25:42 UTC 2018
Author: slavash
Date: Mon Jun 25 07:25:41 2018
New Revision: 335614
URL: https://svnweb.freebsd.org/changeset/base/335614
Log:
MFC r335282:
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.
Approved by: hselasky (mentor), kib (mentor)
Sponsored by: Mellanox Technologies
Modified:
stable/11/contrib/ofed/librdmacm/examples/mckey.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c
==============================================================================
--- stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 06:57:10 2018 (r335613)
+++ stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 07:25:41 2018 (r335614)
@@ -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-stable-11
mailing list