diff options
author | Sean Hefty <sean.hefty@intel.com> | 2013-05-29 13:09:11 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-06-20 16:08:03 -0400 |
commit | 58afdcb7382234ebd780e43b17edde92a5853cca (patch) | |
tree | 99620a70539d1ea7c0fa674dc7454a19f7b3211e /include | |
parent | ef560861c01c301cde3da154eb9c1c2619924c3a (diff) |
RDMA/cma: Update port reservation to support AF_IB
The AF_IB uses a 64-bit service id (SID), which the user can control
through the use of a mask. The rdma_cm will assign values to the
unmasked portions of the SID based on the selected port space and port
number.
Because the IB spec divides the SID range into several regions, a
SID/mask combination may fall into one of the existing port space
ranges as defined by the RDMA CM IP Annex. Map the AF_IB SID to the
correct RDMA port space.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rdma/rdma_cm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index ad3a3142383a..1e6c3c7af898 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -70,6 +70,11 @@ enum rdma_port_space { | |||
70 | RDMA_PS_UDP = 0x0111, | 70 | RDMA_PS_UDP = 0x0111, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define RDMA_IB_IP_PS_MASK 0xFFFFFFFFFFFF0000ULL | ||
74 | #define RDMA_IB_IP_PS_TCP 0x0000000001060000ULL | ||
75 | #define RDMA_IB_IP_PS_UDP 0x0000000001110000ULL | ||
76 | #define RDMA_IB_IP_PS_IB 0x00000000013F0000ULL | ||
77 | |||
73 | struct rdma_addr { | 78 | struct rdma_addr { |
74 | struct sockaddr_storage src_addr; | 79 | struct sockaddr_storage src_addr; |
75 | struct sockaddr_storage dst_addr; | 80 | struct sockaddr_storage dst_addr; |