Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 07:25:41 +0000 (UTC)
From:      Slava Shwartsman <slavash@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r335614 - stable/11/contrib/ofed/librdmacm/examples
Message-ID:  <201806250725.w5P7Pfor000333@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806250725.w5P7Pfor000333>