]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: make sure base connection is up on both sides
authorAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Tue, 5 May 2015 03:09:42 +0000 (20:09 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 21 Oct 2015 16:06:56 +0000 (09:06 -0700)
Current RDS active side requires zero lane path records for establishing
non-zero lane connection. For this reason, active side makes sure to
have zero lane connection up before establishing non-zero lane
connection. Passive side does not require to fetch path records, so it
does not have this check.

This has possibility of connection having non-ideal path records in
following scenario:
- Host1 had PORT_UP event.
- Lane0 and Lane6 connection went down.
- Lane0 connection came up.
- Host1 sent connection request for Lane6.
- Host2 had PORT_UP event.
- Lane0 and Lane6 connections went down.
- Host2 sent DREQ for Lane0.
- Since Lane6 connection is not up, it does not require to do anything.
- Host2 received connection request from host1 having old path records
  for Lane6.
- Lane6 connection got established on old path records.

Following are impacts of having connections with non-ideal path records:
- minor performance hit because of extra hop with ISL path
- in port failure scenario, it impacts connections which are not related
  to that port.

With this patch we make sure that base connection is up on passive side
as well before allowing to establish connection.

(This is port of UEK2 commit 7ab7ef255a)

Orabug: 21675157

Tested-by: Michael Nowak <michael.nowak@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Acked-by: Qing Huang <qing.huang@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/ib_cm.c

index 713e1a7ddbc13ad6aaea904e106ecc003be2c949..fae04c620492e31db53c2380f23dfb3a23147d1f 100644 (file)
@@ -822,6 +822,20 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
                }
        }
 
+       /*
+        * Make sure to have zero lane connection up on both sides,
+        * to avoid establishing connection on non-ideal path records.
+        */
+       if (dp->dp_tos && rds_conn_state(conn->c_base_conn) != RDS_CONN_UP) {
+               printk(KERN_INFO "RDS/IB: connection "
+                               "<%u.%u.%u.%u,%u.%u.%u.%u,%d> "
+                               "incoming REQ with base connection down, retry\n",
+                               NIPQUAD(conn->c_laddr),
+                               NIPQUAD(conn->c_faddr),
+                               conn->c_tos);
+               rds_conn_drop(conn);
+       }
+
        /*
         * The connection request may occur while the
         * previous connection exist, e.g. in case of failover.