Whamcloud - gitweb
LU-9120 lnet: Add ioctl to get health stats
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-dlc.h
index 081f0ea..1d4b98d 100644 (file)
@@ -20,7 +20,7 @@
  *
  */
 /*
- * Copyright (c) 2014, 2016, Intel Corporation.
+ * Copyright (c) 2014, 2017, Intel Corporation.
  */
 /*
  * Author: Amir Shehata <amir.shehata@intel.com>
@@ -90,7 +90,7 @@ struct lnet_ioctl_config_lnd_tunables {
 };
 
 struct lnet_ioctl_net_config {
-       char ni_interfaces[LNET_NUM_INTERFACES][LNET_MAX_STR_LEN];
+       char ni_interfaces[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
        __u32 ni_status;
        __u32 ni_cpts[LNET_MAX_SHOW_NUM_CPT];
        char cfg_bulk[0];
@@ -120,8 +120,8 @@ struct lnet_ioctl_ping_data {
        __u32 ping_count;
        __u32 ping_flags;
        bool mr_info;
-       lnet_process_id_t ping_id;
-       lnet_process_id_t __user *ping_buf;
+       struct lnet_process_id ping_id;
+       struct lnet_process_id __user *ping_buf;
 };
 
 struct lnet_ioctl_config_data {
@@ -172,6 +172,31 @@ struct lnet_ioctl_element_stats {
        __u32 iel_drop_count;
 };
 
+enum lnet_health_type {
+       LNET_HEALTH_TYPE_LOCAL_NI = 0,
+       LNET_HEALTH_TYPE_PEER_NI,
+};
+
+struct lnet_ioctl_local_ni_hstats {
+       struct libcfs_ioctl_hdr hlni_hdr;
+       lnet_nid_t hlni_nid;
+       __u32 hlni_local_interrupt;
+       __u32 hlni_local_dropped;
+       __u32 hlni_local_aborted;
+       __u32 hlni_local_no_route;
+       __u32 hlni_local_timeout;
+       __u32 hlni_local_error;
+       __s32 hlni_health_value;
+};
+
+struct lnet_ioctl_peer_ni_hstats {
+       __u32 hlpni_remote_dropped;
+       __u32 hlpni_remote_timeout;
+       __u32 hlpni_remote_error;
+       __u32 hlpni_network_timeout;
+       __s32 hlpni_health_value;
+};
+
 struct lnet_ioctl_element_msg_stats {
        struct libcfs_ioctl_hdr im_hdr;
        __u32 im_idx;
@@ -193,7 +218,7 @@ struct lnet_ioctl_element_msg_stats {
 struct lnet_ioctl_config_ni {
        struct libcfs_ioctl_hdr lic_cfg_hdr;
        lnet_nid_t              lic_nid;
-       char                    lic_ni_intf[LNET_NUM_INTERFACES][LNET_MAX_STR_LEN];
+       char                    lic_ni_intf[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
        char                    lic_legacy_ip2nets[LNET_MAX_STR_LEN];
        __u32                   lic_cpts[LNET_MAX_SHOW_NUM_CPT];
        __u32                   lic_ncpts;
@@ -239,9 +264,17 @@ struct lnet_ioctl_peer_cfg {
        void __user *prcfg_bulk;
 };
 
-struct lnet_ioctl_numa_range {
-       struct libcfs_ioctl_hdr nr_hdr;
-       __u32 nr_range;
+struct lnet_ioctl_reset_health_cfg {
+       struct libcfs_ioctl_hdr rh_hdr;
+       enum lnet_health_type rh_type;
+       bool rh_all;
+       int rh_value;
+       lnet_nid_t rh_nid;
+};
+
+struct lnet_ioctl_set_value {
+       struct libcfs_ioctl_hdr sv_hdr;
+       __u32 sv_value;
 };
 
 struct lnet_ioctl_lnet_stats {