Whamcloud - gitweb
LU-6142 lnet: change lnet selftest UAPI typedefs to proper structure 88/24188/4
authorJames Simmons <uja.ornl@yahoo.com>
Wed, 7 Dec 2016 01:34:43 +0000 (20:34 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:38:37 +0000 (05:38 +0000)
The upstream kernel requires proper structures so
convert all the UAPI typdefs in lnetst.h.

Test-Parameters: trivial testlist=lnet-selftest

Change-Id: I6a342e91a5331a946b74a01229deed2bfa6b6441
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24188
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
lnet/include/lnet/lnetst.h
lnet/selftest/conctl.c
lnet/selftest/conrpc.c
lnet/selftest/conrpc.h
lnet/selftest/console.c
lnet/selftest/console.h
lnet/selftest/framework.c
lnet/selftest/rpc.c
lnet/selftest/rpc.h
lnet/selftest/selftest.h
lnet/utils/lst.c

index c2e6b67..d448022 100644 (file)
 #define LSTIO_BATCH_QUERY      0xC27           /* query batch status */
 #define LSTIO_STAT_QUERY       0xC30           /* get stats */
 
 #define LSTIO_BATCH_QUERY      0xC27           /* query batch status */
 #define LSTIO_STAT_QUERY       0xC30           /* get stats */
 
-typedef struct {
-       lnet_nid_t              ses_nid;                /* nid of console node */
-       __u64                   ses_stamp;              /* time stamp */
-} lst_sid_t;                                           /*** session id */
+struct lst_sid {
+       lnet_nid_t      ses_nid;        /* nid of console node */
+       __u64           ses_stamp;      /* time stamp */
+};                                     /*** session id */
 
 
-extern lst_sid_t LST_INVALID_SID;
+extern struct lst_sid LST_INVALID_SID;
 
 
-typedef struct {
-       __u64                   bat_id;                 /* unique id in session */
-} lst_bid_t;                                           /*** batch id (group of tests) */
+struct lst_bid {
+       __u64           bat_id;         /* unique id in session */
+};
 
 /* Status of test node */
 
 /* Status of test node */
-#define LST_NODE_ACTIVE                0x1                     /* node in this session */
-#define LST_NODE_BUSY          0x2                     /* node is taken by other session */
-#define LST_NODE_DOWN          0x4                     /* node is down */
-#define LST_NODE_UNKNOWN       0x8                     /* node not in session */
-
-typedef struct {
-       lnet_process_id_t       nde_id;                 /* id of node */
-       int                     nde_state;              /* state of node */
-} lstcon_node_ent_t;                                   /*** node entry, for list_group command */
-
-typedef struct {
-       int                     nle_nnode;              /* # of nodes */
-       int                     nle_nactive;            /* # of active nodes */
-       int                     nle_nbusy;              /* # of busy nodes */
-       int                     nle_ndown;              /* # of down nodes */
-       int                     nle_nunknown;           /* # of unknown nodes */
-} lstcon_ndlist_ent_t;                                 /*** node_list entry, for list_batch command */
-
-typedef struct {
-       int                     tse_type;               /* test type */
-       int                     tse_loop;               /* loop count */
-       int                     tse_concur;             /* concurrency of test */
-} lstcon_test_ent_t;                                   /*** test summary entry, for list_batch command */
-
-typedef struct {
-       int                     bae_state;              /* batch status */
-       int                     bae_timeout;            /* batch timeout */
-       int                     bae_ntest;              /* # of tests in the batch */
-} lstcon_batch_ent_t;                                  /*** batch summary entry, for list_batch command */
-
-typedef struct {
-       lstcon_ndlist_ent_t     tbe_cli_nle;            /* client (group) node_list entry */
-       lstcon_ndlist_ent_t     tbe_srv_nle;            /* server (group) node_list entry */
+#define LST_NODE_ACTIVE                0x1     /* node in this session */
+#define LST_NODE_BUSY          0x2     /* node is taken by other session */
+#define LST_NODE_DOWN          0x4     /* node is down */
+#define LST_NODE_UNKNOWN       0x8     /* node not in session */
+
+struct lstcon_node_ent {
+       lnet_process_id_t       nde_id;         /* id of node */
+       int                     nde_state;      /* state of node */
+};                                             /*** node entry, for list_group command */
+
+struct lstcon_ndlist_ent {
+       int     nle_nnode;      /* # of nodes */
+       int     nle_nactive;    /* # of active nodes */
+       int     nle_nbusy;      /* # of busy nodes */
+       int     nle_ndown;      /* # of down nodes */
+       int     nle_nunknown;   /* # of unknown nodes */
+};                             /*** node_list entry, for list_batch command */
+
+struct lstcon_test_ent {
+       int     tse_type;       /* test type */
+       int     tse_loop;       /* loop count */
+       int     tse_concur;     /* concurrency of test */
+};                             /*** test summary entry, for list_batch command */
+
+struct lstcon_batch_ent {
+       int     bae_state;      /* batch status */
+       int     bae_timeout;    /* batch timeout */
+       int     bae_ntest;      /* # of tests in the batch */
+};                             /*** batch summary entry, for list_batch command */
+
+struct lstcon_test_batch_ent {
+       struct lstcon_ndlist_ent        tbe_cli_nle;    /* client (group) node_list entry */
+       struct lstcon_ndlist_ent        tbe_srv_nle;    /* server (group) node_list entry */
        union {
        union {
-               lstcon_test_ent_t  tbe_test;            /* test entry */
-               lstcon_batch_ent_t tbe_batch;           /* batch entry */
+               struct lstcon_test_ent  tbe_test;       /* test entry */
+               struct lstcon_batch_ent tbe_batch;      /* batch entry */
        } u;
        } u;
-} lstcon_test_batch_ent_t;                             /*** test/batch verbose information entry,
+};                                                     /*** test/batch verbose information entry,
                                                         *** for list_batch command */
 
                                                         *** for list_batch command */
 
-typedef struct {
+struct lstcon_rpc_ent {
        struct list_head        rpe_link;               /* link chain */
        lnet_process_id_t       rpe_peer;               /* peer's id */
        struct timeval          rpe_stamp;              /* time stamp of RPC */
        int                     rpe_state;              /* peer's state */
        int                     rpe_rpc_errno;          /* RPC errno */
 
        struct list_head        rpe_link;               /* link chain */
        lnet_process_id_t       rpe_peer;               /* peer's id */
        struct timeval          rpe_stamp;              /* time stamp of RPC */
        int                     rpe_state;              /* peer's state */
        int                     rpe_rpc_errno;          /* RPC errno */
 
-       lst_sid_t               rpe_sid;                /* peer's session id */
+       struct lst_sid          rpe_sid;                /* peer's session id */
        int                     rpe_fwk_errno;          /* framework errno */
        int                     rpe_priv[4];            /* private data */
        char                    rpe_payload[0];         /* private reply payload */
        int                     rpe_fwk_errno;          /* framework errno */
        int                     rpe_priv[4];            /* private data */
        char                    rpe_payload[0];         /* private reply payload */
-} lstcon_rpc_ent_t;
+};
 
 
-typedef struct {
-       int                     trs_rpc_stat[4];        /* RPCs stat (0: total, 1: failed, 2: finished, 4: reserved */
-       int                     trs_rpc_errno;          /* RPC errno */
-       int                     trs_fwk_stat[8];        /* framework stat */
-       int                     trs_fwk_errno;          /* errno of the first remote error */
-       void                   *trs_fwk_private;        /* private framework stat */
-} lstcon_trans_stat_t;
+struct lstcon_trans_stat {
+       int     trs_rpc_stat[4];        /* RPCs stat (0: total, 1: failed, 2: finished, 4: reserved */
+       int     trs_rpc_errno;          /* RPC errno */
+       int     trs_fwk_stat[8];        /* framework stat */
+       int     trs_fwk_errno;          /* errno of the first remote error */
+       void   *trs_fwk_private;        /* private framework stat */
+};
 
 static inline int
 
 static inline int
-lstcon_rpc_stat_total(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_total(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[0] : stat->trs_rpc_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_rpc_stat[0] : stat->trs_rpc_stat[0];
 }
 
 static inline int
-lstcon_rpc_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[1] : stat->trs_rpc_stat[1];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_rpc_stat[1] : stat->trs_rpc_stat[1];
 }
 
 static inline int
-lstcon_rpc_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[2] : stat->trs_rpc_stat[2];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_rpc_stat[2] : stat->trs_rpc_stat[2];
 }
 
 static inline int
-lstcon_sesop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_active(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_active(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesqry_stat_busy(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_busy(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_unknown(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_unknown(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_tsbop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_idle(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_idle(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbqry_stat_run(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_run(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_statqry_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_statqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 /* create a session */
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 /* create a session */
-typedef struct {
+struct lstio_session_new_args {
        int                     lstio_ses_key;          /* IN: local key */
        int                     lstio_ses_timeout;      /* IN: session timeout */
        int                     lstio_ses_force;        /* IN: force create ? */
        /** IN: session features */
        unsigned                lstio_ses_feats;
        int                     lstio_ses_key;          /* IN: local key */
        int                     lstio_ses_timeout;      /* IN: session timeout */
        int                     lstio_ses_force;        /* IN: force create ? */
        /** IN: session features */
        unsigned                lstio_ses_feats;
-       lst_sid_t __user       *lstio_ses_idp;          /* OUT: session id */
+       struct lst_sid __user  *lstio_ses_idp;          /* OUT: session id */
        int                     lstio_ses_nmlen;        /* IN: name length */
        char __user            *lstio_ses_namep;        /* IN: session name */
        int                     lstio_ses_nmlen;        /* IN: name length */
        char __user            *lstio_ses_namep;        /* IN: session name */
-} lstio_session_new_args_t;
+};
 
 /* query current session */
 
 /* query current session */
-typedef struct {
-       lst_sid_t __user       *lstio_ses_idp;          /* OUT: session id */
-       int __user             *lstio_ses_keyp;         /* OUT: local key */
+struct lstio_session_info_args {
+       struct lst_sid __user   *lstio_ses_idp;         /* OUT: session id */
+       int __user              *lstio_ses_keyp;        /* OUT: local key */
        /** OUT: session features */
        /** OUT: session features */
-       unsigned __user        *lstio_ses_featp;
-       lstcon_ndlist_ent_t __user *lstio_ses_ndinfo;   /* OUT: */
-       int                     lstio_ses_nmlen;        /* IN: name length */
-       char __user            *lstio_ses_namep;        /* OUT: session name */
-} lstio_session_info_args_t;
+       unsigned __user         *lstio_ses_featp;
+       struct lstcon_ndlist_ent __user *lstio_ses_ndinfo; /* OUT: */
+       int                      lstio_ses_nmlen;       /* IN: name length */
+       char __user             *lstio_ses_namep;       /* OUT: session name */
+};
 
 /* delete a session */
 
 /* delete a session */
-typedef struct {
+struct lstio_session_end_args {
        int                     lstio_ses_key;          /* IN: session key */
        int                     lstio_ses_key;          /* IN: session key */
-} lstio_session_end_args_t;
+};
 
 #define LST_OPC_SESSION                1
 #define LST_OPC_GROUP          2
 
 #define LST_OPC_SESSION                1
 #define LST_OPC_GROUP          2
@@ -262,7 +262,7 @@ typedef struct {
 #define LST_OPC_BATCHCLI       4
 #define LST_OPC_BATCHSRV       5
 
 #define LST_OPC_BATCHCLI       4
 #define LST_OPC_BATCHSRV       5
 
-typedef struct {
+struct lstio_debug_args {
        int                     lstio_dbg_key;          /* IN: session key */
        int                     lstio_dbg_type;         /* IN: debug sessin|batch|group|nodes list */
        int                     lstio_dbg_flags;        /* IN: reserved debug flags */
        int                     lstio_dbg_key;          /* IN: session key */
        int                     lstio_dbg_type;         /* IN: debug sessin|batch|group|nodes list */
        int                     lstio_dbg_flags;        /* IN: reserved debug flags */
@@ -274,25 +274,25 @@ typedef struct {
        lnet_process_id_t __user *lstio_dbg_idsp;       /* IN: id of test nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_dbg_resultp;
        lnet_process_id_t __user *lstio_dbg_idsp;       /* IN: id of test nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_dbg_resultp;
-} lstio_debug_args_t;
+};
 
 
-typedef struct {
+struct lstio_group_add_args {
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name length */
        char __user            *lstio_grp_namep;        /* IN: group name */
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name length */
        char __user            *lstio_grp_namep;        /* IN: group name */
-} lstio_group_add_args_t;
+};
 
 
-typedef struct {
+struct lstio_group_del_args {
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name length */
        char __user            *lstio_grp_namep;        /* IN: group name */
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name length */
        char __user            *lstio_grp_namep;        /* IN: group name */
-} lstio_group_del_args_t;
+};
 
 #define LST_GROUP_CLEAN                1                       /* remove inactive nodes in the group */
 #define LST_GROUP_REFRESH      2                       /* refresh inactive nodes in the group */
 #define LST_GROUP_RMND         3                       /* delete nodes from the group */
 
 
 #define LST_GROUP_CLEAN                1                       /* remove inactive nodes in the group */
 #define LST_GROUP_REFRESH      2                       /* refresh inactive nodes in the group */
 #define LST_GROUP_RMND         3                       /* delete nodes from the group */
 
-typedef struct {
+struct lstio_group_update_args {
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_opc;          /* IN: OPC */
        int                     lstio_grp_args;         /* IN: arguments */
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_opc;          /* IN: OPC */
        int                     lstio_grp_args;         /* IN: arguments */
@@ -302,9 +302,9 @@ typedef struct {
        lnet_process_id_t __user *lstio_grp_idsp;       /* IN: array of nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_grp_resultp;
        lnet_process_id_t __user *lstio_grp_idsp;       /* IN: array of nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_grp_resultp;
-} lstio_group_update_args_t;
+};
 
 
-typedef struct {
+struct lstio_group_nodes_args {
        int                      lstio_grp_key;         /* IN: session key */
        int                      lstio_grp_nmlen;       /* IN: name length */
        char __user             *lstio_grp_namep;       /* IN: group name */
        int                      lstio_grp_key;         /* IN: session key */
        int                      lstio_grp_nmlen;       /* IN: name length */
        char __user             *lstio_grp_namep;       /* IN: group name */
@@ -314,41 +314,41 @@ typedef struct {
        lnet_process_id_t __user *lstio_grp_idsp;       /* IN: nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_grp_resultp;
        lnet_process_id_t __user *lstio_grp_idsp;       /* IN: nodes */
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_grp_resultp;
-} lstio_group_nodes_args_t;
+};
 
 
-typedef struct {
+struct lstio_group_list_args {
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_idx;          /* IN: group idx */
        int                     lstio_grp_nmlen;        /* IN: name len */
        char __user            *lstio_grp_namep;        /* OUT: name */
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_idx;          /* IN: group idx */
        int                     lstio_grp_nmlen;        /* IN: name len */
        char __user            *lstio_grp_namep;        /* OUT: name */
-} lstio_group_list_args_t;
+};
 
 
-typedef struct {
+struct lstio_group_info_args {
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name len */
        char __user            *lstio_grp_namep;        /* IN: name */
        int                     lstio_grp_key;          /* IN: session key */
        int                     lstio_grp_nmlen;        /* IN: name len */
        char __user            *lstio_grp_namep;        /* IN: name */
-       lstcon_ndlist_ent_t __user *lstio_grp_entp;         /* OUT: description of group */
+       struct lstcon_ndlist_ent __user *lstio_grp_entp;/* OUT: description of group */
 
        int __user             *lstio_grp_idxp;         /* IN/OUT: node index */
        int __user             *lstio_grp_ndentp;       /* IN/OUT: # of nodent */
 
        int __user             *lstio_grp_idxp;         /* IN/OUT: node index */
        int __user             *lstio_grp_ndentp;       /* IN/OUT: # of nodent */
-       lstcon_node_ent_t __user *lstio_grp_dentsp;     /* OUT: nodent array */
-} lstio_group_info_args_t;
+       struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent array */
+};
 
 #define LST_DEFAULT_BATCH      "batch"                 /* default batch name */
 
 
 #define LST_DEFAULT_BATCH      "batch"                 /* default batch name */
 
-typedef struct {
+struct lstio_batch_add_args {
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
-} lstio_batch_add_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_del_args {
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
-} lstio_batch_del_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_run_args {
        /* IN: session key */
        int                      lstio_bat_key;
        /* IN: timeout for the batch */
        /* IN: session key */
        int                      lstio_bat_key;
        /* IN: timeout for the batch */
@@ -359,9 +359,9 @@ typedef struct {
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
-} lstio_batch_run_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_stop_args {
        /* IN: session key */
        int                      lstio_bat_key;
        /* IN: abort unfinished test RPC */
        /* IN: session key */
        int                      lstio_bat_key;
        /* IN: abort unfinished test RPC */
@@ -372,9 +372,9 @@ typedef struct {
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
-} lstio_batch_stop_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_query_args {
        /* IN: session key */
        int                     lstio_bat_key;
        /* IN: test index */
        /* IN: session key */
        int                     lstio_bat_key;
        /* IN: test index */
@@ -389,30 +389,30 @@ typedef struct {
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
        char __user             *lstio_bat_namep;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_bat_resultp;
-} lstio_batch_query_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_list_args {
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_idx;          /* IN: index */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_idx;          /* IN: index */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: batch name */
-} lstio_batch_list_args_t;
+};
 
 
-typedef struct {
+struct lstio_batch_info_args {
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: name */
        int                     lstio_bat_server;       /* IN: query server or not */
        int                     lstio_bat_testidx;      /* IN: test index */
        int                     lstio_bat_key;          /* IN: session key */
        int                     lstio_bat_nmlen;        /* IN: name length */
        char __user            *lstio_bat_namep;        /* IN: name */
        int                     lstio_bat_server;       /* IN: query server or not */
        int                     lstio_bat_testidx;      /* IN: test index */
-       lstcon_test_batch_ent_t __user *lstio_bat_entp; /* OUT: batch ent */
+       struct lstcon_test_batch_ent __user *lstio_bat_entp;/* OUT: batch ent */
 
        int __user             *lstio_bat_idxp;         /* IN/OUT: index of node */
        int __user             *lstio_bat_ndentp;       /* IN/OUT: # of nodent */
 
        int __user             *lstio_bat_idxp;         /* IN/OUT: index of node */
        int __user             *lstio_bat_ndentp;       /* IN/OUT: # of nodent */
-       lstcon_node_ent_t __user *lstio_bat_dentsp;     /* array of nodent */
-} lstio_batch_info_args_t;
+       struct lstcon_node_ent __user *lstio_bat_dentsp;/* array of nodent */
+};
 
 /* add stat in session */
 
 /* add stat in session */
-typedef struct {
+struct lstio_stat_args {
        /* IN: session key */
        int                     lstio_sta_key;
        /* IN: timeout for stat requst */
        /* IN: session key */
        int                     lstio_sta_key;
        /* IN: timeout for stat requst */
@@ -427,17 +427,17 @@ typedef struct {
        lnet_process_id_t __user *lstio_sta_idsp;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_sta_resultp;
        lnet_process_id_t __user *lstio_sta_idsp;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_sta_resultp;
-} lstio_stat_args_t;
+};
 
 
-typedef enum {
+enum lst_test_type {
        LST_TEST_BULK   = 1,
        LST_TEST_PING   = 2
        LST_TEST_BULK   = 1,
        LST_TEST_PING   = 2
-} lst_test_type_t;
+};
 
 /* create a test in a batch */
 #define LST_MAX_CONCUR         1024                    /* Max concurrency of test */
 
 
 /* create a test in a batch */
 #define LST_MAX_CONCUR         1024                    /* Max concurrency of test */
 
-typedef struct {
+struct lstio_test_args {
        int                     lstio_tes_key;          /* IN: session key */
        int                     lstio_tes_bat_nmlen;    /* IN: batch name len */
        char __user            *lstio_tes_bat_name;     /* IN: batch name */
        int                     lstio_tes_key;          /* IN: session key */
        int                     lstio_tes_bat_nmlen;    /* IN: batch name len */
        char __user            *lstio_tes_bat_name;     /* IN: batch name */
@@ -464,36 +464,36 @@ typedef struct {
        int __user              *lstio_tes_retp;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_tes_resultp;
        int __user              *lstio_tes_retp;
        /* OUT: list head of result buffer */
        struct list_head __user *lstio_tes_resultp;
-} lstio_test_args_t;
+};
 
 
-typedef enum {
+enum lst_brw_type {
        LST_BRW_READ    = 1,
        LST_BRW_WRITE   = 2
        LST_BRW_READ    = 1,
        LST_BRW_WRITE   = 2
-} lst_brw_type_t;
+};
 
 
-typedef enum {
+enum lst_brw_flags {
        LST_BRW_CHECK_NONE   = 1,
        LST_BRW_CHECK_SIMPLE = 2,
        LST_BRW_CHECK_FULL   = 3
        LST_BRW_CHECK_NONE   = 1,
        LST_BRW_CHECK_SIMPLE = 2,
        LST_BRW_CHECK_FULL   = 3
-} lst_brw_flags_t;
-
-typedef struct {
-       int                     blk_opc;                /* bulk operation code */
-       int                     blk_size;               /* size (bytes) */
-       int                     blk_time;               /* time of running the test*/
-       int                     blk_flags;              /* reserved flags */
-       int                     blk_cli_off;            /* bulk offset on client */
-       int                     blk_srv_off;            /* reserved: bulk offset on server */
-} lst_test_bulk_param_t;
-
-typedef struct {
-       int                     png_size;               /* size of ping message */
-       int                     png_time;               /* time */
-       int                     png_loop;               /* loop */
-       int                     png_flags;              /* reserved flags */
-} lst_test_ping_param_t;
-
-typedef struct {
+};
+
+struct lst_test_bulk_param {
+       int blk_opc;            /* bulk operation code */
+       int blk_size;           /* size (bytes) */
+       int blk_time;           /* time of running the test*/
+       int blk_flags;          /* reserved flags */
+       int blk_cli_off;        /* bulk offset on client */
+       int blk_srv_off;        /* reserved: bulk offset on server */
+};
+
+struct lst_test_ping_param {
+       int png_size;           /* size of ping message */
+       int png_time;           /* time */
+       int png_loop;           /* loop */
+       int png_flags;          /* reserved flags */
+};
+
+struct srpc_counters {
        __u32 errors;
        __u32 rpcs_sent;
        __u32 rpcs_rcvd;
        __u32 errors;
        __u32 rpcs_sent;
        __u32 rpcs_rcvd;
@@ -501,15 +501,15 @@ typedef struct {
        __u32 rpcs_expired;
        __u64 bulk_get;
        __u64 bulk_put;
        __u32 rpcs_expired;
        __u64 bulk_get;
        __u64 bulk_put;
-} WIRE_ATTR srpc_counters_t;
+} WIRE_ATTR;
 
 
-typedef struct {
+struct sfw_counters {
        /** milliseconds since current session started */
        __u32 running_ms;
        __u32 active_batches;
        __u32 zombie_sessions;
        __u32 brw_errors;
        __u32 ping_errors;
        /** milliseconds since current session started */
        __u32 running_ms;
        __u32 active_batches;
        __u32 zombie_sessions;
        __u32 brw_errors;
        __u32 ping_errors;
-} WIRE_ATTR sfw_counters_t;
+} WIRE_ATTR;
 
 #endif
 
 #endif
index 47d06a1..ac67085 100644 (file)
@@ -42,7 +42,7 @@
 #include "console.h"
 
 static int
 #include "console.h"
 
 static int
-lst_session_new_ioctl(lstio_session_new_args_t *args)
+lst_session_new_ioctl(struct lstio_session_new_args *args)
 {
         char      *name;
         int        rc;
 {
         char      *name;
         int        rc;
@@ -78,7 +78,7 @@ lst_session_new_ioctl(lstio_session_new_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_session_end_ioctl(lstio_session_end_args_t *args)
+lst_session_end_ioctl(struct lstio_session_end_args *args)
 {
         if (args->lstio_ses_key != console_session.ses_key)
                 return -EACCES;
 {
         if (args->lstio_ses_key != console_session.ses_key)
                 return -EACCES;
@@ -87,7 +87,7 @@ lst_session_end_ioctl(lstio_session_end_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_session_info_ioctl(lstio_session_info_args_t *args)
+lst_session_info_ioctl(struct lstio_session_info_args *args)
 {
         /* no checking of key */
 
 {
         /* no checking of key */
 
@@ -109,7 +109,7 @@ lst_session_info_ioctl(lstio_session_info_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_debug_ioctl(lstio_debug_args_t *args)
+lst_debug_ioctl(struct lstio_debug_args *args)
 {
         char   *name   = NULL;
         int     client = 1;
 {
         char   *name   = NULL;
         int     client = 1;
@@ -190,7 +190,7 @@ out:
 }
 
 static int
 }
 
 static int
-lst_group_add_ioctl(lstio_group_add_args_t *args)
+lst_group_add_ioctl(struct lstio_group_add_args *args)
 {
         char           *name;
         int             rc;
 {
         char           *name;
         int             rc;
@@ -223,7 +223,7 @@ lst_group_add_ioctl(lstio_group_add_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_group_del_ioctl(lstio_group_del_args_t *args)
+lst_group_del_ioctl(struct lstio_group_del_args *args)
 {
         int     rc;
         char   *name;
 {
         int     rc;
         char   *name;
@@ -256,7 +256,7 @@ lst_group_del_ioctl(lstio_group_del_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_group_update_ioctl(lstio_group_update_args_t *args)
+lst_group_update_ioctl(struct lstio_group_update_args *args)
 {
         int     rc;
         char   *name;
 {
         int     rc;
         char   *name;
@@ -313,7 +313,7 @@ lst_group_update_ioctl(lstio_group_update_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_nodes_add_ioctl(lstio_group_nodes_args_t *args)
+lst_nodes_add_ioctl(struct lstio_group_nodes_args *args)
 {
        unsigned feats;
         int     rc;
 {
        unsigned feats;
         int     rc;
@@ -358,7 +358,7 @@ lst_nodes_add_ioctl(lstio_group_nodes_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_group_list_ioctl(lstio_group_list_args_t *args)
+lst_group_list_ioctl(struct lstio_group_list_args *args)
 {
        if (args->lstio_grp_key != console_session.ses_key)
                 return -EACCES;
 {
        if (args->lstio_grp_key != console_session.ses_key)
                 return -EACCES;
@@ -375,7 +375,7 @@ lst_group_list_ioctl(lstio_group_list_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_group_info_ioctl(lstio_group_info_args_t *args)
+lst_group_info_ioctl(struct lstio_group_info_args *args)
 {
         char           *name;
         int             ndent;
 {
         char           *name;
         int             ndent;
@@ -438,7 +438,7 @@ lst_group_info_ioctl(lstio_group_info_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_add_ioctl(lstio_batch_add_args_t *args)
+lst_batch_add_ioctl(struct lstio_batch_add_args *args)
 {
         int             rc;
         char           *name;
 {
         int             rc;
         char           *name;
@@ -471,7 +471,7 @@ lst_batch_add_ioctl(lstio_batch_add_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_run_ioctl(lstio_batch_run_args_t *args)
+lst_batch_run_ioctl(struct lstio_batch_run_args *args)
 {
         int             rc;
         char           *name;
 {
         int             rc;
         char           *name;
@@ -505,7 +505,7 @@ lst_batch_run_ioctl(lstio_batch_run_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_stop_ioctl(lstio_batch_stop_args_t *args)
+lst_batch_stop_ioctl(struct lstio_batch_stop_args *args)
 {
         int             rc;
         char           *name;
 {
         int             rc;
         char           *name;
@@ -540,7 +540,7 @@ lst_batch_stop_ioctl(lstio_batch_stop_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_query_ioctl(lstio_batch_query_args_t *args)
+lst_batch_query_ioctl(struct lstio_batch_query_args *args)
 {
         char   *name;
         int     rc;
 {
         char   *name;
         int     rc;
@@ -581,7 +581,7 @@ lst_batch_query_ioctl(lstio_batch_query_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_list_ioctl(lstio_batch_list_args_t *args)
+lst_batch_list_ioctl(struct lstio_batch_list_args *args)
 {
         if (args->lstio_bat_key != console_session.ses_key)
                 return -EACCES;
 {
         if (args->lstio_bat_key != console_session.ses_key)
                 return -EACCES;
@@ -598,7 +598,7 @@ lst_batch_list_ioctl(lstio_batch_list_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_batch_info_ioctl(lstio_batch_info_args_t *args)
+lst_batch_info_ioctl(struct lstio_batch_info_args *args)
 {
         char           *name;
         int             rc;
 {
         char           *name;
         int             rc;
@@ -663,7 +663,7 @@ lst_batch_info_ioctl(lstio_batch_info_args_t *args)
 }
 
 static int
 }
 
 static int
-lst_stat_query_ioctl(lstio_stat_args_t *args)
+lst_stat_query_ioctl(struct lstio_stat_args *args)
 {
         int             rc;
        char           *name = NULL;
 {
         int             rc;
        char           *name = NULL;
@@ -709,7 +709,7 @@ lst_stat_query_ioctl(lstio_stat_args_t *args)
        return rc;
 }
 
        return rc;
 }
 
-static int lst_test_add_ioctl(lstio_test_args_t *args)
+static int lst_test_add_ioctl(struct lstio_test_args *args)
 {
        char            *batch_name;
        char            *src_name = NULL;
 {
        char            *batch_name;
        char            *src_name = NULL;
@@ -851,69 +851,69 @@ lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
                goto out;
        }
 
                goto out;
        }
 
-       memset(&console_session.ses_trans_stat, 0, sizeof(lstcon_trans_stat_t));
+       memset(&console_session.ses_trans_stat, 0, sizeof(struct lstcon_trans_stat));
 
        switch (opc) {
        case LSTIO_SESSION_NEW:
 
        switch (opc) {
        case LSTIO_SESSION_NEW:
-               rc = lst_session_new_ioctl((lstio_session_new_args_t *)buf);
+               rc = lst_session_new_ioctl((struct lstio_session_new_args *)buf);
                break;
        case LSTIO_SESSION_END:
                break;
        case LSTIO_SESSION_END:
-               rc = lst_session_end_ioctl((lstio_session_end_args_t *)buf);
+               rc = lst_session_end_ioctl((struct lstio_session_end_args *)buf);
                break;
        case LSTIO_SESSION_INFO:
                break;
        case LSTIO_SESSION_INFO:
-               rc = lst_session_info_ioctl((lstio_session_info_args_t *)buf);
+               rc = lst_session_info_ioctl((struct lstio_session_info_args *)buf);
                break;
        case LSTIO_DEBUG:
                break;
        case LSTIO_DEBUG:
-               rc = lst_debug_ioctl((lstio_debug_args_t *)buf);
+               rc = lst_debug_ioctl((struct lstio_debug_args *)buf);
                break;
        case LSTIO_GROUP_ADD:
                break;
        case LSTIO_GROUP_ADD:
-               rc = lst_group_add_ioctl((lstio_group_add_args_t *)buf);
+               rc = lst_group_add_ioctl((struct lstio_group_add_args *)buf);
                break;
        case LSTIO_GROUP_DEL:
                break;
        case LSTIO_GROUP_DEL:
-               rc = lst_group_del_ioctl((lstio_group_del_args_t *)buf);
+               rc = lst_group_del_ioctl((struct lstio_group_del_args *)buf);
                break;
        case LSTIO_GROUP_UPDATE:
                break;
        case LSTIO_GROUP_UPDATE:
-               rc = lst_group_update_ioctl((lstio_group_update_args_t *)buf);
+               rc = lst_group_update_ioctl((struct lstio_group_update_args *)buf);
                break;
        case LSTIO_NODES_ADD:
                break;
        case LSTIO_NODES_ADD:
-               rc = lst_nodes_add_ioctl((lstio_group_nodes_args_t *)buf);
+               rc = lst_nodes_add_ioctl((struct lstio_group_nodes_args *)buf);
                break;
        case LSTIO_GROUP_LIST:
                break;
        case LSTIO_GROUP_LIST:
-               rc = lst_group_list_ioctl((lstio_group_list_args_t *)buf);
+               rc = lst_group_list_ioctl((struct lstio_group_list_args *)buf);
                break;
        case LSTIO_GROUP_INFO:
                break;
        case LSTIO_GROUP_INFO:
-               rc = lst_group_info_ioctl((lstio_group_info_args_t *)buf);
+               rc = lst_group_info_ioctl((struct lstio_group_info_args *)buf);
                break;
        case LSTIO_BATCH_ADD:
                break;
        case LSTIO_BATCH_ADD:
-               rc = lst_batch_add_ioctl((lstio_batch_add_args_t *)buf);
+               rc = lst_batch_add_ioctl((struct lstio_batch_add_args *)buf);
                break;
        case LSTIO_BATCH_START:
                break;
        case LSTIO_BATCH_START:
-               rc = lst_batch_run_ioctl((lstio_batch_run_args_t *)buf);
+               rc = lst_batch_run_ioctl((struct lstio_batch_run_args *)buf);
                break;
        case LSTIO_BATCH_STOP:
                break;
        case LSTIO_BATCH_STOP:
-               rc = lst_batch_stop_ioctl((lstio_batch_stop_args_t *)buf);
+               rc = lst_batch_stop_ioctl((struct lstio_batch_stop_args *)buf);
                break;
        case LSTIO_BATCH_QUERY:
                break;
        case LSTIO_BATCH_QUERY:
-               rc = lst_batch_query_ioctl((lstio_batch_query_args_t *)buf);
+               rc = lst_batch_query_ioctl((struct lstio_batch_query_args *)buf);
                break;
        case LSTIO_BATCH_LIST:
                break;
        case LSTIO_BATCH_LIST:
-               rc = lst_batch_list_ioctl((lstio_batch_list_args_t *)buf);
+               rc = lst_batch_list_ioctl((struct lstio_batch_list_args *)buf);
                break;
        case LSTIO_BATCH_INFO:
                break;
        case LSTIO_BATCH_INFO:
-               rc = lst_batch_info_ioctl((lstio_batch_info_args_t *)buf);
+               rc = lst_batch_info_ioctl((struct lstio_batch_info_args *)buf);
                break;
        case LSTIO_TEST_ADD:
                break;
        case LSTIO_TEST_ADD:
-               rc = lst_test_add_ioctl((lstio_test_args_t *)buf);
+               rc = lst_test_add_ioctl((struct lstio_test_args *)buf);
                break;
        case LSTIO_STAT_QUERY:
                break;
        case LSTIO_STAT_QUERY:
-               rc = lst_stat_query_ioctl((lstio_stat_args_t *)buf);
+               rc = lst_stat_query_ioctl((struct lstio_stat_args *)buf);
                break;
        default:
                rc = -EINVAL;
        }
 
        if (copy_to_user(data->ioc_pbuf2, &console_session.ses_trans_stat,
                break;
        default:
                rc = -EINVAL;
        }
 
        if (copy_to_user(data->ioc_pbuf2, &console_session.ses_trans_stat,
-                        sizeof(lstcon_trans_stat_t)))
+                        sizeof(struct lstcon_trans_stat)))
                rc = -EFAULT;
 out:
        mutex_unlock(&console_session.ses_mutex);
                rc = -EFAULT;
 out:
        mutex_unlock(&console_session.ses_mutex);
index 86fc4aa..9913d20 100644 (file)
@@ -44,7 +44,7 @@
 #include "console.h"
 
 void lstcon_rpc_stat_reply(lstcon_rpc_trans_t *, srpc_msg_t *,
 #include "console.h"
 
 void lstcon_rpc_stat_reply(lstcon_rpc_trans_t *, srpc_msg_t *,
-                          lstcon_node_t *, lstcon_trans_stat_t *);
+                          lstcon_node_t *, struct lstcon_trans_stat *);
 
 static void
 lstcon_rpc_done(srpc_client_rpc_t *rpc)
 
 static void
 lstcon_rpc_done(srpc_client_rpc_t *rpc)
@@ -418,7 +418,7 @@ lstcon_rpc_get_reply(lstcon_rpc_t *crpc, srpc_msg_t **msgpp)
 }
 
 void
 }
 
 void
-lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans, lstcon_trans_stat_t *stat)
+lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans, struct lstcon_trans_stat *stat)
 {
        lstcon_rpc_t    *crpc;
        srpc_msg_t      *rep;
 {
        lstcon_rpc_t    *crpc;
        srpc_msg_t      *rep;
@@ -470,7 +470,7 @@ lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
 {
        struct list_head      tmp;
        struct list_head     __user *next;
 {
        struct list_head      tmp;
        struct list_head     __user *next;
-        lstcon_rpc_ent_t     *ent;
+       struct lstcon_rpc_ent     *ent;
         srpc_generic_reply_t *rep;
         lstcon_rpc_t         *crpc;
         srpc_msg_t           *msg;
         srpc_generic_reply_t *rep;
         lstcon_rpc_t         *crpc;
         srpc_msg_t           *msg;
@@ -493,7 +493,7 @@ lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
 
                next = tmp.next;
 
 
                next = tmp.next;
 
-               ent = list_entry(next, lstcon_rpc_ent_t, rpe_link);
+               ent = list_entry(next, struct lstcon_rpc_ent, rpe_link);
 
                LASSERT(crpc->crp_stamp != 0);
 
 
                LASSERT(crpc->crp_stamp != 0);
 
@@ -521,7 +521,7 @@ lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
                rep = (srpc_generic_reply_t *)&msg->msg_body.reply;
 
                if (copy_to_user(&ent->rpe_sid,
                rep = (srpc_generic_reply_t *)&msg->msg_body.reply;
 
                if (copy_to_user(&ent->rpe_sid,
-                                &rep->sid, sizeof(lst_sid_t)) ||
+                                &rep->sid, sizeof(rep->sid)) ||
                    copy_to_user(&ent->rpe_fwk_errno,
                                 &rep->status, sizeof(rep->status)))
                        return -EFAULT;
                    copy_to_user(&ent->rpe_fwk_errno,
                                 &rep->status, sizeof(rep->status)))
                        return -EFAULT;
@@ -769,7 +769,7 @@ lstcon_dstnodes_prep(lstcon_group_t *grp, int idx,
 }
 
 static int
 }
 
 static int
-lstcon_pingrpc_prep(lst_test_ping_param_t *param, srpc_test_reqst_t *req)
+lstcon_pingrpc_prep(struct lst_test_ping_param *param, srpc_test_reqst_t *req)
 {
         test_ping_req_t *prq = &req->tsr_u.ping;
 
 {
         test_ping_req_t *prq = &req->tsr_u.ping;
 
@@ -780,7 +780,7 @@ lstcon_pingrpc_prep(lst_test_ping_param_t *param, srpc_test_reqst_t *req)
 }
 
 static int
 }
 
 static int
-lstcon_bulkrpc_v0_prep(lst_test_bulk_param_t *param, srpc_test_reqst_t *req)
+lstcon_bulkrpc_v0_prep(struct lst_test_bulk_param *param, srpc_test_reqst_t *req)
 {
        test_bulk_req_t *brq = &req->tsr_u.bulk_v0;
 
 {
        test_bulk_req_t *brq = &req->tsr_u.bulk_v0;
 
@@ -793,7 +793,7 @@ lstcon_bulkrpc_v0_prep(lst_test_bulk_param_t *param, srpc_test_reqst_t *req)
 }
 
 static int
 }
 
 static int
-lstcon_bulkrpc_v1_prep(lst_test_bulk_param_t *param, bool is_client,
+lstcon_bulkrpc_v1_prep(struct lst_test_bulk_param *param, bool is_client,
                       srpc_test_reqst_t *req)
 {
        test_bulk_req_v1_t *brq = &req->tsr_u.bulk_v1;
                       srpc_test_reqst_t *req)
 {
        test_bulk_req_v1_t *brq = &req->tsr_u.bulk_v1;
@@ -890,17 +890,17 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats,
         switch (test->tes_type) {
         case LST_TEST_PING:
                 trq->tsr_service = SRPC_SERVICE_PING;
         switch (test->tes_type) {
         case LST_TEST_PING:
                 trq->tsr_service = SRPC_SERVICE_PING;
-               rc = lstcon_pingrpc_prep((lst_test_ping_param_t *)
+               rc = lstcon_pingrpc_prep((struct lst_test_ping_param *)
                                         &test->tes_param[0], trq);
                break;
 
        case LST_TEST_BULK:
                trq->tsr_service = SRPC_SERVICE_BRW;
                if ((feats & LST_FEAT_BULK_LEN) == 0) {
                                         &test->tes_param[0], trq);
                break;
 
        case LST_TEST_BULK:
                trq->tsr_service = SRPC_SERVICE_BRW;
                if ((feats & LST_FEAT_BULK_LEN) == 0) {
-                       rc = lstcon_bulkrpc_v0_prep((lst_test_bulk_param_t *)
+                       rc = lstcon_bulkrpc_v0_prep((struct lst_test_bulk_param *)
                                                    &test->tes_param[0], trq);
                } else {
                                                    &test->tes_param[0], trq);
                } else {
-                       rc = lstcon_bulkrpc_v1_prep((lst_test_bulk_param_t *)
+                       rc = lstcon_bulkrpc_v1_prep((struct lst_test_bulk_param *)
                                                    &test->tes_param[0],
                                                    trq->tsr_is_client, trq);
                }
                                                    &test->tes_param[0],
                                                    trq->tsr_is_client, trq);
                }
@@ -963,7 +963,7 @@ lstcon_sesnew_stat_reply(lstcon_rpc_trans_t *trans,
 
 void
 lstcon_rpc_stat_reply(lstcon_rpc_trans_t *trans, srpc_msg_t *msg,
 
 void
 lstcon_rpc_stat_reply(lstcon_rpc_trans_t *trans, srpc_msg_t *msg,
-                      lstcon_node_t *nd, lstcon_trans_stat_t *stat)
+                     lstcon_node_t *nd, struct lstcon_trans_stat *stat)
 {
         srpc_rmsn_reply_t  *rmsn_rep;
         srpc_debug_reply_t *dbg_rep;
 {
         srpc_rmsn_reply_t  *rmsn_rep;
         srpc_debug_reply_t *dbg_rep;
@@ -1319,7 +1319,7 @@ lstcon_rpc_pinger_stop(void)
         lstcon_rpc_trans_stat(console_session.ses_ping, lstcon_trans_stat());
         lstcon_rpc_trans_destroy(console_session.ses_ping);
 
         lstcon_rpc_trans_stat(console_session.ses_ping, lstcon_trans_stat());
         lstcon_rpc_trans_destroy(console_session.ses_ping);
 
-        memset(lstcon_trans_stat(), 0, sizeof(lstcon_trans_stat_t));
+       memset(lstcon_trans_stat(), 0, sizeof(struct lstcon_trans_stat));
 
         console_session.ses_ping = NULL;
 }
 
         console_session.ses_ping = NULL;
 }
index cf6d6da..3ac7005 100644 (file)
@@ -108,7 +108,7 @@ typedef struct lstcon_rpc_trans {
 
 typedef int (* lstcon_rpc_cond_func_t)(int, struct lstcon_node *, void *);
 typedef int (*lstcon_rpc_readent_func_t)(int, srpc_msg_t *,
 
 typedef int (* lstcon_rpc_cond_func_t)(int, struct lstcon_node *, void *);
 typedef int (*lstcon_rpc_readent_func_t)(int, srpc_msg_t *,
-                                        lstcon_rpc_ent_t __user *);
+                                        struct lstcon_rpc_ent __user *);
 
 int  lstcon_sesrpc_prep(struct lstcon_node *nd, int transop,
                        unsigned version, lstcon_rpc_t **crpc);
 
 int  lstcon_sesrpc_prep(struct lstcon_node *nd, int transop,
                        unsigned version, lstcon_rpc_t **crpc);
@@ -128,7 +128,7 @@ int  lstcon_rpc_trans_ndlist(struct list_head *ndlist,
                             void *arg, lstcon_rpc_cond_func_t condition,
                             lstcon_rpc_trans_t **transpp);
 void lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans,
                             void *arg, lstcon_rpc_cond_func_t condition,
                             lstcon_rpc_trans_t **transpp);
 void lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans,
-                          lstcon_trans_stat_t *stat);
+                          struct lstcon_trans_stat *stat);
 int  lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
                                  struct list_head __user *head_up,
                                  lstcon_rpc_readent_func_t readent);
 int  lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
                                  struct list_head __user *head_up,
                                  lstcon_rpc_readent_func_t readent);
index 4567c90..34d262b 100644 (file)
@@ -368,7 +368,7 @@ lstcon_sesrpc_condition(int transop, lstcon_node_t *nd, void *arg)
 
 static int
 lstcon_sesrpc_readent(int transop, srpc_msg_t *msg,
 
 static int
 lstcon_sesrpc_readent(int transop, srpc_msg_t *msg,
-                     lstcon_rpc_ent_t __user *ent_up)
+                     struct lstcon_rpc_ent __user *ent_up)
 {
         srpc_debug_reply_t *rep;
 
 {
         srpc_debug_reply_t *rep;
 
@@ -738,7 +738,7 @@ lstcon_group_list(int index, int len, char __user *name_up)
 
 static int
 lstcon_nodes_getent(struct list_head *head, int *index_p,
 
 static int
 lstcon_nodes_getent(struct list_head *head, int *index_p,
-                   int *count_p, lstcon_node_ent_t __user *dents_up)
+                   int *count_p, struct lstcon_node_ent __user *dents_up)
 {
         lstcon_ndlink_t  *ndl;
         lstcon_node_t    *nd;
 {
         lstcon_ndlink_t  *ndl;
         lstcon_node_t    *nd;
@@ -777,11 +777,11 @@ lstcon_nodes_getent(struct list_head *head, int *index_p,
 }
 
 int
 }
 
 int
-lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
+lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gents_p,
                  int *index_p, int *count_p,
                  int *index_p, int *count_p,
-                 lstcon_node_ent_t __user *dents_up)
+                 struct lstcon_node_ent __user *dents_up)
 {
 {
-        lstcon_ndlist_ent_t *gentp;
+       struct lstcon_ndlist_ent *gentp;
         lstcon_group_t      *grp;
         lstcon_ndlink_t     *ndl;
         int                  rc;
         lstcon_group_t      *grp;
         lstcon_ndlink_t     *ndl;
         int                  rc;
@@ -802,7 +802,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
         }
 
         /* non-verbose query */
         }
 
         /* non-verbose query */
-        LIBCFS_ALLOC(gentp, sizeof(lstcon_ndlist_ent_t));
+       LIBCFS_ALLOC(gentp, sizeof(struct lstcon_ndlist_ent));
         if (gentp == NULL) {
                 CERROR("Can't allocate ndlist_ent\n");
                lstcon_group_decref(grp);
         if (gentp == NULL) {
                 CERROR("Can't allocate ndlist_ent\n");
                lstcon_group_decref(grp);
@@ -814,9 +814,9 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
                 LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
 
        rc = copy_to_user(gents_p, gentp,
                 LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
 
        rc = copy_to_user(gents_p, gentp,
-                         sizeof(lstcon_ndlist_ent_t)) ? -EFAULT : 0;
+                         sizeof(struct lstcon_ndlist_ent)) ? -EFAULT : 0;
 
 
-       LIBCFS_FREE(gentp, sizeof(lstcon_ndlist_ent_t));
+       LIBCFS_FREE(gentp, sizeof(struct lstcon_ndlist_ent));
 
        lstcon_group_decref(grp);
 
 
        lstcon_group_decref(grp);
 
@@ -923,11 +923,11 @@ lstcon_batch_list(int index, int len, char __user *name_up)
 }
 
 int
 }
 
 int
-lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
+lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up,
                  int server, int testidx, int *index_p, int *ndent_p,
                  int server, int testidx, int *index_p, int *ndent_p,
-                 lstcon_node_ent_t __user *dents_up)
+                 struct lstcon_node_ent __user *dents_up)
 {
 {
-        lstcon_test_batch_ent_t *entp;
+       struct lstcon_test_batch_ent *entp;
        struct list_head        *clilst;
        struct list_head        *srvlst;
         lstcon_test_t           *test = NULL;
        struct list_head        *clilst;
        struct list_head        *srvlst;
         lstcon_test_t           *test = NULL;
@@ -966,7 +966,7 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
         }
 
         /* non-verbose query */
         }
 
         /* non-verbose query */
-        LIBCFS_ALLOC(entp, sizeof(lstcon_test_batch_ent_t));
+       LIBCFS_ALLOC(entp, sizeof(struct lstcon_test_batch_ent));
         if (entp == NULL)
                 return -ENOMEM;
 
         if (entp == NULL)
                 return -ENOMEM;
 
@@ -988,9 +988,9 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
                LST_NODE_STATE_COUNTER(ndl->ndl_node, &entp->tbe_srv_nle);
 
        rc = copy_to_user(ent_up, entp,
                LST_NODE_STATE_COUNTER(ndl->ndl_node, &entp->tbe_srv_nle);
 
        rc = copy_to_user(ent_up, entp,
-                         sizeof(lstcon_test_batch_ent_t)) ? -EFAULT : 0;
+                         sizeof(struct lstcon_test_batch_ent)) ? -EFAULT : 0;
 
 
-       LIBCFS_FREE(entp, sizeof(lstcon_test_batch_ent_t));
+       LIBCFS_FREE(entp, sizeof(struct lstcon_test_batch_ent));
 
        return rc;
 }
 
        return rc;
 }
@@ -1384,7 +1384,7 @@ lstcon_test_find(lstcon_batch_t *batch, int idx, lstcon_test_t **testpp)
 
 static int
 lstcon_tsbrpc_readent(int transop, srpc_msg_t *msg,
 
 static int
 lstcon_tsbrpc_readent(int transop, srpc_msg_t *msg,
-                     lstcon_rpc_ent_t __user *ent_up)
+                     struct lstcon_rpc_ent __user *ent_up)
 {
         srpc_batch_reply_t *rep = &msg->msg_body.bat_reply;
 
 {
         srpc_batch_reply_t *rep = &msg->msg_body.bat_reply;
 
@@ -1463,18 +1463,18 @@ lstcon_test_batch_query(char *name, int testidx, int client,
 
 static int
 lstcon_statrpc_readent(int transop, srpc_msg_t *msg,
 
 static int
 lstcon_statrpc_readent(int transop, srpc_msg_t *msg,
-                      lstcon_rpc_ent_t __user *ent_up)
+                      struct lstcon_rpc_ent __user *ent_up)
 {
        srpc_stat_reply_t *rep = &msg->msg_body.stat_reply;
 {
        srpc_stat_reply_t *rep = &msg->msg_body.stat_reply;
-       sfw_counters_t __user  *sfwk_stat;
-       srpc_counters_t __user *srpc_stat;
+       struct sfw_counters __user  *sfwk_stat;
+       struct srpc_counters __user *srpc_stat;
        lnet_counters_t __user *lnet_stat;
 
         if (rep->str_status != 0)
                 return 0;
 
        lnet_counters_t __user *lnet_stat;
 
         if (rep->str_status != 0)
                 return 0;
 
-       sfwk_stat = (sfw_counters_t __user *)&ent_up->rpe_payload[0];
-       srpc_stat = (srpc_counters_t __user *)
+       sfwk_stat = (struct sfw_counters __user *)&ent_up->rpe_payload[0];
+       srpc_stat = (struct srpc_counters __user *)
                ((char __user *)sfwk_stat + sizeof(*sfwk_stat));
        lnet_stat = (lnet_counters_t __user *)
                ((char __user *)srpc_stat + sizeof(*srpc_stat));
                ((char __user *)sfwk_stat + sizeof(*sfwk_stat));
        lnet_stat = (lnet_counters_t __user *)
                ((char __user *)srpc_stat + sizeof(*srpc_stat));
@@ -1689,14 +1689,14 @@ lstcon_nodes_debug(int timeout,
 }
 
 int
 }
 
 int
-lstcon_session_match(lst_sid_t sid)
+lstcon_session_match(struct lst_sid sid)
 {
         return (console_session.ses_id.ses_nid   == sid.ses_nid &&
                 console_session.ses_id.ses_stamp == sid.ses_stamp) ?  1: 0;
 }
 
 static void
 {
         return (console_session.ses_id.ses_nid   == sid.ses_nid &&
                 console_session.ses_id.ses_stamp == sid.ses_stamp) ?  1: 0;
 }
 
 static void
-lstcon_new_session_id(lst_sid_t *sid)
+lstcon_new_session_id(struct lst_sid *sid)
 {
         lnet_process_id_t      id;
 
 {
         lnet_process_id_t      id;
 
@@ -1709,7 +1709,7 @@ lstcon_new_session_id(lst_sid_t *sid)
 
 int
 lstcon_session_new(char *name, int key, unsigned feats,
 
 int
 lstcon_session_new(char *name, int key, unsigned feats,
-                  int timeout, int force, lst_sid_t __user *sid_up)
+                  int timeout, int force, struct lst_sid __user *sid_up)
 {
         int     rc = 0;
         int     i;
 {
         int     rc = 0;
         int     i;
@@ -1768,7 +1768,7 @@ lstcon_session_new(char *name, int key, unsigned feats,
         }
 
        if (copy_to_user(sid_up, &console_session.ses_id,
         }
 
        if (copy_to_user(sid_up, &console_session.ses_id,
-                             sizeof(lst_sid_t)) == 0)
+                            sizeof(struct lst_sid)) == 0)
                 return rc;
 
         lstcon_session_end();
                 return rc;
 
         lstcon_session_end();
@@ -1777,12 +1777,12 @@ lstcon_session_new(char *name, int key, unsigned feats,
 }
 
 int
 }
 
 int
-lstcon_session_info(lst_sid_t __user *sid_up, int __user *key_up,
+lstcon_session_info(struct lst_sid __user *sid_up, int __user *key_up,
                    unsigned __user *featp,
                    unsigned __user *featp,
-                   lstcon_ndlist_ent_t __user *ndinfo_up,
+                   struct lstcon_ndlist_ent __user *ndinfo_up,
                    char __user *name_up, int len)
 {
                    char __user *name_up, int len)
 {
-        lstcon_ndlist_ent_t *entp;
+       struct lstcon_ndlist_ent *entp;
         lstcon_ndlink_t     *ndl;
         int                  rc = 0;
 
         lstcon_ndlink_t     *ndl;
         int                  rc = 0;
 
@@ -1797,7 +1797,7 @@ lstcon_session_info(lst_sid_t __user *sid_up, int __user *key_up,
                LST_NODE_STATE_COUNTER(ndl->ndl_node, entp);
 
        if (copy_to_user(sid_up, &console_session.ses_id,
                LST_NODE_STATE_COUNTER(ndl->ndl_node, entp);
 
        if (copy_to_user(sid_up, &console_session.ses_id,
-                             sizeof(lst_sid_t)) ||
+                        sizeof(struct lst_sid)) ||
            copy_to_user(key_up, &console_session.ses_key,
                             sizeof(*key_up)) ||
            copy_to_user(featp, &console_session.ses_features,
            copy_to_user(key_up, &console_session.ses_key,
                             sizeof(*key_up)) ||
            copy_to_user(featp, &console_session.ses_features,
index 583c745..48a446e 100644 (file)
@@ -78,7 +78,7 @@ typedef struct {
 #define LST_BATCH_RUNNING       0xB1            /* running batch */
 
 typedef struct lstcon_tsb_hdr {
 #define LST_BATCH_RUNNING       0xB1            /* running batch */
 
 typedef struct lstcon_tsb_hdr {
-        lst_bid_t               tsb_id;         /* batch ID */
+       struct lst_bid          tsb_id;         /* batch ID */
         int                     tsb_index;      /* test index */
 } lstcon_tsb_hdr_t;
 
         int                     tsb_index;      /* test index */
 } lstcon_tsb_hdr_t;
 
@@ -145,7 +145,7 @@ typedef struct lstcon_test {
 
 typedef struct {
        struct mutex            ses_mutex;      /* only 1 thread in session */
 
 typedef struct {
        struct mutex            ses_mutex;      /* only 1 thread in session */
-        lst_sid_t               ses_id;         /* global session id */
+       struct lst_sid               ses_id;         /* global session id */
         int                     ses_key;        /* local session key */
         int                     ses_state;      /* state of session */
         int                     ses_timeout;    /* timeout in seconds */
         int                     ses_key;        /* local session key */
         int                     ses_state;      /* state of session */
         int                     ses_timeout;    /* timeout in seconds */
@@ -164,7 +164,7 @@ typedef struct {
         char                    ses_name[LST_NAME_SIZE];  /* session name */
         lstcon_rpc_trans_t     *ses_ping;       /* session pinger */
         stt_timer_t             ses_ping_timer; /* timer for pinger */
         char                    ses_name[LST_NAME_SIZE];  /* session name */
         lstcon_rpc_trans_t     *ses_ping;       /* session pinger */
         stt_timer_t             ses_ping_timer; /* timer for pinger */
-        lstcon_trans_stat_t     ses_trans_stat; /* transaction stats */
+       struct lstcon_trans_stat     ses_trans_stat; /* transaction stats */
 
        struct list_head        ses_trans_list; /* global list of transaction */
        struct list_head        ses_grp_list;   /* global list of groups */
 
        struct list_head        ses_trans_list; /* global list of transaction */
        struct list_head        ses_grp_list;   /* global list of groups */
@@ -179,7 +179,7 @@ typedef struct {
 
 extern lstcon_session_t         console_session;
 
 
 extern lstcon_session_t         console_session;
 
-static inline lstcon_trans_stat_t *
+static inline struct lstcon_trans_stat *
 lstcon_trans_stat(void)
 {
         return &console_session.ses_trans_stat;
 lstcon_trans_stat(void)
 {
         return &console_session.ses_trans_stat;
@@ -193,12 +193,12 @@ lstcon_id2hash(lnet_process_id_t id, struct list_head *hash)
         return &hash[idx];
 }
 
         return &hash[idx];
 }
 
-extern int lstcon_session_match(lst_sid_t sid);
+extern int lstcon_session_match(struct lst_sid sid);
 extern int lstcon_session_new(char *name, int key, unsigned version,
 extern int lstcon_session_new(char *name, int key, unsigned version,
-                             int timeout, int flags, lst_sid_t __user *sid_up);
-extern int lstcon_session_info(lst_sid_t __user *sid_up, int __user *key,
+                             int timeout, int flags, struct lst_sid __user *sid_up);
+extern int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key,
                               unsigned __user *verp,
                               unsigned __user *verp,
-                              lstcon_ndlist_ent_t __user *entp,
+                              struct lstcon_ndlist_ent __user *entp,
                               char __user *name_up, int len);
 extern int lstcon_session_end(void);
 extern int lstcon_session_debug(int timeout,
                               char __user *name_up, int len);
 extern int lstcon_session_end(void);
 extern int lstcon_session_debug(int timeout,
@@ -222,9 +222,9 @@ extern int lstcon_nodes_add(char *name, int nnd,
 extern int lstcon_nodes_remove(char *name, int nnd,
                               lnet_process_id_t __user *nds_up,
                               struct list_head __user *result_up);
 extern int lstcon_nodes_remove(char *name, int nnd,
                               lnet_process_id_t __user *nds_up,
                               struct list_head __user *result_up);
-extern int lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gent_up,
+extern int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up,
                             int *index_p, int *ndent_p,
                             int *index_p, int *ndent_p,
-                            lstcon_node_ent_t __user *ndents_up);
+                            struct lstcon_node_ent __user *ndents_up);
 extern int lstcon_group_list(int idx, int len, char __user *name_up);
 extern int lstcon_batch_add(char *name);
 extern int lstcon_batch_run(char *name, int timeout,
 extern int lstcon_group_list(int idx, int len, char __user *name_up);
 extern int lstcon_batch_add(char *name);
 extern int lstcon_batch_run(char *name, int timeout,
@@ -236,9 +236,11 @@ extern int lstcon_test_batch_query(char *name, int testidx,
                                   struct list_head __user *result_up);
 extern int lstcon_batch_del(char *name);
 extern int lstcon_batch_list(int idx, int namelen, char __user *name_up);
                                   struct list_head __user *result_up);
 extern int lstcon_batch_del(char *name);
 extern int lstcon_batch_list(int idx, int namelen, char __user *name_up);
-extern int lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
+extern int lstcon_batch_info(char *name,
+                            struct lstcon_test_batch_ent __user *ent_up,
                             int server, int testidx, int *index_p,
                             int server, int testidx, int *index_p,
-                            int *ndent_p, lstcon_node_ent_t __user *dents_up);
+                            int *ndent_p,
+                            struct lstcon_node_ent __user *dents_up);
 extern int lstcon_group_stat(char *grp_name, int timeout,
                             struct list_head __user *result_up);
 extern int lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up,
 extern int lstcon_group_stat(char *grp_name, int timeout,
                             struct list_head __user *result_up);
 extern int lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up,
index 5c451c8..6853536 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "selftest.h"
 
 
 #include "selftest.h"
 
-lst_sid_t LST_INVALID_SID = {LNET_NID_ANY, -1};
+struct lst_sid LST_INVALID_SID = {LNET_NID_ANY, -1};
 
 static int session_timeout = 100;
 module_param(session_timeout, int, 0444);
 
 static int session_timeout = 100;
 module_param(session_timeout, int, 0444);
@@ -264,7 +264,7 @@ sfw_session_expired (void *data)
 }
 
 static inline void
 }
 
 static inline void
-sfw_init_session(sfw_session_t *sn, lst_sid_t sid,
+sfw_init_session(sfw_session_t *sn, struct lst_sid sid,
                 unsigned features, const char *name)
 {
         stt_timer_t *timer = &sn->sn_timer;
                 unsigned features, const char *name)
 {
         stt_timer_t *timer = &sn->sn_timer;
@@ -330,7 +330,7 @@ sfw_client_rpc_fini (srpc_client_rpc_t *rpc)
 }
 
 static sfw_batch_t *
 }
 
 static sfw_batch_t *
-sfw_find_batch (lst_bid_t bid)
+sfw_find_batch(struct lst_bid bid)
 {
        sfw_session_t *sn = sfw_data.fw_session;
        sfw_batch_t   *bat;
 {
        sfw_session_t *sn = sfw_data.fw_session;
        sfw_batch_t   *bat;
@@ -346,7 +346,7 @@ sfw_find_batch (lst_bid_t bid)
 }
 
 static sfw_batch_t *
 }
 
 static sfw_batch_t *
-sfw_bid2batch (lst_bid_t bid)
+sfw_bid2batch(struct lst_bid bid)
 {
         sfw_session_t *sn = sfw_data.fw_session;
         sfw_batch_t   *bat;
 {
         sfw_session_t *sn = sfw_data.fw_session;
         sfw_batch_t   *bat;
@@ -375,7 +375,7 @@ static int
 sfw_get_stats (srpc_stat_reqst_t *request, srpc_stat_reply_t *reply)
 {
         sfw_session_t  *sn = sfw_data.fw_session;
 sfw_get_stats (srpc_stat_reqst_t *request, srpc_stat_reply_t *reply)
 {
         sfw_session_t  *sn = sfw_data.fw_session;
-        sfw_counters_t *cnt = &reply->str_fw;
+       struct sfw_counters *cnt = &reply->str_fw;
         sfw_batch_t    *bat;
         struct timeval  tv;
 
         sfw_batch_t    *bat;
         struct timeval  tv;
 
index dc26cab..a3c64e9 100644 (file)
@@ -55,7 +55,7 @@ static struct smoketest_rpc {
        srpc_service_t  *rpc_services[SRPC_SERVICE_MAX_ID + 1];
        lnet_handle_eq_t rpc_lnet_eq;   /* _the_ LNet event queue */
        srpc_state_t     rpc_state;
        srpc_service_t  *rpc_services[SRPC_SERVICE_MAX_ID + 1];
        lnet_handle_eq_t rpc_lnet_eq;   /* _the_ LNet event queue */
        srpc_state_t     rpc_state;
-       srpc_counters_t  rpc_counters;
+       struct srpc_counters     rpc_counters;
        __u64            rpc_matchbits; /* matchbits counter */
 } srpc_data;
 
        __u64            rpc_matchbits; /* matchbits counter */
 } srpc_data;
 
@@ -67,16 +67,16 @@ srpc_serv_portal(int svc_id)
 }
 
 /* forward ref's */
 }
 
 /* forward ref's */
-int srpc_handle_rpc (swi_workitem_t *wi);
+int srpc_handle_rpc(swi_workitem_t *wi);
 
 
-void srpc_get_counters (srpc_counters_t *cnt)
+void srpc_get_counters(struct srpc_counters *cnt)
 {
        spin_lock(&srpc_data.rpc_glock);
        *cnt = srpc_data.rpc_counters;
        spin_unlock(&srpc_data.rpc_glock);
 }
 
 {
        spin_lock(&srpc_data.rpc_glock);
        *cnt = srpc_data.rpc_counters;
        spin_unlock(&srpc_data.rpc_glock);
 }
 
-void srpc_set_counters (const srpc_counters_t *cnt)
+void srpc_set_counters(const struct srpc_counters *cnt)
 {
        spin_lock(&srpc_data.rpc_glock);
        srpc_data.rpc_counters = *cnt;
 {
        spin_lock(&srpc_data.rpc_glock);
        srpc_data.rpc_counters = *cnt;
index 697e575..e91386d 100644 (file)
@@ -75,56 +75,56 @@ typedef struct {
 
 typedef struct {
         __u32                   status;
 
 typedef struct {
         __u32                   status;
-        lst_sid_t               sid;
+       struct lst_sid               sid;
 } WIRE_ATTR srpc_generic_reply_t;
 
 /* FRAMEWORK RPCs */
 typedef struct {
         __u64                  mksn_rpyid;      /* reply buffer matchbits */
 } WIRE_ATTR srpc_generic_reply_t;
 
 /* FRAMEWORK RPCs */
 typedef struct {
         __u64                  mksn_rpyid;      /* reply buffer matchbits */
-        lst_sid_t               mksn_sid;        /* session id */
+       struct lst_sid               mksn_sid;        /* session id */
         __u32                  mksn_force;      /* use brute force */
         char                   mksn_name[LST_NAME_SIZE];
 } WIRE_ATTR srpc_mksn_reqst_t;                         /* make session request */
 
 typedef struct {
         __u32                   mksn_status;      /* session status */
         __u32                  mksn_force;      /* use brute force */
         char                   mksn_name[LST_NAME_SIZE];
 } WIRE_ATTR srpc_mksn_reqst_t;                         /* make session request */
 
 typedef struct {
         __u32                   mksn_status;      /* session status */
-        lst_sid_t               mksn_sid;         /* session id */
+       struct lst_sid               mksn_sid;         /* session id */
         __u32                   mksn_timeout;     /* session timeout */
         char                   mksn_name[LST_NAME_SIZE];
 } WIRE_ATTR srpc_mksn_reply_t; /* make session reply */
 
 typedef struct {
         __u64                  rmsn_rpyid;      /* reply buffer matchbits */
         __u32                   mksn_timeout;     /* session timeout */
         char                   mksn_name[LST_NAME_SIZE];
 } WIRE_ATTR srpc_mksn_reply_t; /* make session reply */
 
 typedef struct {
         __u64                  rmsn_rpyid;      /* reply buffer matchbits */
-        lst_sid_t              rmsn_sid;        /* session id */
+       struct lst_sid          rmsn_sid;        /* session id */
 } WIRE_ATTR srpc_rmsn_reqst_t; /* remove session request */
 
 typedef struct {
         __u32                  rmsn_status;
 } WIRE_ATTR srpc_rmsn_reqst_t; /* remove session request */
 
 typedef struct {
         __u32                  rmsn_status;
-        lst_sid_t              rmsn_sid;        /* session id */
+       struct lst_sid          rmsn_sid;        /* session id */
 } WIRE_ATTR srpc_rmsn_reply_t; /* remove session reply */
 
 typedef struct {
         __u64                  join_rpyid;     /* reply buffer matchbits */
 } WIRE_ATTR srpc_rmsn_reply_t; /* remove session reply */
 
 typedef struct {
         __u64                  join_rpyid;     /* reply buffer matchbits */
-        lst_sid_t               join_sid;       /* session id to join */
+       struct lst_sid               join_sid;       /* session id to join */
         char                    join_group[LST_NAME_SIZE]; /* group name */
 } WIRE_ATTR srpc_join_reqst_t;
 
 typedef struct {
         __u32                   join_status;    /* returned status */
         char                    join_group[LST_NAME_SIZE]; /* group name */
 } WIRE_ATTR srpc_join_reqst_t;
 
 typedef struct {
         __u32                   join_status;    /* returned status */
-        lst_sid_t               join_sid;       /* session id */
+       struct lst_sid               join_sid;       /* session id */
         __u32                  join_timeout;   /* # seconds' inactivity to expire */
         char                    join_session[LST_NAME_SIZE]; /* session name */
 } WIRE_ATTR srpc_join_reply_t;
 
 typedef struct {
         __u64                   dbg_rpyid;      /* reply buffer matchbits */ 
         __u32                  join_timeout;   /* # seconds' inactivity to expire */
         char                    join_session[LST_NAME_SIZE]; /* session name */
 } WIRE_ATTR srpc_join_reply_t;
 
 typedef struct {
         __u64                   dbg_rpyid;      /* reply buffer matchbits */ 
-        lst_sid_t               dbg_sid;        /* session id */
+       struct lst_sid               dbg_sid;        /* session id */
         __u32                   dbg_flags;      /* bitmap of debug */
 } WIRE_ATTR srpc_debug_reqst_t;
 
 typedef struct {
         __u32                   dbg_status;     /* returned code */
         __u32                   dbg_flags;      /* bitmap of debug */
 } WIRE_ATTR srpc_debug_reqst_t;
 
 typedef struct {
         __u32                   dbg_status;     /* returned code */
-        lst_sid_t               dbg_sid;        /* session id */
+       struct lst_sid               dbg_sid;        /* session id */
         __u32                   dbg_timeout;    /* session timeout */
         __u32                   dbg_nbatch;     /* # of batches in the node */
         char                    dbg_name[LST_NAME_SIZE]; /* session name */
         __u32                   dbg_timeout;    /* session timeout */
         __u32                   dbg_nbatch;     /* # of batches in the node */
         char                    dbg_name[LST_NAME_SIZE]; /* session name */
@@ -136,8 +136,8 @@ typedef struct {
 
 typedef struct {
         __u64                   bar_rpyid;      /* reply buffer matchbits */ 
 
 typedef struct {
         __u64                   bar_rpyid;      /* reply buffer matchbits */ 
-        lst_sid_t               bar_sid;        /* session id */
-        lst_bid_t               bar_bid;        /* batch id */
+       struct lst_sid               bar_sid;        /* session id */
+       struct lst_bid               bar_bid;        /* batch id */
         __u32                   bar_opc;        /* create/start/stop batch */
         __u32                   bar_testidx;    /* index of test */
         __u32                   bar_arg;        /* parameters */
         __u32                   bar_opc;        /* create/start/stop batch */
         __u32                   bar_testidx;    /* index of test */
         __u32                   bar_arg;        /* parameters */
@@ -145,22 +145,22 @@ typedef struct {
 
 typedef struct {
         __u32                   bar_status;     /* status of request */
 
 typedef struct {
         __u32                   bar_status;     /* status of request */
-        lst_sid_t               bar_sid;        /* session id */
+       struct lst_sid          bar_sid;        /* session id */
         __u32                   bar_active;     /* # of active tests in batch/test */
         __u32                   bar_time;       /* remained time */
 } WIRE_ATTR srpc_batch_reply_t;
 
 typedef struct {
         __u64                   str_rpyid;      /* reply buffer matchbits */
         __u32                   bar_active;     /* # of active tests in batch/test */
         __u32                   bar_time;       /* remained time */
 } WIRE_ATTR srpc_batch_reply_t;
 
 typedef struct {
         __u64                   str_rpyid;      /* reply buffer matchbits */
-        lst_sid_t               str_sid;        /* session id */
+       struct lst_sid          str_sid;        /* session id */
         __u32                   str_type;       /* type of stat */
 } WIRE_ATTR srpc_stat_reqst_t;
 
 typedef struct {
         __u32                   str_status;
         __u32                   str_type;       /* type of stat */
 } WIRE_ATTR srpc_stat_reqst_t;
 
 typedef struct {
         __u32                   str_status;
-        lst_sid_t               str_sid;
-        sfw_counters_t          str_fw;
-        srpc_counters_t         str_rpc;
+       struct lst_sid          str_sid;
+       struct sfw_counters     str_fw;
+       struct srpc_counters    str_rpc;
         lnet_counters_t         str_lnet;
 } WIRE_ATTR srpc_stat_reply_t;
 
         lnet_counters_t         str_lnet;
 } WIRE_ATTR srpc_stat_reply_t;
 
@@ -189,8 +189,8 @@ typedef struct {
 typedef struct {
        __u64                   tsr_rpyid;      /* reply buffer matchbits */
        __u64                   tsr_bulkid;     /* bulk buffer matchbits */
 typedef struct {
        __u64                   tsr_rpyid;      /* reply buffer matchbits */
        __u64                   tsr_bulkid;     /* bulk buffer matchbits */
-       lst_sid_t               tsr_sid;        /* session id */
-       lst_bid_t               tsr_bid;        /* batch id */
+       struct lst_sid          tsr_sid;        /* session id */
+       struct lst_bid          tsr_bid;        /* batch id */
        __u32                   tsr_service;    /* test type: bulk|ping|... */
        /* test client loop count or # server buffers needed */
        __u32                   tsr_loop;
        __u32                   tsr_service;    /* test type: bulk|ping|... */
        /* test client loop count or # server buffers needed */
        __u32                   tsr_loop;
@@ -208,7 +208,7 @@ typedef struct {
 
 typedef struct {
        __u32                   tsr_status;     /* returned code */
 
 typedef struct {
        __u32                   tsr_status;     /* returned code */
-       lst_sid_t               tsr_sid;
+       struct lst_sid          tsr_sid;
 } WIRE_ATTR srpc_test_reply_t;
 
 /* TEST RPCs */
 } WIRE_ATTR srpc_test_reply_t;
 
 /* TEST RPCs */
index 2f67640..c5961b1 100644 (file)
@@ -321,7 +321,7 @@ typedef struct srpc_service {
 typedef struct {
        /* chain on fw_zombie_sessions */
        struct list_head        sn_list;
 typedef struct {
        /* chain on fw_zombie_sessions */
        struct list_head        sn_list;
-       lst_sid_t               sn_id;          /* unique identifier */
+       struct lst_sid          sn_id;          /* unique identifier */
        /* # seconds' inactivity to expire */
        unsigned int            sn_timeout;
        int                     sn_timer_active;
        /* # seconds' inactivity to expire */
        unsigned int            sn_timeout;
        int                     sn_timer_active;
@@ -340,7 +340,7 @@ typedef struct {
 
 typedef struct {
        struct list_head        bat_list;       /* chain on sn_batches */
 
 typedef struct {
        struct list_head        bat_list;       /* chain on sn_batches */
-       lst_bid_t               bat_id;         /* batch id */
+       struct lst_bid          bat_id;         /* batch id */
        int                     bat_error;      /* error code of batch */
        sfw_session_t           *bat_session;   /* batch's session */
        atomic_t                bat_nactive;    /* # of active tests */
        int                     bat_error;      /* error code of batch */
        sfw_session_t           *bat_session;   /* batch's session */
        atomic_t                bat_nactive;    /* # of active tests */
@@ -442,8 +442,8 @@ void srpc_abort_service(srpc_service_t *sv);
 int srpc_finish_service(srpc_service_t *sv);
 int srpc_service_add_buffers(srpc_service_t *sv, int nbuffer);
 void srpc_service_remove_buffers(srpc_service_t *sv, int nbuffer);
 int srpc_finish_service(srpc_service_t *sv);
 int srpc_service_add_buffers(srpc_service_t *sv, int nbuffer);
 void srpc_service_remove_buffers(srpc_service_t *sv, int nbuffer);
-void srpc_get_counters(srpc_counters_t *cnt);
-void srpc_set_counters(const srpc_counters_t *cnt);
+void srpc_get_counters(struct srpc_counters *cnt);
+void srpc_set_counters(const struct srpc_counters *cnt);
 
 extern struct cfs_wi_sched *lst_sched_serial;
 extern struct cfs_wi_sched **lst_sched_test;
 
 extern struct cfs_wi_sched *lst_sched_serial;
 extern struct cfs_wi_sched **lst_sched_test;
index e57efb2..ff6b01e 100644 (file)
 #include <lnet/lnet.h>
 #include <utils/obdctl.h>
 
 #include <lnet/lnet.h>
 #include <utils/obdctl.h>
 
-lst_sid_t LST_INVALID_SID = {LNET_NID_ANY, -1};
-static lst_sid_t           session_id;
+struct lst_sid LST_INVALID_SID = {LNET_NID_ANY, -1};
+static struct lst_sid session_id;
 static int                 session_key;
 
 /* All nodes running 2.6.50 or later understand feature LST_FEAT_BULK_LEN */
 static unsigned                session_features = LST_FEATS_MASK;
 static int                 session_key;
 
 /* All nodes running 2.6.50 or later understand feature LST_FEAT_BULK_LEN */
 static unsigned                session_features = LST_FEATS_MASK;
-static lstcon_trans_stat_t     trans_stat;
+static struct lstcon_trans_stat        trans_stat;
 
 typedef struct list_string {
        struct list_string *lstr_next;
 
 typedef struct list_string {
        struct list_string *lstr_next;
@@ -404,10 +404,10 @@ lst_print_error(char *sub, const char *def_format, ...)
 void
 lst_free_rpcent(struct list_head *head)
 {
 void
 lst_free_rpcent(struct list_head *head)
 {
-       lstcon_rpc_ent_t *ent;
+       struct lstcon_rpc_ent *ent;
 
        while (!list_empty(head)) {
 
        while (!list_empty(head)) {
-               ent = list_entry(head->next, lstcon_rpc_ent_t, rpe_link);
+               ent = list_entry(head->next, struct lstcon_rpc_ent, rpe_link);
 
                list_del(&ent->rpe_link);
                free(ent);
 
                list_del(&ent->rpe_link);
                free(ent);
@@ -417,7 +417,7 @@ lst_free_rpcent(struct list_head *head)
 void
 lst_reset_rpcent(struct list_head *head)
 {
 void
 lst_reset_rpcent(struct list_head *head)
 {
-       lstcon_rpc_ent_t *ent;
+       struct lstcon_rpc_ent *ent;
 
        list_for_each_entry(ent, head, rpe_link) {
                ent->rpe_sid       = LST_INVALID_SID;
 
        list_for_each_entry(ent, head, rpe_link) {
                ent->rpe_sid       = LST_INVALID_SID;
@@ -430,17 +430,17 @@ lst_reset_rpcent(struct list_head *head)
 int
 lst_alloc_rpcent(struct list_head *head, int count, int offset)
 {
 int
 lst_alloc_rpcent(struct list_head *head, int count, int offset)
 {
-        lstcon_rpc_ent_t *ent;
+       struct lstcon_rpc_ent *ent;
         int               i;
 
         for (i = 0; i < count; i++) {
         int               i;
 
         for (i = 0; i < count; i++) {
-                ent = malloc(offsetof(lstcon_rpc_ent_t, rpe_payload[offset]));
+               ent = malloc(offsetof(struct lstcon_rpc_ent, rpe_payload[offset]));
                 if (ent == NULL) {
                         lst_free_rpcent(head);
                         return -1;
                 }
 
                 if (ent == NULL) {
                         lst_free_rpcent(head);
                         return -1;
                 }
 
-                memset(ent, 0, offsetof(lstcon_rpc_ent_t, rpe_payload[offset]));
+               memset(ent, 0, offsetof(struct lstcon_rpc_ent, rpe_payload[offset]));
 
                ent->rpe_sid      = LST_INVALID_SID;
                ent->rpe_peer.nid = LNET_NID_ANY;
 
                ent->rpe_sid      = LST_INVALID_SID;
                ent->rpe_peer.nid = LNET_NID_ANY;
@@ -454,7 +454,7 @@ lst_alloc_rpcent(struct list_head *head, int count, int offset)
 void
 lst_print_transerr(struct list_head *head, char *optstr)
 {
 void
 lst_print_transerr(struct list_head *head, char *optstr)
 {
-       lstcon_rpc_ent_t *ent;
+       struct lstcon_rpc_ent *ent;
 
        list_for_each_entry(ent, head, rpe_link) {
                if (ent->rpe_rpc_errno == 0 && ent->rpe_fwk_errno == 0)
 
        list_for_each_entry(ent, head, rpe_link) {
                if (ent->rpe_rpc_errno == 0 && ent->rpe_fwk_errno == 0)
@@ -474,11 +474,11 @@ lst_print_transerr(struct list_head *head, char *optstr)
 }
 
 int lst_info_batch_ioctl(char *batch, int test, int server,
 }
 
 int lst_info_batch_ioctl(char *batch, int test, int server,
-                        lstcon_test_batch_ent_t *entp, int *idxp,
-                        int *ndentp, lstcon_node_ent_t *dentsp);
+                       struct lstcon_test_batch_ent *entp, int *idxp,
+                       int *ndentp, struct lstcon_node_ent *dentsp);
 
 
-int lst_info_group_ioctl(char *name, lstcon_ndlist_ent_t *gent,
-                         int *idx, int *count, lstcon_node_ent_t *dents);
+int lst_info_group_ioctl(char *name, struct lstcon_ndlist_ent *gent,
+                        int *idx, int *count, struct lstcon_node_ent *dents);
 
 int lst_query_batch_ioctl(char *batch, int test, int server,
                          int timeout, struct list_head *head);
 
 int lst_query_batch_ioctl(char *batch, int test, int server,
                          int timeout, struct list_head *head);
@@ -516,9 +516,9 @@ lst_ioctl(unsigned int opc, void *buf, int len)
 }
 
 int
 }
 
 int
-lst_new_session_ioctl(char *name, int timeout, int force, lst_sid_t *sid)
+lst_new_session_ioctl(char *name, int timeout, int force, struct lst_sid *sid)
 {
 {
-        lstio_session_new_args_t args = {0};
+       struct lstio_session_new_args args = { 0 };
 
         args.lstio_ses_key     = session_key;
         args.lstio_ses_timeout = timeout;
 
         args.lstio_ses_key     = session_key;
         args.lstio_ses_timeout = timeout;
@@ -625,9 +625,9 @@ jt_lst_new_session(int argc,  char **argv)
 
 int
 lst_session_info_ioctl(char *name, int len, int *key, unsigned *featp,
 
 int
 lst_session_info_ioctl(char *name, int len, int *key, unsigned *featp,
-                      lst_sid_t *sid, lstcon_ndlist_ent_t *ndinfo)
+                      struct lst_sid *sid, struct lstcon_ndlist_ent *ndinfo)
 {
 {
-       lstio_session_info_args_t args = {0};
+       struct lstio_session_info_args args = { 0 };
 
        args.lstio_ses_idp     = sid;
        args.lstio_ses_keyp    = key;
 
        args.lstio_ses_idp     = sid;
        args.lstio_ses_keyp    = key;
@@ -642,8 +642,8 @@ lst_session_info_ioctl(char *name, int len, int *key, unsigned *featp,
 int
 jt_lst_show_session(int argc, char **argv)
 {
 int
 jt_lst_show_session(int argc, char **argv)
 {
-        lstcon_ndlist_ent_t ndinfo;
-        lst_sid_t           sid;
+       struct lstcon_ndlist_ent ndinfo;
+       struct lst_sid sid;
         char                name[LST_NAME_SIZE];
        unsigned            feats;
        int                 key;
         char                name[LST_NAME_SIZE];
        unsigned            feats;
        int                 key;
@@ -668,10 +668,10 @@ jt_lst_show_session(int argc, char **argv)
 int
 lst_end_session_ioctl(void)
 {
 int
 lst_end_session_ioctl(void)
 {
-        lstio_session_end_args_t args = {0};
+       struct lstio_session_end_args args = { 0 };
 
 
-        args.lstio_ses_key =  session_key;
-        return lst_ioctl (LSTIO_SESSION_END, &args, sizeof(args));
+       args.lstio_ses_key = session_key;
+       return lst_ioctl(LSTIO_SESSION_END, &args, sizeof(args));
 }
 
 int
 }
 
 int
@@ -719,7 +719,7 @@ int
 lst_ping_ioctl(char *str, int type, int timeout,
               int count, lnet_process_id_t *ids, struct list_head *head)
 {
 lst_ping_ioctl(char *str, int type, int timeout,
               int count, lnet_process_id_t *ids, struct list_head *head)
 {
-        lstio_debug_args_t args = {0};
+       struct lstio_debug_args args = { 0 };
 
         args.lstio_dbg_key     = session_key;
         args.lstio_dbg_type    = type;
 
         args.lstio_dbg_key     = session_key;
         args.lstio_dbg_type    = type;
@@ -738,9 +738,9 @@ int
 lst_get_node_count(int type, char *str, int *countp, lnet_process_id_t **idspp)
 {
         char                    buf[LST_NAME_SIZE];
 lst_get_node_count(int type, char *str, int *countp, lnet_process_id_t **idspp)
 {
         char                    buf[LST_NAME_SIZE];
-        lstcon_test_batch_ent_t ent;
-        lstcon_ndlist_ent_t    *entp = &ent.tbe_cli_nle;
-        lst_sid_t               sid;
+       struct lstcon_test_batch_ent ent;
+       struct lstcon_ndlist_ent    *entp = &ent.tbe_cli_nle;
+       struct lst_sid sid;
        unsigned                feats;
        int                     key;
        int                     rc;
        unsigned                feats;
        int                     key;
        int                     rc;
@@ -781,7 +781,7 @@ jt_lst_ping(int argc,  char **argv)
 {
        struct list_head   head;
        lnet_process_id_t *ids = NULL;
 {
        struct list_head   head;
        lnet_process_id_t *ids = NULL;
-       lstcon_rpc_ent_t  *ent = NULL;
+       struct lstcon_rpc_ent  *ent = NULL;
         char              *str = NULL;
         int                optidx  = 0;
         int                server  = 0;
         char              *str = NULL;
         int                optidx  = 0;
         int                server  = 0;
@@ -911,10 +911,10 @@ out:
 }
 
 int
 }
 
 int
-lst_add_nodes_ioctl (char *name, int count, lnet_process_id_t *ids,
-                    unsigned *featp, struct list_head *resultp)
+lst_add_nodes_ioctl(char *name, int count, lnet_process_id_t *ids,
+                   unsigned *featp, struct list_head *resultp)
 {
 {
-        lstio_group_nodes_args_t args = {0};
+       struct lstio_group_nodes_args args = { 0 };
 
         args.lstio_grp_key     = session_key;
         args.lstio_grp_nmlen   = strlen(name);
 
         args.lstio_grp_key     = session_key;
         args.lstio_grp_nmlen   = strlen(name);
@@ -930,7 +930,7 @@ lst_add_nodes_ioctl (char *name, int count, lnet_process_id_t *ids,
 int
 lst_del_group_ioctl(char *name)
 {
 int
 lst_del_group_ioctl(char *name)
 {
-       lstio_group_del_args_t args = {0};
+       struct lstio_group_del_args args = { 0 };
 
        args.lstio_grp_key   = session_key;
        args.lstio_grp_nmlen = strlen(name);
 
        args.lstio_grp_key   = session_key;
        args.lstio_grp_nmlen = strlen(name);
@@ -976,9 +976,9 @@ lst_del_group(char *grp_name)
 }
 
 int
 }
 
 int
-lst_add_group_ioctl (char *name)
+lst_add_group_ioctl(char *name)
 {
 {
-        lstio_group_add_args_t args = {0};
+       struct lstio_group_add_args args = { 0 };
 
         args.lstio_grp_key     =  session_key;
         args.lstio_grp_nmlen   =  strlen(name);
 
         args.lstio_grp_key     =  session_key;
         args.lstio_grp_nmlen   =  strlen(name);
@@ -1144,7 +1144,7 @@ int
 lst_update_group_ioctl(int opc, char *name, int clean, int count,
                       lnet_process_id_t *ids, struct list_head *resultp)
 {
 lst_update_group_ioctl(int opc, char *name, int clean, int count,
                       lnet_process_id_t *ids, struct list_head *resultp)
 {
-        lstio_group_update_args_t args = {0};
+       struct lstio_group_update_args args = { 0 };
 
         args.lstio_grp_key      = session_key;
         args.lstio_grp_opc      = opc;
 
         args.lstio_grp_key      = session_key;
         args.lstio_grp_opc      = opc;
@@ -1286,7 +1286,7 @@ jt_lst_update_group(int argc, char **argv)
 int
 lst_list_group_ioctl(int len, char *name, int idx)
 {
 int
 lst_list_group_ioctl(int len, char *name, int idx)
 {
-        lstio_group_list_args_t args = {0};
+       struct lstio_group_list_args args = { 0 };
 
         args.lstio_grp_key   = session_key;
         args.lstio_grp_idx   = idx;
 
         args.lstio_grp_key   = session_key;
         args.lstio_grp_idx   = idx;
@@ -1297,10 +1297,10 @@ lst_list_group_ioctl(int len, char *name, int idx)
 }
 
 int
 }
 
 int
-lst_info_group_ioctl(char *name, lstcon_ndlist_ent_t *gent,
-                     int *idx, int *count, lstcon_node_ent_t *dents)
+lst_info_group_ioctl(char *name, struct lstcon_ndlist_ent *gent,
+                    int *idx, int *count, struct lstcon_node_ent *dents)
 {
 {
-        lstio_group_info_args_t args = {0};
+       struct lstio_group_info_args args = { 0 };
 
         args.lstio_grp_key    = session_key;
         args.lstio_grp_nmlen  = strlen(name);
 
         args.lstio_grp_key    = session_key;
         args.lstio_grp_nmlen  = strlen(name);
@@ -1346,8 +1346,8 @@ lst_list_group_all(void)
 int
 jt_lst_list_group(int argc, char **argv)
 {
 int
 jt_lst_list_group(int argc, char **argv)
 {
-        lstcon_ndlist_ent_t  gent;
-        lstcon_node_ent_t   *dents;
+       struct lstcon_ndlist_ent gent;
+       struct lstcon_node_ent   *dents;
         int               optidx  = 0;
         int               verbose = 0;
         int               active  = 0;
         int               optidx  = 0;
         int               verbose = 0;
         int               active  = 0;
@@ -1452,7 +1452,7 @@ jt_lst_list_group(int argc, char **argv)
 
                 count = gent.nle_nnode;
 
 
                 count = gent.nle_nnode;
 
-                dents = malloc(count * sizeof(lstcon_node_ent_t));
+               dents = malloc(count * sizeof(struct lstcon_node_ent));
                 if (dents == NULL) {
                         fprintf(stderr, "Failed to malloc: %s\n",
                                 strerror(errno));
                 if (dents == NULL) {
                         fprintf(stderr, "Failed to malloc: %s\n",
                                 strerror(errno));
@@ -1494,7 +1494,7 @@ int
 lst_stat_ioctl (char *name, int count, lnet_process_id_t *idsp,
                int timeout, struct list_head *resultp)
 {
 lst_stat_ioctl (char *name, int count, lnet_process_id_t *idsp,
                int timeout, struct list_head *resultp)
 {
-       lstio_stat_args_t args = {0};
+       struct lstio_stat_args args = { 0 };
 
        args.lstio_sta_key     = session_key;
        args.lstio_sta_timeout = timeout;
 
        args.lstio_sta_key     = session_key;
        args.lstio_sta_timeout = timeout;
@@ -1565,8 +1565,8 @@ lst_stat_req_param_alloc(char *name, lst_stat_req_param_t **srpp, int save_old)
 
         for (i = 0; i < count; i++) {
                 rc = lst_alloc_rpcent(&srp->srp_result[i], srp->srp_count,
 
         for (i = 0; i < count; i++) {
                 rc = lst_alloc_rpcent(&srp->srp_result[i], srp->srp_count,
-                                      sizeof(sfw_counters_t)  +
-                                      sizeof(srpc_counters_t) +
+                                     sizeof(struct sfw_counters)  +
+                                     sizeof(struct srpc_counters) +
                                       sizeof(lnet_counters_t));
                 if (rc != 0) {
                         fprintf(stderr, "Out of memory\n");
                                       sizeof(lnet_counters_t));
                 if (rc != 0) {
                         fprintf(stderr, "Out of memory\n");
@@ -1779,12 +1779,12 @@ lst_print_stat(char *name, struct list_head *resultp,
               int mbs)
 {
        struct list_head        tmp[2];
               int mbs)
 {
        struct list_head        tmp[2];
-        lstcon_rpc_ent_t *new;
-        lstcon_rpc_ent_t *old;
-        sfw_counters_t   *sfwk_new;
-        sfw_counters_t   *sfwk_old;
-        srpc_counters_t  *srpc_new;
-        srpc_counters_t  *srpc_old;
+       struct lstcon_rpc_ent *new;
+       struct lstcon_rpc_ent *old;
+       struct sfw_counters   *sfwk_new;
+       struct sfw_counters   *sfwk_old;
+       struct srpc_counters  *srpc_new;
+       struct srpc_counters  *srpc_old;
         lnet_counters_t  *lnet_new;
         lnet_counters_t  *lnet_old;
         float             delta;
         lnet_counters_t  *lnet_new;
         lnet_counters_t  *lnet_old;
         float             delta;
@@ -1801,9 +1801,9 @@ lst_print_stat(char *name, struct list_head *resultp,
                         break;
                 }
 
                         break;
                 }
 
-               new = list_entry(resultp[idx].next, lstcon_rpc_ent_t,
+               new = list_entry(resultp[idx].next, struct lstcon_rpc_ent,
                                      rpe_link);
                                      rpe_link);
-               old = list_entry(resultp[1 - idx].next, lstcon_rpc_ent_t,
+               old = list_entry(resultp[1 - idx].next, struct lstcon_rpc_ent,
                                      rpe_link);
 
                 /* first time get stats result, can't calculate diff */
                                      rpe_link);
 
                 /* first time get stats result, can't calculate diff */
@@ -1828,11 +1828,11 @@ lst_print_stat(char *name, struct list_head *resultp,
                         continue;
                 }
 
                         continue;
                 }
 
-                sfwk_new = (sfw_counters_t *)&new->rpe_payload[0];
-                sfwk_old = (sfw_counters_t *)&old->rpe_payload[0];
+               sfwk_new = (struct sfw_counters *)&new->rpe_payload[0];
+               sfwk_old = (struct sfw_counters *)&old->rpe_payload[0];
 
 
-                srpc_new = (srpc_counters_t *)((char *)sfwk_new + sizeof(*sfwk_new));
-                srpc_old = (srpc_counters_t *)((char *)sfwk_old + sizeof(*sfwk_old));
+               srpc_new = (struct srpc_counters *)((char *)sfwk_new + sizeof(*sfwk_new));
+               srpc_old = (struct srpc_counters *)((char *)sfwk_old + sizeof(*sfwk_old));
 
                 lnet_new = (lnet_counters_t *)((char *)srpc_new + sizeof(*srpc_new));
                 lnet_old = (lnet_counters_t *)((char *)srpc_old + sizeof(*srpc_old));
 
                 lnet_new = (lnet_counters_t *)((char *)srpc_new + sizeof(*srpc_new));
                 lnet_old = (lnet_counters_t *)((char *)srpc_old + sizeof(*srpc_old));
@@ -2060,9 +2060,9 @@ jt_lst_show_error(int argc, char **argv)
 {
        struct list_head            head;
         lst_stat_req_param_t *srp;
 {
        struct list_head            head;
         lst_stat_req_param_t *srp;
-        lstcon_rpc_ent_t     *ent;
-        sfw_counters_t       *sfwk;
-        srpc_counters_t      *srpc;
+       struct lstcon_rpc_ent     *ent;
+       struct sfw_counters       *sfwk;
+       struct srpc_counters      *srpc;
         int                   show_rpc = 1;
         int                   optidx   = 0;
         int                   rc       = 0;
         int                   show_rpc = 1;
         int                   optidx   = 0;
         int                   rc       = 0;
@@ -2142,8 +2142,8 @@ jt_lst_show_error(int argc, char **argv)
                                 continue;
                         }
 
                                 continue;
                         }
 
-                        sfwk = (sfw_counters_t *)&ent->rpe_payload[0];
-                        srpc = (srpc_counters_t *)((char *)sfwk + sizeof(*sfwk));
+                       sfwk = (struct sfw_counters *)&ent->rpe_payload[0];
+                       srpc = (struct srpc_counters *)((char *)sfwk + sizeof(*sfwk));
 
                         if (srpc->errors == 0 &&
                             sfwk->brw_errors == 0 && sfwk->ping_errors == 0)
 
                         if (srpc->errors == 0 &&
                             sfwk->brw_errors == 0 && sfwk->ping_errors == 0)
@@ -2181,9 +2181,9 @@ out:
 }
 
 int
 }
 
 int
-lst_add_batch_ioctl (char *name)
+lst_add_batch_ioctl(char *name)
 {
 {
-        lstio_batch_add_args_t args = {0};
+       struct lstio_batch_add_args args = { 0 };
 
         args.lstio_bat_key   = session_key;
         args.lstio_bat_nmlen = strlen(name);
 
         args.lstio_bat_key   = session_key;
         args.lstio_bat_nmlen = strlen(name);
@@ -2229,7 +2229,7 @@ jt_lst_add_batch(int argc, char **argv)
 int
 lst_start_batch_ioctl(char *name, int timeout, struct list_head *resultp)
 {
 int
 lst_start_batch_ioctl(char *name, int timeout, struct list_head *resultp)
 {
-        lstio_batch_run_args_t args = {0};
+       struct lstio_batch_run_args args = { 0 };
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_timeout = timeout;
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_timeout = timeout;
@@ -2332,7 +2332,7 @@ jt_lst_start_batch(int argc, char **argv)
 int
 lst_stop_batch_ioctl(char *name, int force, struct list_head *resultp)
 {
 int
 lst_stop_batch_ioctl(char *name, int force, struct list_head *resultp)
 {
-        lstio_batch_stop_args_t args = {0};
+       struct lstio_batch_stop_args args = { 0 };
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_force   = force;
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_force   = force;
@@ -2452,7 +2452,7 @@ out:
 int
 lst_list_batch_ioctl(int len, char *name, int index)
 {
 int
 lst_list_batch_ioctl(int len, char *name, int index)
 {
-        lstio_batch_list_args_t args = {0};
+       struct lstio_batch_list_args args = { 0 };
 
         args.lstio_bat_key   = session_key;
         args.lstio_bat_idx   = index;
 
         args.lstio_bat_key   = session_key;
         args.lstio_bat_idx   = index;
@@ -2464,10 +2464,10 @@ lst_list_batch_ioctl(int len, char *name, int index)
 
 int
 lst_info_batch_ioctl(char *batch, int test, int server,
 
 int
 lst_info_batch_ioctl(char *batch, int test, int server,
-                     lstcon_test_batch_ent_t *entp, int *idxp,
-                     int *ndentp, lstcon_node_ent_t *dentsp)
+                    struct lstcon_test_batch_ent *entp, int *idxp,
+                    int *ndentp, struct lstcon_node_ent *dentsp)
 {
 {
-        lstio_batch_info_args_t args = {0};
+       struct lstio_batch_info_args args = { 0 };
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_nmlen   = strlen(batch);
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_nmlen   = strlen(batch);
@@ -2513,7 +2513,7 @@ int
 lst_list_tsb_nodes(char *batch, int test, int server,
                    int count, int active, int invalid)
 {
 lst_list_tsb_nodes(char *batch, int test, int server,
                    int count, int active, int invalid)
 {
-        lstcon_node_ent_t *dents;
+       struct lstcon_node_ent *dents;
         int                index = 0;
         int                rc;
         int                c;
         int                index = 0;
         int                rc;
         int                c;
@@ -2523,7 +2523,7 @@ lst_list_tsb_nodes(char *batch, int test, int server,
                 return 0;
 
         /* verbose list, show nodes in batch or test */
                 return 0;
 
         /* verbose list, show nodes in batch or test */
-        dents = malloc(count * sizeof(lstcon_node_ent_t));
+       dents = malloc(count * sizeof(struct lstcon_node_ent));
         if (dents == NULL) {
                 fprintf(stdout, "Can't allocate memory\n");
                 return -1;
         if (dents == NULL) {
                 fprintf(stdout, "Can't allocate memory\n");
                 return -1;
@@ -2562,7 +2562,7 @@ lst_list_tsb_nodes(char *batch, int test, int server,
 int
 jt_lst_list_batch(int argc, char **argv)
 {
 int
 jt_lst_list_batch(int argc, char **argv)
 {
-        lstcon_test_batch_ent_t ent;
+       struct lstcon_test_batch_ent ent;
         char                *batch   = NULL;
         int                  optidx  = 0;
         int                  verbose = 0; /* list nodes in batch or test */
         char                *batch   = NULL;
         int                  optidx  = 0;
         int                  verbose = 0; /* list nodes in batch or test */
@@ -2701,7 +2701,7 @@ int
 lst_query_batch_ioctl(char *batch, int test, int server,
                      int timeout, struct list_head *head)
 {
 lst_query_batch_ioctl(char *batch, int test, int server,
                      int timeout, struct list_head *head)
 {
-        lstio_batch_query_args_t args = {0};
+       struct lstio_batch_query_args args = { 0 };
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_testidx = test;
 
         args.lstio_bat_key     = session_key;
         args.lstio_bat_testidx = test;
@@ -2718,7 +2718,7 @@ void
 lst_print_tsb_verbose(struct list_head *head,
                       int active, int idle, int error)
 {
 lst_print_tsb_verbose(struct list_head *head,
                       int active, int idle, int error)
 {
-        lstcon_rpc_ent_t *ent;
+       struct lstcon_rpc_ent *ent;
 
        list_for_each_entry(ent, head, rpe_link) {
                 if (ent->rpe_priv[0] == 0 && active)
 
        list_for_each_entry(ent, head, rpe_link) {
                 if (ent->rpe_priv[0] == 0 && active)
@@ -2742,7 +2742,7 @@ lst_print_tsb_verbose(struct list_head *head,
 int
 jt_lst_query_batch(int argc, char **argv)
 {
 int
 jt_lst_query_batch(int argc, char **argv)
 {
-        lstcon_test_batch_ent_t ent;
+       struct lstcon_test_batch_ent ent;
        struct list_head              head;
         char                   *batch   = NULL;
         time_t                  last    = 0;
        struct list_head              head;
         char                   *batch   = NULL;
         time_t                  last    = 0;
@@ -2941,7 +2941,7 @@ lst_parse_distribute(char *dstr, int *dist, int *span)
 }
 
 int
 }
 
 int
-lst_get_bulk_param(int argc, char **argv, lst_test_bulk_param_t *bulk)
+lst_get_bulk_param(int argc, char **argv, struct lst_test_bulk_param *bulk)
 {
         char   *tok = NULL;
         char   *end = NULL;
 {
         char   *tok = NULL;
         char   *end = NULL;
@@ -3036,7 +3036,7 @@ lst_get_bulk_param(int argc, char **argv, lst_test_bulk_param_t *bulk)
 int
 lst_get_test_param(char *test, int argc, char **argv, void **param, int *plen)
 {
 int
 lst_get_test_param(char *test, int argc, char **argv, void **param, int *plen)
 {
-        lst_test_bulk_param_t *bulk = NULL;
+       struct lst_test_bulk_param *bulk = NULL;
         int                    type;
 
         type = lst_test_name2type(test);
         int                    type;
 
         type = lst_test_name2type(test);
@@ -3081,7 +3081,7 @@ lst_add_test_ioctl(char *batch, int type, int loop, int concur,
                    int dist, int span, char *sgrp, char *dgrp,
                   void *param, int plen, int *retp, struct list_head *resultp)
 {
                    int dist, int span, char *sgrp, char *dgrp,
                   void *param, int plen, int *retp, struct list_head *resultp)
 {
-        lstio_test_args_t args = {0};
+       struct lstio_test_args args = { 0 };
 
         args.lstio_tes_key        = session_key;
         args.lstio_tes_bat_nmlen  = strlen(batch);
 
         args.lstio_tes_key        = session_key;
         args.lstio_tes_bat_nmlen  = strlen(batch);