]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: protocol negotiation fails during reconnect
authorBang Nguyen <bang.nguyen@oracle.com>
Thu, 29 Aug 2013 23:14:48 +0000 (16:14 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 8 Jul 2015 20:59:45 +0000 (13:59 -0700)
RDS fails to realize the negotiated version and keeps rejecting the peer's
connect request, causing the connection to stall during reconnect.

Orabug: 17375389

Signed-off-by: Giri Adari <giri.adari@oracle.com>
(cherry picked from commit 34a2edd27ec65cbeb003a3d2e22cb6da57e90798)

net/rds/ib_cm.c
net/rds/rdma_transport.c
net/rds/rds.h
net/rds/threads.c

index 8be0141b4b56220708232349ef5cf3a43dda0848..083425602e0d4881bb9d97566c93905e5988646a 100644 (file)
@@ -732,7 +732,7 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
                goto out;
        }
 
-       if (conn->c_reconnect && (conn->c_version != version)) {
+       if (conn->c_reconnect && (conn->c_version > version)) {
                printk(KERN_WARNING "RDS/IB: connection "
                        "<%u.%u.%u.%u,%u.%u.%u.%u,%d,%u.%u> rejecting version "
                        "(%u/%u)\n",
index 812d1da86d7d5620be9675c1c5542480d88f0f16..a97c862aa54bdd9e954f83895a446b9e5ba54fac 100644 (file)
@@ -186,7 +186,8 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
        case RDMA_CM_EVENT_REJECTED:
                err = (int *)event->param.conn.private_data;
                if (conn) {
-                       if (!conn->c_reconnect) {
+                       if (!conn->c_reconnect || conn->c_committed_version ==
+                               RDS_PROTOCOL_COMPAT_VERSION) {
                                if ((*err) == 0 &&
                                        event->status == RDS_REJ_CONSUMER_DEFINED) {
                                        /* rejection from 3.x protocol */
index 0e1eb2dfd10980c6ea7bc85850373b93f031dea2..7c1a06ea2b45a9bce4d8b505c42fdf6d7a3f5141 100644 (file)
@@ -142,6 +142,7 @@ struct rds_connection {
 
        /* Protocol version */
        unsigned int            c_proposed_version;
+       unsigned int            c_committed_version;
        unsigned int            c_version;
 
        /* Re-connect stall diagnostics */
index c9a4ba55cb450f21f89a17719c68ae1e040f59ce..01a864ea3bb0580f6efcfd3b085681fc447cf272 100644 (file)
@@ -99,6 +99,8 @@ void rds_connect_complete(struct rds_connection *conn)
 
        conn->c_connection_start = get_seconds();
        conn->c_reconnect = 1;
+       conn->c_committed_version = conn->c_version;
+       conn->c_proposed_version = RDS_PROTOCOL_VERSION;
 }
 EXPORT_SYMBOL_GPL(rds_connect_complete);