Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>

authored by

Sean Hefty and committed by
Roland Dreier
2d2e9415 ef700446

+6
+5
drivers/infiniband/core/cma.c
··· 81 81 static DEFINE_IDR(tcp_ps); 82 82 static DEFINE_IDR(udp_ps); 83 83 static DEFINE_IDR(ipoib_ps); 84 + static DEFINE_IDR(ib_ps); 84 85 85 86 struct cma_device { 86 87 struct list_head list; ··· 2235 2234 case RDMA_PS_IPOIB: 2236 2235 ps = &ipoib_ps; 2237 2236 break; 2237 + case RDMA_PS_IB: 2238 + ps = &ib_ps; 2239 + break; 2238 2240 default: 2239 2241 return -EPROTONOSUPPORT; 2240 2242 } ··· 3464 3460 idr_destroy(&tcp_ps); 3465 3461 idr_destroy(&udp_ps); 3466 3462 idr_destroy(&ipoib_ps); 3463 + idr_destroy(&ib_ps); 3467 3464 } 3468 3465 3469 3466 module_init(cma_init);
+1
include/rdma/rdma_cm.h
··· 65 65 enum rdma_port_space { 66 66 RDMA_PS_SDP = 0x0001, 67 67 RDMA_PS_IPOIB = 0x0002, 68 + RDMA_PS_IB = 0x013F, 68 69 RDMA_PS_TCP = 0x0106, 69 70 RDMA_PS_UDP = 0x0111, 70 71 };