]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA: Move rdma_node_type to uapi/
authorJason Gunthorpe <jgg@mellanox.com>
Fri, 14 Jun 2019 00:38:17 +0000 (21:38 -0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 17 Jun 2019 18:58:59 +0000 (14:58 -0400)
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: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h
include/uapi/rdma/rdma_netlink.h

index 585e100706aa8a09c8dfda6a24e6698e45798941..588f1d195fd254cff1a0df8260e2692c22bc5f90 100644 (file)
@@ -209,7 +209,7 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate)
 EXPORT_SYMBOL(ib_rate_to_mbps);
 
 __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)
index f357e03a85a6bc0d9e51839a393df10f3712dfd3..973514ea17a79bebc3a21e5ddf7bb10830e49ec4 100644 (file)
@@ -132,17 +132,6 @@ struct ib_gid_attr {
        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 {
        /* set the local administered indication */
        IB_SA_WELL_KNOWN_GUID   = BIT_ULL(57) | 2,
@@ -164,7 +153,7 @@ enum rdma_protocol_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 {
        RDMA_NETWORK_IB,
index 41db51367efafb3d2abb5103e59ddc04b3d61e99..f588e8551c6cea5dcb835641fac09999bd1e1276 100644 (file)
@@ -147,6 +147,18 @@ enum {
        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:
  *   RESOLVE - The client requests the local service to resolve a path.