Commit 5d60c111 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Doug Ledford

RDMA: Move rdma_node_type to uapi/

This enum is exposed over the sysfs file 'node_type' and over netlink via
RDMA_NLDEV_ATTR_DEV_NODE_TYPE, so declare it in the uapi headers.
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 2d3c72ed
...@@ -209,7 +209,7 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate) ...@@ -209,7 +209,7 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate)
EXPORT_SYMBOL(ib_rate_to_mbps); EXPORT_SYMBOL(ib_rate_to_mbps);
__attribute_const__ enum rdma_transport_type __attribute_const__ enum rdma_transport_type
rdma_node_get_transport(enum rdma_node_type node_type) rdma_node_get_transport(unsigned int node_type)
{ {
if (node_type == RDMA_NODE_USNIC) if (node_type == RDMA_NODE_USNIC)
......
...@@ -132,17 +132,6 @@ struct ib_gid_attr { ...@@ -132,17 +132,6 @@ struct ib_gid_attr {
u8 port_num; u8 port_num;
}; };
enum rdma_node_type {
/* IB values map to NodeInfo:NodeType. */
RDMA_NODE_IB_CA = 1,
RDMA_NODE_IB_SWITCH,
RDMA_NODE_IB_ROUTER,
RDMA_NODE_RNIC,
RDMA_NODE_USNIC,
RDMA_NODE_USNIC_UDP,
RDMA_NODE_UNSPECIFIED,
};
enum { enum {
/* set the local administered indication */ /* set the local administered indication */
IB_SA_WELL_KNOWN_GUID = BIT_ULL(57) | 2, IB_SA_WELL_KNOWN_GUID = BIT_ULL(57) | 2,
...@@ -164,7 +153,7 @@ enum rdma_protocol_type { ...@@ -164,7 +153,7 @@ enum rdma_protocol_type {
}; };
__attribute_const__ enum rdma_transport_type __attribute_const__ enum rdma_transport_type
rdma_node_get_transport(enum rdma_node_type node_type); rdma_node_get_transport(unsigned int node_type);
enum rdma_network_type { enum rdma_network_type {
RDMA_NETWORK_IB, RDMA_NETWORK_IB,
......
...@@ -147,6 +147,18 @@ enum { ...@@ -147,6 +147,18 @@ enum {
IWPM_NLA_HELLO_MAX IWPM_NLA_HELLO_MAX
}; };
/* For RDMA_NLDEV_ATTR_DEV_NODE_TYPE */
enum {
/* IB values map to NodeInfo:NodeType. */
RDMA_NODE_IB_CA = 1,
RDMA_NODE_IB_SWITCH,
RDMA_NODE_IB_ROUTER,
RDMA_NODE_RNIC,
RDMA_NODE_USNIC,
RDMA_NODE_USNIC_UDP,
RDMA_NODE_UNSPECIFIED,
};
/* /*
* Local service operations: * Local service operations:
* RESOLVE - The client requests the local service to resolve a path. * RESOLVE - The client requests the local service to resolve a path.
......
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