Whamcloud - gitweb
LU-9120 lnet: Add ioctl to get health stats
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-dlc.h
index ff2eaf7..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>
@@ -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;
@@ -239,6 +264,14 @@ struct lnet_ioctl_peer_cfg {
        void __user *prcfg_bulk;
 };
 
+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;