diff mbox

[1/3] rdma_cm: Add support for a new RDMA_PS_LUSTRE Lustre port space

Message ID 20100113155150.59867f40@frecb007965 (mailing list archive)
State Rejected
Headers show

Commit Message

sebastien dugue Jan. 13, 2010, 2:51 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index cc9b594..6b9e75e 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -78,6 +78,7 @@  static DEFINE_IDR(sdp_ps);
 static DEFINE_IDR(tcp_ps);
 static DEFINE_IDR(udp_ps);
 static DEFINE_IDR(ipoib_ps);
+static DEFINE_IDR(lustre_ps);
 static int next_port;
 
 struct cma_device {
@@ -2066,6 +2067,9 @@  static int cma_get_port(struct rdma_id_private *id_priv)
 	case RDMA_PS_IPOIB:
 		ps = &ipoib_ps;
 		break;
+	case RDMA_PS_LUSTRE:
+		ps = &lustre_ps;
+		break;
 	default:
 		return -EPROTONOSUPPORT;
 	}
@@ -3034,6 +3038,7 @@  static void __exit cma_cleanup(void)
 	idr_destroy(&tcp_ps);
 	idr_destroy(&udp_ps);
 	idr_destroy(&ipoib_ps);
+	idr_destroy(&lustre_ps);
 }
 
 module_init(cma_init);
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index c6b2962..d662799 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -63,11 +63,12 @@  enum rdma_cm_event_type {
 };
 
 enum rdma_port_space {
-	RDMA_PS_SDP   = 0x0001,
-	RDMA_PS_IPOIB = 0x0002,
-	RDMA_PS_TCP   = 0x0106,
-	RDMA_PS_UDP   = 0x0111,
-	RDMA_PS_SCTP  = 0x0183
+	RDMA_PS_SDP    = 0x0001,
+	RDMA_PS_IPOIB  = 0x0002,
+	RDMA_PS_TCP    = 0x0106,
+	RDMA_PS_UDP    = 0x0111,
+	RDMA_PS_LUSTRE = 0x0153,
+	RDMA_PS_SCTP   = 0x0183
 };
 
 struct rdma_addr {