Whamcloud - gitweb
LU-9119 lnet: Normalize ioctl interface
[fs/lustre-release.git] / lnet / include / lnet / lib-dlc.h
index de049d0..360383d 100644 (file)
@@ -93,10 +93,6 @@ struct lnet_ioctl_net_config {
 /* # different router buffer pools */
 #define LNET_NRBPOOLS          (LNET_LARGE_BUF_IDX + 1)
 
-enum lnet_dbg_task {
-       LNET_DBG_INCR_DLC_SEQ = 0
-};
-
 struct lnet_ioctl_pool_cfg {
        struct {
                __u32 pl_npages;
@@ -107,6 +103,17 @@ struct lnet_ioctl_pool_cfg {
        __u32 pl_routing;
 };
 
+struct lnet_ioctl_ping_data {
+       struct libcfs_ioctl_hdr ping_hdr;
+
+       __u32 op_param;
+       __u32 ping_count;
+       __u32 ping_flags;
+       bool mr_info;
+       lnet_process_id_t ping_id;
+       lnet_process_id_t __user *ping_buf;
+};
+
 struct lnet_ioctl_config_data {
        struct libcfs_ioctl_hdr cfg_hdr;
 
@@ -141,6 +148,28 @@ struct lnet_ioctl_config_data {
        char cfg_bulk[0];
 };
 
+struct lnet_ioctl_comm_count {
+       __u32 ico_get_count;
+       __u32 ico_put_count;
+       __u32 ico_reply_count;
+       __u32 ico_ack_count;
+       __u32 ico_hello_count;
+};
+
+struct lnet_ioctl_element_stats {
+       __u32 iel_send_count;
+       __u32 iel_recv_count;
+       __u32 iel_drop_count;
+};
+
+struct lnet_ioctl_element_msg_stats {
+       struct libcfs_ioctl_hdr im_hdr;
+       __u32 im_idx;
+       struct lnet_ioctl_comm_count im_send_stats;
+       struct lnet_ioctl_comm_count im_recv_stats;
+       struct lnet_ioctl_comm_count im_drop_stats;
+};
+
 /*
  * lnet_ioctl_config_ni
  *  This structure describes an NI configuration. There are multiple components
@@ -156,13 +185,14 @@ struct lnet_ioctl_config_ni {
        lnet_nid_t              lic_nid;
        char                    lic_ni_intf[LNET_MAX_INTERFACES][LNET_MAX_STR_LEN];
        char                    lic_legacy_ip2nets[LNET_MAX_STR_LEN];
-       __u32                   lic_cpts[LNET_MAX_SHOW_NUM_CPT];
+       __u32                   lic_cpts[LNET_MAX_SHOW_NUM_CPT];
        __u32                   lic_ncpts;
        __u32                   lic_status;
        __u32                   lic_tcp_bonding;
        __u32                   lic_idx;
        __s32                   lic_dev_cpt;
-       char                    lic_bulk[0];
+       char                    pad[4];
+       char                    lic_bulk[0];
 };
 
 struct lnet_peer_ni_credit_info {
@@ -170,9 +200,10 @@ struct lnet_peer_ni_credit_info {
        __u32 cr_refcount;
        __s32 cr_ni_peer_tx_credits;
        __s32 cr_peer_tx_credits;
+       __s32 cr_peer_min_tx_credits;
+       __u32 cr_peer_tx_qnob;
        __s32 cr_peer_rtr_credits;
        __s32 cr_peer_min_rtr_credits;
-       __u32 cr_peer_tx_qnob;
        __u32 cr_ncpt;
 };
 
@@ -187,30 +218,15 @@ struct lnet_ioctl_peer {
        } pr_lnd_u;
 };
 
-struct lnet_dbg_task_info {
-       /*
-        * TODO: a union can be added if the task requires more
-        * information from user space to be carried out in kernel space.
-        */
-};
-
-/*
- * This structure is intended to allow execution of debugging tasks. This
- * is not intended to be backwards compatible. Extra tasks can be added in
- * the future
- */
-struct lnet_ioctl_dbg {
-       struct libcfs_ioctl_hdr dbg_hdr;
-       enum lnet_dbg_task dbg_task;
-       char dbg_bulk[0];
-};
-
 struct lnet_ioctl_peer_cfg {
        struct libcfs_ioctl_hdr prcfg_hdr;
-       lnet_nid_t prcfg_key_nid;
+       lnet_nid_t prcfg_prim_nid;
        lnet_nid_t prcfg_cfg_nid;
-       __u32 prcfg_idx;
-       char prcfg_bulk[0];
+       __u32 prcfg_count;
+       bool prcfg_mr;
+       __u32 prcfg_state;
+       __u32 prcfg_size;
+       void __user *prcfg_bulk;
 };
 
 struct lnet_ioctl_numa_range {