rdma_transport.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | rdma_transport.c (dcdede0406d30e14a6ed727dce69dfac0518371d) |
---|---|
1/* 2 * Copyright (c) 2009 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 35 unchanged lines hidden (view full) --- 44 /* this can be null in the listening path */ 45 struct rds_connection *conn = cm_id->context; 46 struct rds_transport *trans; 47 int ret = 0; 48 49 rdsdebug("conn %p id %p handling event %u (%s)\n", conn, cm_id, 50 event->event, rdma_event_msg(event->event)); 51 | 1/* 2 * Copyright (c) 2009 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 35 unchanged lines hidden (view full) --- 44 /* this can be null in the listening path */ 45 struct rds_connection *conn = cm_id->context; 46 struct rds_transport *trans; 47 int ret = 0; 48 49 rdsdebug("conn %p id %p handling event %u (%s)\n", conn, cm_id, 50 event->event, rdma_event_msg(event->event)); 51 |
52 if (cm_id->device->node_type == RDMA_NODE_RNIC) 53 trans = &rds_iw_transport; 54 else | 52 if (cm_id->device->node_type == RDMA_NODE_IB_CA) |
55 trans = &rds_ib_transport; 56 57 /* Prevent shutdown from tearing down the connection 58 * while we're executing. */ 59 if (conn) { 60 mutex_lock(&conn->c_cm_lock); 61 62 /* If the connection is being shut down, bail out --- 132 unchanged lines hidden (view full) --- 195static int rds_rdma_init(void) 196{ 197 int ret; 198 199 ret = rds_rdma_listen_init(); 200 if (ret) 201 goto out; 202 | 53 trans = &rds_ib_transport; 54 55 /* Prevent shutdown from tearing down the connection 56 * while we're executing. */ 57 if (conn) { 58 mutex_lock(&conn->c_cm_lock); 59 60 /* If the connection is being shut down, bail out --- 132 unchanged lines hidden (view full) --- 193static int rds_rdma_init(void) 194{ 195 int ret; 196 197 ret = rds_rdma_listen_init(); 198 if (ret) 199 goto out; 200 |
203 ret = rds_iw_init(); 204 if (ret) 205 goto err_iw_init; 206 | |
207 ret = rds_ib_init(); 208 if (ret) 209 goto err_ib_init; 210 211 goto out; 212 213err_ib_init: | 201 ret = rds_ib_init(); 202 if (ret) 203 goto err_ib_init; 204 205 goto out; 206 207err_ib_init: |
214 rds_iw_exit(); 215err_iw_init: | |
216 rds_rdma_listen_stop(); 217out: 218 return ret; 219} 220module_init(rds_rdma_init); 221 222static void rds_rdma_exit(void) 223{ 224 /* stop listening first to ensure no new connections are attempted */ 225 rds_rdma_listen_stop(); 226 rds_ib_exit(); | 208 rds_rdma_listen_stop(); 209out: 210 return ret; 211} 212module_init(rds_rdma_init); 213 214static void rds_rdma_exit(void) 215{ 216 /* stop listening first to ensure no new connections are attempted */ 217 rds_rdma_listen_stop(); 218 rds_ib_exit(); |
227 rds_iw_exit(); | |
228} 229module_exit(rds_rdma_exit); 230 231MODULE_AUTHOR("Oracle Corporation <rds-devel@oss.oracle.com>"); | 219} 220module_exit(rds_rdma_exit); 221 222MODULE_AUTHOR("Oracle Corporation <rds-devel@oss.oracle.com>"); |
232MODULE_DESCRIPTION("RDS: IB/iWARP transport"); | 223MODULE_DESCRIPTION("RDS: IB transport"); |
233MODULE_LICENSE("Dual BSD/GPL"); 234 | 224MODULE_LICENSE("Dual BSD/GPL"); 225 |