aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include/linux/lnet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/include/linux/lnet')
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-lnet.h14
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-types.h10
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lnetst.h198
-rw-r--r--drivers/staging/lustre/include/linux/lnet/socklnd.h11
-rw-r--r--drivers/staging/lustre/include/linux/lnet/types.h70
5 files changed, 147 insertions, 156 deletions
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index a59c5e99cbd3..3d19402ba728 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -78,7 +78,7 @@ static inline int lnet_is_route_alive(lnet_route_t *route)
return route->lr_downis == 0;
}
-static inline int lnet_is_wire_handle_none(lnet_handle_wire_t *wh)
+static inline int lnet_is_wire_handle_none(struct lnet_handle_wire *wh)
{
return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
@@ -323,7 +323,7 @@ lnet_handle2md(lnet_handle_md_t *handle)
}
static inline lnet_libmd_t *
-lnet_wire_handle2md(lnet_handle_wire_t *wh)
+lnet_wire_handle2md(struct lnet_handle_wire *wh)
{
/* ALWAYS called with resource lock held */
lnet_libhandle_t *lh;
@@ -552,7 +552,7 @@ int lnet_portals_create(void);
void lnet_portals_destroy(void);
/* message functions */
-int lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr,
+int lnet_parse(lnet_ni_t *ni, struct lnet_hdr *hdr,
lnet_nid_t fromnid, void *private, int rdma_req);
int lnet_parse_local(lnet_ni_t *ni, lnet_msg_t *msg);
int lnet_parse_forward_locked(lnet_ni_t *ni, lnet_msg_t *msg);
@@ -579,7 +579,7 @@ void lnet_msg_containers_destroy(void);
int lnet_msg_containers_create(void);
char *lnet_msgtyp2str(int type);
-void lnet_print_hdr(lnet_hdr_t *hdr);
+void lnet_print_hdr(struct lnet_hdr *hdr);
int lnet_fail_nid(lnet_nid_t nid, unsigned int threshold);
/** \addtogroup lnet_fault_simulation @{ */
@@ -588,7 +588,7 @@ int lnet_fault_ctl(int cmd, struct libcfs_ioctl_data *data);
int lnet_fault_init(void);
void lnet_fault_fini(void);
-bool lnet_drop_rule_match(lnet_hdr_t *hdr);
+bool lnet_drop_rule_match(struct lnet_hdr *hdr);
int lnet_delay_rule_add(struct lnet_fault_attr *attr);
int lnet_delay_rule_del(lnet_nid_t src, lnet_nid_t dst, bool shutdown);
@@ -596,7 +596,7 @@ int lnet_delay_rule_list(int pos, struct lnet_fault_attr *attr,
struct lnet_fault_stat *stat);
void lnet_delay_rule_reset(void);
void lnet_delay_rule_check(void);
-bool lnet_delay_rule_match_locked(lnet_hdr_t *hdr, struct lnet_msg *msg);
+bool lnet_delay_rule_match_locked(struct lnet_hdr *hdr, struct lnet_msg *msg);
/** @} lnet_fault_simulation */
@@ -664,7 +664,7 @@ int lnet_peer_buffer_credits(lnet_ni_t *ni);
int lnet_router_checker_start(void);
void lnet_router_checker_stop(void);
void lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net);
-void lnet_swap_pinginfo(lnet_ping_info_t *info);
+void lnet_swap_pinginfo(struct lnet_ping_info *info);
int lnet_parse_ip2nets(char **networksp, char *ip2nets);
int lnet_parse_routes(char *route_str, int *im_a_router);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index b84a5bb9186c..9850398bf29a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -105,7 +105,7 @@ typedef struct lnet_msg {
lnet_kiov_t *msg_kiov;
lnet_event_t msg_ev;
- lnet_hdr_t msg_hdr;
+ struct lnet_hdr msg_hdr;
} lnet_msg_t;
typedef struct lnet_libhandle {
@@ -270,7 +270,7 @@ typedef struct lnet_ni {
struct lnet_tx_queue **ni_tx_queues; /* percpt TX queues */
int **ni_refs; /* percpt reference count */
time64_t ni_last_alive;/* when I was last alive */
- lnet_ni_status_t *ni_status; /* my health status */
+ struct lnet_ni_status *ni_status; /* my health status */
/* per NI LND tunables */
struct lnet_ioctl_config_lnd_tunables *ni_lnd_tunables;
/* equivalent interfaces to use */
@@ -295,13 +295,13 @@ typedef struct lnet_ni {
/* router checker data, per router */
#define LNET_MAX_RTR_NIS 16
-#define LNET_PINGINFO_SIZE offsetof(lnet_ping_info_t, pi_ni[LNET_MAX_RTR_NIS])
+#define LNET_PINGINFO_SIZE offsetof(struct lnet_ping_info, pi_ni[LNET_MAX_RTR_NIS])
typedef struct {
/* chain on the_lnet.ln_zombie_rcd or ln_deathrow_rcd */
struct list_head rcd_list;
lnet_handle_md_t rcd_mdh; /* ping buffer MD */
struct lnet_peer *rcd_gateway; /* reference to gateway */
- lnet_ping_info_t *rcd_pinginfo; /* ping buffer */
+ struct lnet_ping_info *rcd_pinginfo; /* ping buffer */
} lnet_rc_data_t;
typedef struct lnet_peer {
@@ -599,7 +599,7 @@ typedef struct {
lnet_handle_md_t ln_ping_target_md;
lnet_handle_eq_t ln_ping_target_eq;
- lnet_ping_info_t *ln_ping_info;
+ struct lnet_ping_info *ln_ping_info;
/* router checker startup/shutdown state */
int ln_rc_state;
diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index 8a84888635ff..c81c246ef221 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -68,16 +68,16 @@
#define LSTIO_BATCH_QUERY 0xC27 /* query batch status */
#define LSTIO_STAT_QUERY 0xC30 /* get stats */
-typedef struct {
+struct lst_sid {
lnet_nid_t ses_nid; /* nid of console node */
__u64 ses_stamp; /* time stamp */
-} lst_sid_t; /*** session id */
+}; /*** session id */
-extern lst_sid_t LST_INVALID_SID;
+extern struct lst_sid LST_INVALID_SID;
-typedef struct {
+struct lst_bid {
__u64 bat_id; /* unique id in session */
-} lst_bid_t; /*** batch id (group of tests) */
+}; /*** batch id (group of tests) */
/* Status of test node */
#define LST_NODE_ACTIVE 0x1 /* node in this session */
@@ -85,59 +85,59 @@ typedef struct {
#define LST_NODE_DOWN 0x4 /* node is down */
#define LST_NODE_UNKNOWN 0x8 /* node not in session */
-typedef struct {
+struct lstcon_node_ent {
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 */
+}; /*** node entry, for list_group command */
-typedef struct {
+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 */
-} lstcon_ndlist_ent_t; /*** node_list entry, for list_batch command */
+}; /*** node_list entry, for list_batch command */
-typedef struct {
+struct lstcon_test_ent {
int tse_type; /* test type */
int tse_loop; /* loop count */
int tse_concur; /* concurrency of test */
-} lstcon_test_ent_t; /*** test summary entry, for
+}; /*** test summary entry, for
*** list_batch command */
-typedef struct {
+struct lstcon_batch_ent {
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
+}; /*** batch summary entry, for
*** list_batch command */
-typedef struct {
- lstcon_ndlist_ent_t tbe_cli_nle; /* client (group) node_list
+struct lstcon_test_batch_ent {
+ struct lstcon_ndlist_ent tbe_cli_nle; /* client (group) node_list
* entry */
- lstcon_ndlist_ent_t tbe_srv_nle; /* server (group) node_list
+ struct lstcon_ndlist_ent tbe_srv_nle; /* server (group) node_list
* entry */
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;
-} lstcon_test_batch_ent_t; /*** test/batch verbose information entry,
+}; /*** test/batch verbose information entry,
*** 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 */
- 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 */
-} lstcon_rpc_ent_t;
+};
-typedef struct {
+struct lstcon_trans_stat {
int trs_rpc_stat[4]; /* RPCs stat (0: total
1: failed
2: finished
@@ -146,125 +146,125 @@ typedef struct {
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;
+};
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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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 */
-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 int 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 */
-} lstio_session_new_args_t;
+};
/* query current session */
-typedef struct {
- lst_sid_t __user *lstio_ses_idp; /* OUT: session id */
+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 */
unsigned int __user *lstio_ses_featp;
- lstcon_ndlist_ent_t __user *lstio_ses_ndinfo; /* OUT: */
+ struct lstcon_ndlist_ent __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;
+};
/* delete a session */
-typedef struct {
+struct lstio_session_end_args {
int lstio_ses_key; /* IN: session key */
-} lstio_session_end_args_t;
+};
#define LST_OPC_SESSION 1
#define LST_OPC_GROUP 2
@@ -272,7 +272,7 @@ typedef struct {
#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
session|batch|
@@ -291,26 +291,26 @@ typedef struct {
nodes */
struct list_head __user *lstio_dbg_resultp; /* OUT: list head of
result buffer */
-} 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 */
-} 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 */
-} 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 */
-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 */
@@ -320,9 +320,9 @@ typedef struct {
lnet_process_id_t __user *lstio_grp_idsp; /* IN: array of nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */
-} 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 */
@@ -332,41 +332,41 @@ typedef struct {
lnet_process_id_t __user *lstio_grp_idsp; /* IN: nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */
-} 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 */
-} 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 */
- 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 */
- 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 */
-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 */
-} 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 */
-} lstio_batch_del_args_t;
+};
-typedef struct {
+struct lstio_batch_run_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_timeout; /* IN: timeout for
the batch */
@@ -374,9 +374,9 @@ typedef struct {
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} lstio_batch_run_args_t;
+};
-typedef struct {
+struct lstio_batch_stop_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_force; /* IN: abort unfinished
test RPC */
@@ -384,9 +384,9 @@ typedef struct {
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} lstio_batch_stop_args_t;
+};
-typedef struct {
+struct lstio_batch_query_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_testidx; /* IN: test index */
int lstio_bat_client; /* IN: we testing
@@ -397,31 +397,31 @@ typedef struct {
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
result buffer */
-} 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 */
-} 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 */
- 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 */
- 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 */
-typedef struct {
+struct lstio_stat_args {
int lstio_sta_key; /* IN: session key */
int lstio_sta_timeout; /* IN: timeout for
stat request */
@@ -432,17 +432,17 @@ typedef struct {
lnet_process_id_t __user *lstio_sta_idsp; /* IN: pid */
struct list_head __user *lstio_sta_resultp; /* OUT: list head of
result buffer */
-} lstio_stat_args_t;
+};
-typedef enum {
+enum lst_test_type {
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 */
-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 */
@@ -472,36 +472,36 @@ typedef struct {
value */
struct list_head __user *lstio_tes_resultp;/* OUT: list head of
result buffer */
-} lstio_test_args_t;
+};
-typedef enum {
+enum lst_brw_type {
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_flags_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 */
-} lst_test_bulk_param_t;
+};
-typedef struct {
+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 */
-} lst_test_ping_param_t;
+};
-typedef struct {
+struct srpc_counters {
__u32 errors;
__u32 rpcs_sent;
__u32 rpcs_rcvd;
@@ -509,15 +509,15 @@ typedef struct {
__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;
-} WIRE_ATTR sfw_counters_t;
+} WIRE_ATTR;
#endif
diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index bc32403f4a08..acf20ce6f403 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -60,7 +60,7 @@ typedef struct {
} WIRE_ATTR ksock_hello_msg_t;
typedef struct {
- lnet_hdr_t ksnm_hdr; /* lnet hdr */
+ struct lnet_hdr ksnm_hdr; /* lnet hdr */
/*
* ksnm_payload is removed because of winnt compiler's limitation:
@@ -80,15 +80,6 @@ typedef struct {
} WIRE_ATTR ksm_u;
} WIRE_ATTR ksock_msg_t;
-static inline void
-socklnd_init_msg(ksock_msg_t *msg, int type)
-{
- msg->ksm_csum = 0;
- msg->ksm_type = type;
- msg->ksm_zc_cookies[0] = 0;
- msg->ksm_zc_cookies[1] = 0;
-}
-
#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */
#define KSOCK_MSG_LNET 0xC1 /* lnet msg */
diff --git a/drivers/staging/lustre/include/linux/lnet/types.h b/drivers/staging/lustre/include/linux/lnet/types.h
index 8ca1e9d0cfe2..1c8de72e6d6b 100644
--- a/drivers/staging/lustre/include/linux/lnet/types.h
+++ b/drivers/staging/lustre/include/linux/lnet/types.h
@@ -115,11 +115,11 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num)
#define WIRE_ATTR __packed
/* Packed version of lnet_process_id_t to transfer via network */
-typedef struct {
+struct lnet_process_id_packed {
/* node id / process id */
lnet_nid_t nid;
lnet_pid_t pid;
-} WIRE_ATTR lnet_process_id_packed_t;
+} WIRE_ATTR;
/*
* The wire handle's interface cookie only matches one network interface in
@@ -127,10 +127,10 @@ typedef struct {
* reboots). The object cookie only matches one object on that interface
* during that object's lifetime (i.e. no cookie re-use).
*/
-typedef struct {
+struct lnet_handle_wire {
__u64 wh_interface_cookie;
__u64 wh_object_cookie;
-} WIRE_ATTR lnet_handle_wire_t;
+} WIRE_ATTR;
typedef enum {
LNET_MSG_ACK = 0,
@@ -146,38 +146,38 @@ typedef enum {
* wire structs MUST be fixed size and the smaller types are placed at the
* end.
*/
-typedef struct lnet_ack {
- lnet_handle_wire_t dst_wmd;
+struct lnet_ack {
+ struct lnet_handle_wire dst_wmd;
__u64 match_bits;
__u32 mlength;
-} WIRE_ATTR lnet_ack_t;
+} WIRE_ATTR;
-typedef struct lnet_put {
- lnet_handle_wire_t ack_wmd;
+struct lnet_put {
+ struct lnet_handle_wire ack_wmd;
__u64 match_bits;
__u64 hdr_data;
__u32 ptl_index;
__u32 offset;
-} WIRE_ATTR lnet_put_t;
+} WIRE_ATTR;
-typedef struct lnet_get {
- lnet_handle_wire_t return_wmd;
+struct lnet_get {
+ struct lnet_handle_wire return_wmd;
__u64 match_bits;
__u32 ptl_index;
__u32 src_offset;
__u32 sink_length;
-} WIRE_ATTR lnet_get_t;
+} WIRE_ATTR;
-typedef struct lnet_reply {
- lnet_handle_wire_t dst_wmd;
-} WIRE_ATTR lnet_reply_t;
+struct lnet_reply {
+ struct lnet_handle_wire dst_wmd;
+} WIRE_ATTR;
-typedef struct lnet_hello {
+struct lnet_hello {
__u64 incarnation;
__u32 type;
-} WIRE_ATTR lnet_hello_t;
+} WIRE_ATTR;
-typedef struct {
+struct lnet_hdr {
lnet_nid_t dest_nid;
lnet_nid_t src_nid;
lnet_pid_t dest_pid;
@@ -186,13 +186,13 @@ typedef struct {
__u32 payload_length; /* payload data to follow */
/*<------__u64 aligned------->*/
union {
- lnet_ack_t ack;
- lnet_put_t put;
- lnet_get_t get;
- lnet_reply_t reply;
- lnet_hello_t hello;
+ struct lnet_ack ack;
+ struct lnet_put put;
+ struct lnet_get get;
+ struct lnet_reply reply;
+ struct lnet_hello hello;
} msg;
-} WIRE_ATTR lnet_hdr_t;
+} WIRE_ATTR;
/*
* A HELLO message contains a magic number and protocol version
@@ -202,13 +202,13 @@ typedef struct {
* This is for use by byte-stream LNDs (e.g. TCP/IP) to check the peer is
* running the same protocol and to find out its NID. These LNDs should
* exchange HELLO messages when a connection is first established. Individual
- * LNDs can put whatever else they fancy in lnet_hdr_t::msg.
+ * LNDs can put whatever else they fancy in struct lnet_hdr::msg.
*/
-typedef struct {
+struct lnet_magicversion {
__u32 magic; /* LNET_PROTO_TCP_MAGIC */
__u16 version_major; /* increment on incompatible change */
__u16 version_minor; /* increment on compatible change */
-} WIRE_ATTR lnet_magicversion_t;
+} WIRE_ATTR;
/* PROTO MAGIC for LNDs */
#define LNET_PROTO_IB_MAGIC 0x0be91b91
@@ -228,27 +228,27 @@ typedef struct {
#define LNET_PROTO_TCP_VERSION_MINOR 0
/* Acceptor connection request */
-typedef struct {
+struct lnet_acceptor_connreq {
__u32 acr_magic; /* PTL_ACCEPTOR_PROTO_MAGIC */
__u32 acr_version; /* protocol version */
__u64 acr_nid; /* target NID */
-} WIRE_ATTR lnet_acceptor_connreq_t;
+} WIRE_ATTR;
#define LNET_PROTO_ACCEPTOR_VERSION 1
-typedef struct {
+struct lnet_ni_status {
lnet_nid_t ns_nid;
__u32 ns_status;
__u32 ns_unused;
-} WIRE_ATTR lnet_ni_status_t;
+} WIRE_ATTR;
-typedef struct {
+struct lnet_ping_info {
__u32 pi_magic;
__u32 pi_features;
lnet_pid_t pi_pid;
__u32 pi_nnis;
- lnet_ni_status_t pi_ni[0];
-} WIRE_ATTR lnet_ping_info_t;
+ struct lnet_ni_status pi_ni[0];
+} WIRE_ATTR;
typedef struct lnet_counters {
__u32 msgs_alloc;