diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-03-27 08:38:07 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-03-28 20:50:45 -0600 |
commit | 2253fc0caa800ba7c1e380446eb3fb7958a85b93 (patch) | |
tree | 33327ff72343b9efa6a65d577ffd0e85461220ef /include/rdma/rdma_cm.h | |
parent | 1b90d3002e3ee39b22de5604497b20edeeee558e (diff) | |
download | linux-2253fc0caa800ba7c1e380446eb3fb7958a85b93.tar.gz |
RDMA/CMA: Add rdma_port_space to UAPI
Since the rdma_port_space enum is being passed between user and kernel for
user cm_id setup, we need it in a UAPI header. So add it to
rdma_user_cm.h.
This also fixes the cm_id restrack changes which pass up the port space
value via the RDMA_NLDEV_ATTR_RES_PS attribute.
Fixes: 00313983cda6 ("RDMA/nldev: provide detailed CM_ID information")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma/rdma_cm.h')
-rw-r--r-- | include/rdma/rdma_cm.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 7652efc35eb9..4480e636b934 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h @@ -38,6 +38,7 @@ #include <linux/in6.h> #include <rdma/ib_addr.h> #include <rdma/ib_sa.h> +#include <uapi/rdma/rdma_user_cm.h> /* * Upon receiving a device removal event, users must destroy the associated @@ -64,13 +65,6 @@ enum rdma_cm_event_type { const char *__attribute_const__ rdma_event_msg(enum rdma_cm_event_type event); -enum rdma_port_space { - RDMA_PS_IPOIB = 0x0002, - RDMA_PS_IB = 0x013F, - RDMA_PS_TCP = 0x0106, - RDMA_PS_UDP = 0x0111, -}; - #define RDMA_IB_IP_PS_MASK 0xFFFFFFFFFFFF0000ULL #define RDMA_IB_IP_PS_TCP 0x0000000001060000ULL #define RDMA_IB_IP_PS_UDP 0x0000000001110000ULL @@ -151,15 +145,16 @@ struct rdma_cm_id { struct ib_qp *qp; rdma_cm_event_handler event_handler; struct rdma_route route; - enum rdma_port_space ps; + enum rdma_ucm_port_space ps; enum ib_qp_type qp_type; u8 port_num; }; struct rdma_cm_id *__rdma_create_id(struct net *net, - rdma_cm_event_handler event_handler, - void *context, enum rdma_port_space ps, - enum ib_qp_type qp_type, const char *caller); + rdma_cm_event_handler event_handler, + void *context, enum rdma_ucm_port_space ps, + enum ib_qp_type qp_type, + const char *caller); /** * rdma_create_id - Create an RDMA identifier. |