From: Kaike Wan <[email protected]>

This patch adds netlink defines for SA client, local service group, local
service operations, and related attributes.

Signed-off-by: Kaike Wan <[email protected]>
Signed-off-by: John Fleck <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Reviewed-by: Sean Hefty <[email protected]>
---
 include/uapi/rdma/rdma_netlink.h |   56 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index 6e4bb42..bc30b90 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -7,12 +7,14 @@ enum {
        RDMA_NL_RDMA_CM = 1,
        RDMA_NL_NES,
        RDMA_NL_C4IW,
+       RDMA_NL_SA,
        RDMA_NL_NUM_CLIENTS
 };
 
 enum {
        RDMA_NL_GROUP_CM = 1,
        RDMA_NL_GROUP_IWPM,
+       RDMA_NL_GROUP_LS,
        RDMA_NL_NUM_GROUPS
 };
 
@@ -128,5 +130,59 @@ enum {
        IWPM_NLA_ERR_MAX
 };
 
+/* Local service group opcodes */
+enum {
+       RDMA_NL_LS_OP_RESOLVE = 0,
+       RDMA_NL_LS_OP_SET_TIMEOUT,
+       RDMA_NL_LS_NUM_OPS
+};
+
+/* Local service netlink message flags */
+#define RDMA_NL_LS_F_OK                0x0100  /* Success response */
+#define RDMA_NL_LS_F_ERR       0x0200  /* Failed response */
+
+/* Local service attribute type */
+enum {
+       LS_NLA_TYPE_STATUS = 0,
+       LS_NLA_TYPE_PATH_RECORD,
+       LS_NLA_TYPE_TIMEOUT,
+       LS_NLA_TYPE_MAX
+};
+
+/* Local service status attribute */
+enum {
+       LS_NLA_STATUS_SUCCESS = 0,
+       LS_NLA_STATUS_EINVAL,
+       LS_NLA_STATUS_ENODATA,
+       LS_NLA_STATUS_MAX
+};
+
+struct rdma_nla_ls_status {
+       __u32           status;
+};
+
+/* Local service pathrecord attribute */
+/* Flags for pathrecord */
+enum {
+       LS_NLA_PATH_F_GMP               = 1,
+       LS_NLA_PATH_F_PRIMARY           = (1<<1),
+       LS_NLA_PATH_F_ALTERNATE         = (1<<2),
+       LS_NLA_PATH_F_OUTBOUND          = (1<<3),
+       LS_NLA_PATH_F_INBOUND           = (1<<4),
+       LS_NLA_PATH_F_INBOUND_REVERSE   = (1<<5),
+       LS_NLA_PATH_F_BIDIRECTIONAL     = (LS_NLA_PATH_F_OUTBOUND |
+                                         LS_NLA_PATH_F_INBOUND_REVERSE),
+       LS_NLA_PATH_F_USER              = (1<<6)
+};
+
+struct rdma_nla_ls_path_rec {
+       __u32   flags;
+       __u32   path_rec[0];
+};
+
+/* Local service timeout attribute */
+struct rdma_nla_ls_timeout {
+       __u32           timeout;
+};
 
 #endif /* _UAPI_RDMA_NETLINK_H */
-- 
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to