Commit 2d2e9415 authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier

RDMA/cm: Define new RDMA port space specific to IB

Add RDMA_PS_IB.  XRC QP types will use the IB port space when operating
over the RDMA CM.  For the 'IP protocol' field value, we select 0x3F,
which is listed as being for 'any local network'.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent ef700446
...@@ -81,6 +81,7 @@ static DEFINE_IDR(sdp_ps); ...@@ -81,6 +81,7 @@ static DEFINE_IDR(sdp_ps);
static DEFINE_IDR(tcp_ps); static DEFINE_IDR(tcp_ps);
static DEFINE_IDR(udp_ps); static DEFINE_IDR(udp_ps);
static DEFINE_IDR(ipoib_ps); static DEFINE_IDR(ipoib_ps);
static DEFINE_IDR(ib_ps);
struct cma_device { struct cma_device {
struct list_head list; struct list_head list;
...@@ -2234,6 +2235,9 @@ static int cma_get_port(struct rdma_id_private *id_priv) ...@@ -2234,6 +2235,9 @@ static int cma_get_port(struct rdma_id_private *id_priv)
case RDMA_PS_IPOIB: case RDMA_PS_IPOIB:
ps = &ipoib_ps; ps = &ipoib_ps;
break; break;
case RDMA_PS_IB:
ps = &ib_ps;
break;
default: default:
return -EPROTONOSUPPORT; return -EPROTONOSUPPORT;
} }
...@@ -3460,6 +3464,7 @@ static void __exit cma_cleanup(void) ...@@ -3460,6 +3464,7 @@ static void __exit cma_cleanup(void)
idr_destroy(&tcp_ps); idr_destroy(&tcp_ps);
idr_destroy(&udp_ps); idr_destroy(&udp_ps);
idr_destroy(&ipoib_ps); idr_destroy(&ipoib_ps);
idr_destroy(&ib_ps);
} }
module_init(cma_init); module_init(cma_init);
......
...@@ -65,6 +65,7 @@ enum rdma_cm_event_type { ...@@ -65,6 +65,7 @@ enum rdma_cm_event_type {
enum rdma_port_space { enum rdma_port_space {
RDMA_PS_SDP = 0x0001, RDMA_PS_SDP = 0x0001,
RDMA_PS_IPOIB = 0x0002, RDMA_PS_IPOIB = 0x0002,
RDMA_PS_IB = 0x013F,
RDMA_PS_TCP = 0x0106, RDMA_PS_TCP = 0x0106,
RDMA_PS_UDP = 0x0111, RDMA_PS_UDP = 0x0111,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment