]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
uapi: rdma netlink.h update
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 16 Jul 2019 18:58:44 +0000 (11:58 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 16 Jul 2019 18:58:44 +0000 (11:58 -0700)
From upstream 5.3-rc

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
rdma/include/uapi/rdma/rdma_netlink.h

index 41cfa84c5b694303c2545fab46757b906851248d..ae5a77a17b4349fdf5a65ad861fb49bb29c873c7 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.
@@ -267,11 +279,15 @@ enum rdma_nldev_command {
 
        RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */
 
-       RDMA_NLDEV_NUM_OPS
-};
+       RDMA_NLDEV_CMD_GET_CHARDEV,
 
-enum {
-       RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16,
+       RDMA_NLDEV_CMD_STAT_SET,
+
+       RDMA_NLDEV_CMD_STAT_GET, /* can dump */
+
+       RDMA_NLDEV_CMD_STAT_DEL,
+
+       RDMA_NLDEV_NUM_OPS
 };
 
 enum rdma_nldev_print_type {
@@ -478,10 +494,72 @@ enum rdma_nldev_attr {
         * File descriptor handle of the net namespace object
         */
        RDMA_NLDEV_NET_NS_FD,                   /* u32 */
+       /*
+        * Information about a chardev.
+        * CHARDEV_TYPE is the name of the chardev ABI (ie uverbs, umad, etc)
+        * CHARDEV_ABI signals the ABI revision (historical)
+        * CHARDEV_NAME is the kernel name for the /dev/ file (no directory)
+        * CHARDEV is the 64 bit dev_t for the inode
+        */
+       RDMA_NLDEV_ATTR_CHARDEV_TYPE,           /* string */
+       RDMA_NLDEV_ATTR_CHARDEV_NAME,           /* string */
+       RDMA_NLDEV_ATTR_CHARDEV_ABI,            /* u64 */
+       RDMA_NLDEV_ATTR_CHARDEV,                /* u64 */
+       RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID,       /* u64 */
+       /*
+        * Counter-specific attributes.
+        */
+       RDMA_NLDEV_ATTR_STAT_MODE,              /* u32 */
+       RDMA_NLDEV_ATTR_STAT_RES,               /* u32 */
+       RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK,    /* u32 */
+       RDMA_NLDEV_ATTR_STAT_COUNTER,           /* nested table */
+       RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY,     /* nested table */
+       RDMA_NLDEV_ATTR_STAT_COUNTER_ID,        /* u32 */
+       RDMA_NLDEV_ATTR_STAT_HWCOUNTERS,        /* nested table */
+       RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY,   /* nested table */
+       RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME,      /* string */
+       RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE,     /* u64 */
+
+       /*
+        * CQ adaptive moderatio (DIM)
+        */
+       RDMA_NLDEV_ATTR_DEV_DIM,                /* u8 */
 
        /*
         * Always the end
         */
        RDMA_NLDEV_ATTR_MAX
 };
+
+/*
+ * Supported counter bind modes. All modes are mutual-exclusive.
+ */
+enum rdma_nl_counter_mode {
+       RDMA_COUNTER_MODE_NONE,
+
+       /*
+        * A qp is bound with a counter automatically during initialization
+        * based on the auto mode (e.g., qp type, ...)
+        */
+       RDMA_COUNTER_MODE_AUTO,
+
+       /*
+        * Which qp are bound with which counter is explicitly specified
+        * by the user
+        */
+       RDMA_COUNTER_MODE_MANUAL,
+
+       /*
+        * Always the end
+        */
+       RDMA_COUNTER_MODE_MAX,
+};
+
+/*
+ * Supported criteria in counter auto mode.
+ * Currently only "qp type" is supported
+ */
+enum rdma_nl_counter_mask {
+       RDMA_COUNTER_MASK_QP_TYPE = 1,
+};
 #endif /* _RDMA_NETLINK_H */