25034411 re-construct the DR path in ibportstate
authorqian.l.liu@oracle.com <qian.l.liu@oracle.com>
Wed, 16 Nov 2016 14:12:24 -0800
changeset 7322 058c61da9b95
parent 7321 037f3571d4ee
child 7323 177ebdb56301
25034411 re-construct the DR path in ibportstate 24578210 qperf rc_bw test fails when cross running with PSIF and CX on UEK4
components/open-fabrics/infiniband-diags/patches/005-infiniband-diags-ibportstate-directed-route.patch
components/open-fabrics/qperf/patches/004-qperf-proper-rd-atomic.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/open-fabrics/infiniband-diags/patches/005-infiniband-diags-ibportstate-directed-route.patch	Wed Nov 16 14:12:24 2016 -0800
@@ -0,0 +1,41 @@
+# This patch was developed both in-house and from outside. We plan to submit it
+# upstream, but do not yet have a target date for doing so
+#
+# HG changeset patch
+# Parent  fb92c41a991128da97e3b50025d9971a7609dcbf
+25034411 re-construct the DR path in ibportstate
+
+diff -r fb92c41a9911 src/ibportstate.c
+--- a/src/ibportstate.c	Wed Nov 16 13:16:32 2016 -0800
++++ b/src/ibportstate.c	Wed Nov 16 13:23:26 2016 -0800
+@@ -675,16 +675,20 @@
+ 
+ 			/* Setup portid for peer port */
+ 			memcpy(&peerportid, &portid, sizeof(peerportid));
+-			peerportid.drpath.cnt = 1;
+-			peerportid.drpath.p[1] = (uint8_t) portnum;
+-
+-			/* Set DrSLID to local lid */
+-			if (resolve_self(ibd_ca, ibd_ca_port, &selfportid,
+-						&selfport, 0) < 0)
+-				IBEXIT("could not resolve self");
+-			peerportid.lid = switch_lid;
+-			peerportid.drpath.drslid = (uint16_t) selfportid.lid;
+-			peerportid.drpath.drdlid = 0xffff;
++			if (portid.lid == 0) {
++                                peerportid.drpath.cnt++;
++                                if (peerportid.drpath.cnt == IB_SUBNET_PATH_HOPS_MAX)
++                                        IBEXIT("Too many hops");
++                        } else {
++                                peerportid.drpath.cnt = 1;
++                                /* Set DrSLID to local lid */
++                                if (resolve_self(ibd_ca, ibd_ca_port, &selfportid,
++                                    &selfport, 0) < 0)
++                                        IBEXIT("could not resolve self");
++                                peerportid.drpath.drslid = (uint16_t) selfportid.lid;
++                                peerportid.drpath.drdlid = 0xffff;
++                        }
++                        peerportid.drpath.p[peerportid.drpath.cnt] = (uint8_t) portnum;
+ 
+ 			/* Get peer port NodeInfo to obtain peer port number */
+ 			is_peer_switch = get_node_info(&peerportid, data);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/open-fabrics/qperf/patches/004-qperf-proper-rd-atomic.patch	Wed Nov 16 14:12:24 2016 -0800
@@ -0,0 +1,20 @@
+# This patch was developed both in-house and from outside. We plan to submit it
+# upstream, but do not yet have a target date for doing so
+#
+# HG changeset patch
+# Parent  1f2e317a13060277cda3ad53f729422573785190
+24578210 qperf rc_bw test fails when cross running with PSIF and CX on UEK4
+
+diff -r 1f2e317a1306 src/rdma.c
+--- a/src/rdma.c	Wed Nov 16 13:16:34 2016 -0800
++++ b/src/rdma.c	Wed Nov 16 13:26:55 2016 -0800
+@@ -2243,7 +2243,8 @@
+         .retry_cnt         = RETRY_CNT,
+         .rnr_retry         = RNR_RETRY_CNT,
+         .sq_psn            = dev->lnode.psn,
+-        .max_rd_atomic     = dev->rnode.rd_atomic,
++	/* uses the minimum rd_atomic of the two sides to avoid RTR->RTS transition failure */
++        .max_rd_atomic     = dev->lnode.rd_atomic > dev->rnode.rd_atomic ? dev->rnode.rd_atomic : dev->lnode.rd_atomic,
+         .path_mig_state    = IBV_MIG_REARM,
+         .alt_port_num      = Req.alt_port,
+         .alt_ah_attr       = {