aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_cm.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-01-13 18:50:09 -0500
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:11:48 -0400
commitf147dd9ecabf23fd63d2562ffe64252a0453ecde (patch)
tree1e3cdab2dc27b37ff2b820cd8081b33da95ab08c /net/rds/ib_cm.c
parent9c030391e8741695ff6114703e4edccccb634479 (diff)
RDS/IB: Disallow connections less than RDS 3.1
RDS 3.0 connections (in OFED 1.3 and earlier) put the header at the end. 3.1 connections put it at the head. The code has significant added complexity in order to handle both configurations. In OFED 1.6 we can drop this and simplify the code by only supporting "header-first" configuration. This patch checks the protocol version, and if prior to 3.1, does not complete the connection. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r--net/rds/ib_cm.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 3134336ca17d..8b0c743c0900 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -111,11 +111,21 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
111 } 111 }
112 } 112 }
113 113
114 printk(KERN_NOTICE "RDS/IB: connected to %pI4 version %u.%u%s\n", 114 if (conn->c_version < RDS_PROTOCOL(3,1)) {
115 &conn->c_faddr, 115 printk(KERN_NOTICE "RDS/IB: Connection to %pI4 version %u.%u failed,"
116 RDS_PROTOCOL_MAJOR(conn->c_version), 116 " no longer supported\n",
117 RDS_PROTOCOL_MINOR(conn->c_version), 117 &conn->c_faddr,
118 ic->i_flowctl ? ", flow control" : ""); 118 RDS_PROTOCOL_MAJOR(conn->c_version),
119 RDS_PROTOCOL_MINOR(conn->c_version));
120 rds_conn_destroy(conn);
121 return;
122 } else {
123 printk(KERN_NOTICE "RDS/IB: connected to %pI4 version %u.%u%s\n",
124 &conn->c_faddr,
125 RDS_PROTOCOL_MAJOR(conn->c_version),
126 RDS_PROTOCOL_MINOR(conn->c_version),
127 ic->i_flowctl ? ", flow control" : "");
128 }
119 129
120 /* 130 /*
121 * Init rings and fill recv. this needs to wait until protocol negotiation 131 * Init rings and fill recv. this needs to wait until protocol negotiation