Whamcloud - gitweb
LU-16548 lnet: report actual timeout used by lnd
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-dlc.h
index 1017dd3..47ac566 100644 (file)
 #define __user
 #endif
 
+#define LNET_GENL_NAME         "lnet"
+#define LNET_GENL_VERSION      0x05
+
+/* enum lnet_commands        - Supported core LNet Netlink commands
+ *
+ * @LNET_CMD_UNSPEC:           unspecified command to catch errors
+ *
+ * @LNET_CMD_NETS:             command to manage the LNet networks
+ * @LNET_CMD_ROUTES:           command to manage LNet routes
+ * @LNET_CMD_PING:             command to send pings to LNet connections
+ */
+enum lnet_commands {
+       LNET_CMD_UNSPEC         = 0,
+
+       LNET_CMD_CONFIGURE      = 1,
+       LNET_CMD_NETS           = 2,
+       LNET_CMD_PEERS          = 3,
+       LNET_CMD_ROUTES         = 4,
+       LNET_CMD_CONNS          = 5,
+       LNET_CMD_PING           = 6,
+
+       __LNET_CMD_MAX_PLUS_ONE
+};
+
+#define LNET_CMD_MAX (__LNET_CMD_MAX_PLUS_ONE - 1)
+
 /*
  * To allow for future enhancements to extend the tunables
  * add a hdr to this structure, so that the version can be set
@@ -79,11 +105,36 @@ struct lnet_ioctl_config_o2iblnd_tunables {
        __u32 lnd_fmr_cache;
        __u16 lnd_conns_per_peer;
        __u16 lnd_ntx;
+       __u32 lnd_timeout;
+};
+
+struct lnet_ioctl_config_kfilnd_tunables {
+       __u32 lnd_version;
+       __u32 lnd_prov_major_version;
+       __u32 lnd_prov_minor_version;
+       __u32 lnd_auth_key;
+       char lnd_traffic_class_str[LNET_MAX_STR_LEN];
+       __u32 lnd_traffic_class;
+};
+
+struct lnet_ioctl_config_socklnd_tunables {
+       __u32 lnd_version;
+       __u16 lnd_conns_per_peer;
+       __u16 lnd_pad;
+       __u32 lnd_timeout;
+};
+
+struct lnet_ioctl_config_gnilnd_tunables {
+       __u32 lnd_version;
+       __u32 lnd_timeout;
 };
 
 struct lnet_lnd_tunables {
        union {
                struct lnet_ioctl_config_o2iblnd_tunables lnd_o2ib;
+               struct lnet_ioctl_config_socklnd_tunables lnd_sock;
+               struct lnet_ioctl_config_kfilnd_tunables lnd_kfi;
+               struct lnet_ioctl_config_gnilnd_tunables lnd_gni;
        } lnd_tun_u;
 };
 
@@ -125,6 +176,7 @@ struct lnet_ioctl_ping_data {
        __u32 mr_info;
        struct lnet_process_id ping_id;
        struct lnet_process_id __user *ping_buf;
+       lnet_nid_t ping_src;
 };
 
 struct lnet_ioctl_config_data {
@@ -190,6 +242,7 @@ struct lnet_ioctl_local_ni_hstats {
        __u32 hlni_local_no_route;
        __u32 hlni_local_timeout;
        __u32 hlni_local_error;
+       __s32 hlni_fatal_error;
        __s32 hlni_health_value;
        __u32 hlni_ping_count;
        __u64 hlni_next_ping;
@@ -264,7 +317,9 @@ struct lnet_ioctl_peer_cfg {
        struct libcfs_ioctl_hdr prcfg_hdr;
        lnet_nid_t prcfg_prim_nid;
        lnet_nid_t prcfg_cfg_nid;
-       __u32 prcfg_count;
+       __u32 prcfg_count;      /* ADD_PEER_NI: used for 'lock_prim' option
+                                * DEL_PEER_NI: used for 'force' option
+                                */
        __u32 prcfg_mr;
        __u32 prcfg_state;
        __u32 prcfg_size;
@@ -279,6 +334,13 @@ struct lnet_ioctl_reset_health_cfg {
        lnet_nid_t rh_nid;
 };
 
+struct lnet_ioctl_reset_conns_per_peer_cfg {
+       struct libcfs_ioctl_hdr rcpp_hdr;
+       __u16 rcpp_all:1;
+       __s16 rcpp_value;
+       lnet_nid_t rcpp_nid;
+};
+
 struct lnet_ioctl_recovery_list {
        struct libcfs_ioctl_hdr rlst_hdr;
        enum lnet_health_type rlst_type:32;