Commit 06ef1af8 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: lnet: change lnet_process_id_t to proper structure

Change lnet_process_id_t from typedef to proper structure.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831Reviewed-by: default avatarOlaf Weber <olaf@sgi.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16b9ab7f
...@@ -74,7 +74,7 @@ int LNetNIFini(void); ...@@ -74,7 +74,7 @@ int LNetNIFini(void);
* \see LNetMEAttach * \see LNetMEAttach
* @{ * @{
*/ */
int LNetGetId(unsigned int index, lnet_process_id_t *id); int LNetGetId(unsigned int index, struct lnet_process_id *id);
int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order); int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
/** @} lnet_addr */ /** @} lnet_addr */
...@@ -93,7 +93,7 @@ int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order); ...@@ -93,7 +93,7 @@ int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
* @{ * @{
*/ */
int LNetMEAttach(unsigned int portal, int LNetMEAttach(unsigned int portal,
lnet_process_id_t match_id_in, struct lnet_process_id match_id_in,
__u64 match_bits_in, __u64 match_bits_in,
__u64 ignore_bits_in, __u64 ignore_bits_in,
lnet_unlink_t unlink_in, lnet_unlink_t unlink_in,
...@@ -101,7 +101,7 @@ int LNetMEAttach(unsigned int portal, ...@@ -101,7 +101,7 @@ int LNetMEAttach(unsigned int portal,
struct lnet_handle_me *handle_out); struct lnet_handle_me *handle_out);
int LNetMEInsert(struct lnet_handle_me current_in, int LNetMEInsert(struct lnet_handle_me current_in,
lnet_process_id_t match_id_in, struct lnet_process_id match_id_in,
__u64 match_bits_in, __u64 match_bits_in,
__u64 ignore_bits_in, __u64 ignore_bits_in,
lnet_unlink_t unlink_in, lnet_unlink_t unlink_in,
...@@ -181,7 +181,7 @@ int LNetEQPoll(struct lnet_handle_eq *eventqs_in, ...@@ -181,7 +181,7 @@ int LNetEQPoll(struct lnet_handle_eq *eventqs_in,
int LNetPut(lnet_nid_t self, int LNetPut(lnet_nid_t self,
struct lnet_handle_md md_in, struct lnet_handle_md md_in,
lnet_ack_req_t ack_req_in, lnet_ack_req_t ack_req_in,
lnet_process_id_t target_in, struct lnet_process_id target_in,
unsigned int portal_in, unsigned int portal_in,
__u64 match_bits_in, __u64 match_bits_in,
unsigned int offset_in, unsigned int offset_in,
...@@ -189,7 +189,7 @@ int LNetPut(lnet_nid_t self, ...@@ -189,7 +189,7 @@ int LNetPut(lnet_nid_t self,
int LNetGet(lnet_nid_t self, int LNetGet(lnet_nid_t self,
struct lnet_handle_md md_in, struct lnet_handle_md md_in,
lnet_process_id_t target_in, struct lnet_process_id target_in,
unsigned int portal_in, unsigned int portal_in,
__u64 match_bits_in, __u64 match_bits_in,
unsigned int offset_in); unsigned int offset_in);
...@@ -202,7 +202,7 @@ int LNetGet(lnet_nid_t self, ...@@ -202,7 +202,7 @@ int LNetGet(lnet_nid_t self,
int LNetSetLazyPortal(int portal); int LNetSetLazyPortal(int portal);
int LNetClearLazyPortal(int portal); int LNetClearLazyPortal(int portal);
int LNetCtl(unsigned int cmd, void *arg); int LNetCtl(unsigned int cmd, void *arg);
void LNetDebugPeer(lnet_process_id_t id); void LNetDebugPeer(struct lnet_process_id id);
/** @} lnet_misc */ /** @} lnet_misc */
......
...@@ -491,8 +491,9 @@ void lnet_msg_commit(struct lnet_msg *msg, int cpt); ...@@ -491,8 +491,9 @@ void lnet_msg_commit(struct lnet_msg *msg, int cpt);
void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status); void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status);
void lnet_eq_enqueue_event(struct lnet_eq *eq, struct lnet_event *ev); void lnet_eq_enqueue_event(struct lnet_eq *eq, struct lnet_event *ev);
void lnet_prep_send(struct lnet_msg *msg, int type, lnet_process_id_t target, void lnet_prep_send(struct lnet_msg *msg, int type,
unsigned int offset, unsigned int len); struct lnet_process_id target, unsigned int offset,
unsigned int len);
int lnet_send(lnet_nid_t nid, struct lnet_msg *msg, lnet_nid_t rtr_nid); int lnet_send(lnet_nid_t nid, struct lnet_msg *msg, lnet_nid_t rtr_nid);
void lnet_return_tx_credits_locked(struct lnet_msg *msg); void lnet_return_tx_credits_locked(struct lnet_msg *msg);
void lnet_return_rx_credits_locked(struct lnet_msg *msg); void lnet_return_rx_credits_locked(struct lnet_msg *msg);
...@@ -533,10 +534,10 @@ lnet_ptl_unsetopt(struct lnet_portal *ptl, int opt) ...@@ -533,10 +534,10 @@ lnet_ptl_unsetopt(struct lnet_portal *ptl, int opt)
/* match-table functions */ /* match-table functions */
struct list_head *lnet_mt_match_head(struct lnet_match_table *mtable, struct list_head *lnet_mt_match_head(struct lnet_match_table *mtable,
lnet_process_id_t id, __u64 mbits); struct lnet_process_id id, __u64 mbits);
struct lnet_match_table *lnet_mt_of_attach(unsigned int index, struct lnet_match_table *lnet_mt_of_attach(unsigned int index,
lnet_process_id_t id, __u64 mbits, struct lnet_process_id id,
__u64 ignore_bits, __u64 mbits, __u64 ignore_bits,
lnet_ins_pos_t pos); lnet_ins_pos_t pos);
int lnet_mt_match_md(struct lnet_match_table *mtable, int lnet_mt_match_md(struct lnet_match_table *mtable,
struct lnet_match_info *info, struct lnet_msg *msg); struct lnet_match_info *info, struct lnet_msg *msg);
......
...@@ -58,7 +58,7 @@ struct lnet_msg { ...@@ -58,7 +58,7 @@ struct lnet_msg {
struct list_head msg_activelist; struct list_head msg_activelist;
struct list_head msg_list; /* Q for credits/MD */ struct list_head msg_list; /* Q for credits/MD */
lnet_process_id_t msg_target; struct lnet_process_id msg_target;
/* where is it from, it's only for building event */ /* where is it from, it's only for building event */
lnet_nid_t msg_from; lnet_nid_t msg_from;
__u32 msg_type; __u32 msg_type;
...@@ -130,7 +130,7 @@ struct lnet_eq { ...@@ -130,7 +130,7 @@ struct lnet_eq {
struct lnet_me { struct lnet_me {
struct list_head me_list; struct list_head me_list;
struct lnet_libhandle me_lh; struct lnet_libhandle me_lh;
lnet_process_id_t me_match_id; struct lnet_process_id me_match_id;
unsigned int me_portal; unsigned int me_portal;
unsigned int me_pos; /* hash offset in mt_hash */ unsigned int me_pos; /* hash offset in mt_hash */
__u64 me_match_bits; __u64 me_match_bits;
...@@ -447,7 +447,7 @@ enum lnet_match_flags { ...@@ -447,7 +447,7 @@ enum lnet_match_flags {
/* parameter for matching operations (GET, PUT) */ /* parameter for matching operations (GET, PUT) */
struct lnet_match_info { struct lnet_match_info {
__u64 mi_mbits; __u64 mi_mbits;
lnet_process_id_t mi_id; struct lnet_process_id mi_id;
unsigned int mi_opc; unsigned int mi_opc;
unsigned int mi_portal; unsigned int mi_portal;
unsigned int mi_rlength; unsigned int mi_rlength;
......
...@@ -86,7 +86,7 @@ struct lst_bid { ...@@ -86,7 +86,7 @@ struct lst_bid {
#define LST_NODE_UNKNOWN 0x8 /* node not in session */ #define LST_NODE_UNKNOWN 0x8 /* node not in session */
struct lstcon_node_ent { struct lstcon_node_ent {
lnet_process_id_t nde_id; /* id of node */ struct lnet_process_id nde_id; /* id of node */
int nde_state; /* state of node */ int nde_state; /* state of node */
}; /*** node entry, for list_group command */ }; /*** node entry, for list_group command */
...@@ -126,7 +126,7 @@ struct lstcon_test_batch_ent { ...@@ -126,7 +126,7 @@ struct lstcon_test_batch_ent {
struct lstcon_rpc_ent { struct lstcon_rpc_ent {
struct list_head rpe_link; /* link chain */ struct list_head rpe_link; /* link chain */
lnet_process_id_t rpe_peer; /* peer's id */ struct lnet_process_id rpe_peer; /* peer's id */
struct timeval rpe_stamp; /* time stamp of RPC */ struct timeval rpe_stamp; /* time stamp of RPC */
int rpe_state; /* peer's state */ int rpe_state; /* peer's state */
int rpe_rpc_errno; /* RPC errno */ int rpe_rpc_errno; /* RPC errno */
...@@ -287,7 +287,7 @@ struct lstio_debug_args { ...@@ -287,7 +287,7 @@ struct lstio_debug_args {
group|batch */ group|batch */
int lstio_dbg_count; /* IN: # of test nodes int lstio_dbg_count; /* IN: # of test nodes
to debug */ to debug */
lnet_process_id_t __user *lstio_dbg_idsp; /* IN: id of test struct lnet_process_id __user *lstio_dbg_idsp; /* IN: id of test
nodes */ nodes */
struct list_head __user *lstio_dbg_resultp; /* OUT: list head of struct list_head __user *lstio_dbg_resultp; /* OUT: list head of
result buffer */ result buffer */
...@@ -317,7 +317,7 @@ struct lstio_group_update_args { ...@@ -317,7 +317,7 @@ struct lstio_group_update_args {
int lstio_grp_nmlen; /* IN: name length */ int lstio_grp_nmlen; /* IN: name length */
char __user *lstio_grp_namep; /* IN: group name */ char __user *lstio_grp_namep; /* IN: group name */
int lstio_grp_count; /* IN: # of nodes id */ int lstio_grp_count; /* IN: # of nodes id */
lnet_process_id_t __user *lstio_grp_idsp; /* IN: array of nodes */ struct lnet_process_id __user *lstio_grp_idsp; /* IN: array of nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */ result buffer */
}; };
...@@ -329,7 +329,7 @@ struct lstio_group_nodes_args { ...@@ -329,7 +329,7 @@ struct lstio_group_nodes_args {
int lstio_grp_count; /* IN: # of nodes */ int lstio_grp_count; /* IN: # of nodes */
/** OUT: session features */ /** OUT: session features */
unsigned int __user *lstio_grp_featp; unsigned int __user *lstio_grp_featp;
lnet_process_id_t __user *lstio_grp_idsp; /* IN: nodes */ struct lnet_process_id __user *lstio_grp_idsp; /* IN: nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of struct list_head __user *lstio_grp_resultp; /* OUT: list head of
result buffer */ result buffer */
}; };
...@@ -429,7 +429,7 @@ struct lstio_stat_args { ...@@ -429,7 +429,7 @@ struct lstio_stat_args {
length */ length */
char __user *lstio_sta_namep; /* IN: group name */ char __user *lstio_sta_namep; /* IN: group name */
int lstio_sta_count; /* IN: # of pid */ int lstio_sta_count; /* IN: # of pid */
lnet_process_id_t __user *lstio_sta_idsp; /* IN: pid */ struct lnet_process_id __user *lstio_sta_idsp; /* IN: pid */
struct list_head __user *lstio_sta_resultp; /* OUT: list head of struct list_head __user *lstio_sta_resultp; /* OUT: list head of
result buffer */ result buffer */
}; };
......
...@@ -88,7 +88,7 @@ static inline char *libcfs_nid2str(lnet_nid_t nid) ...@@ -88,7 +88,7 @@ static inline char *libcfs_nid2str(lnet_nid_t nid)
__u32 libcfs_str2net(const char *str); __u32 libcfs_str2net(const char *str);
lnet_nid_t libcfs_str2nid(const char *str); lnet_nid_t libcfs_str2nid(const char *str);
int libcfs_str2anynid(lnet_nid_t *nid, const char *str); int libcfs_str2anynid(lnet_nid_t *nid, const char *str);
char *libcfs_id2str(lnet_process_id_t id); char *libcfs_id2str(struct lnet_process_id id);
void cfs_free_nidlist(struct list_head *list); void cfs_free_nidlist(struct list_head *list);
int cfs_parse_nidlist(char *str, int len, struct list_head *list); int cfs_parse_nidlist(char *str, int len, struct list_head *list);
int cfs_print_nidlist(char *buffer, int count, struct list_head *list); int cfs_print_nidlist(char *buffer, int count, struct list_head *list);
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
typedef __u64 lnet_nid_t; typedef __u64 lnet_nid_t;
/** /**
* ID of a process in a node. Shortened as PID to distinguish from * ID of a process in a node. Shortened as PID to distinguish from
* lnet_process_id_t, the global process ID. * lnet_process_id, the global process ID.
*/ */
typedef __u32 lnet_pid_t; typedef __u32 lnet_pid_t;
...@@ -114,7 +114,7 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num) ...@@ -114,7 +114,7 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num)
#define WIRE_ATTR __packed #define WIRE_ATTR __packed
/* Packed version of lnet_process_id_t to transfer via network */ /* Packed version of lnet_process_id to transfer via network */
struct lnet_process_id_packed { struct lnet_process_id_packed {
/* node id / process id */ /* node id / process id */
lnet_nid_t nid; lnet_nid_t nid;
...@@ -330,12 +330,12 @@ struct lnet_handle_me { ...@@ -330,12 +330,12 @@ struct lnet_handle_me {
/** /**
* Global process ID. * Global process ID.
*/ */
typedef struct { struct lnet_process_id {
/** node id */ /** node id */
lnet_nid_t nid; lnet_nid_t nid;
/** process id */ /** process id */
lnet_pid_t pid; lnet_pid_t pid;
} lnet_process_id_t; };
/** @} lnet_addr */ /** @} lnet_addr */
/** \addtogroup lnet_me /** \addtogroup lnet_me
...@@ -570,9 +570,9 @@ typedef unsigned LNET_SEQ_BASETYPE lnet_seq_t; ...@@ -570,9 +570,9 @@ typedef unsigned LNET_SEQ_BASETYPE lnet_seq_t;
*/ */
struct lnet_event { struct lnet_event {
/** The identifier (nid, pid) of the target. */ /** The identifier (nid, pid) of the target. */
lnet_process_id_t target; struct lnet_process_id target;
/** The identifier (nid, pid) of the initiator. */ /** The identifier (nid, pid) of the initiator. */
lnet_process_id_t initiator; struct lnet_process_id initiator;
/** /**
* The NID of the immediate sender. If the request has been forwarded * The NID of the immediate sender. If the request has been forwarded
* by routers, this is the NID of the last hop; otherwise it's the * by routers, this is the NID of the last hop; otherwise it's the
......
...@@ -1482,7 +1482,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) ...@@ -1482,7 +1482,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
{ {
struct lnet_hdr *hdr = &lntmsg->msg_hdr; struct lnet_hdr *hdr = &lntmsg->msg_hdr;
int type = lntmsg->msg_type; int type = lntmsg->msg_type;
lnet_process_id_t target = lntmsg->msg_target; struct lnet_process_id target = lntmsg->msg_target;
int target_is_router = lntmsg->msg_target_is_router; int target_is_router = lntmsg->msg_target_is_router;
int routing = lntmsg->msg_routing; int routing = lntmsg->msg_routing;
unsigned int payload_niov = lntmsg->msg_niov; unsigned int payload_niov = lntmsg->msg_niov;
...@@ -1653,7 +1653,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) ...@@ -1653,7 +1653,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
static void static void
kiblnd_reply(struct lnet_ni *ni, struct kib_rx *rx, struct lnet_msg *lntmsg) kiblnd_reply(struct lnet_ni *ni, struct kib_rx *rx, struct lnet_msg *lntmsg)
{ {
lnet_process_id_t target = lntmsg->msg_target; struct lnet_process_id target = lntmsg->msg_target;
unsigned int niov = lntmsg->msg_niov; unsigned int niov = lntmsg->msg_niov;
struct kvec *iov = lntmsg->msg_iov; struct kvec *iov = lntmsg->msg_iov;
lnet_kiov_t *kiov = lntmsg->msg_kiov; lnet_kiov_t *kiov = lntmsg->msg_kiov;
......
...@@ -97,7 +97,7 @@ ksocknal_destroy_route(struct ksock_route *route) ...@@ -97,7 +97,7 @@ ksocknal_destroy_route(struct ksock_route *route)
static int static int
ksocknal_create_peer(struct ksock_peer **peerp, struct lnet_ni *ni, ksocknal_create_peer(struct ksock_peer **peerp, struct lnet_ni *ni,
lnet_process_id_t id) struct lnet_process_id id)
{ {
int cpt = lnet_cpt_of_nid(id.nid); int cpt = lnet_cpt_of_nid(id.nid);
struct ksock_net *net = ni->ni_data; struct ksock_net *net = ni->ni_data;
...@@ -173,7 +173,7 @@ ksocknal_destroy_peer(struct ksock_peer *peer) ...@@ -173,7 +173,7 @@ ksocknal_destroy_peer(struct ksock_peer *peer)
} }
struct ksock_peer * struct ksock_peer *
ksocknal_find_peer_locked(struct lnet_ni *ni, lnet_process_id_t id) ksocknal_find_peer_locked(struct lnet_ni *ni, struct lnet_process_id id)
{ {
struct list_head *peer_list = ksocknal_nid2peerlist(id.nid); struct list_head *peer_list = ksocknal_nid2peerlist(id.nid);
struct list_head *tmp; struct list_head *tmp;
...@@ -200,7 +200,7 @@ ksocknal_find_peer_locked(struct lnet_ni *ni, lnet_process_id_t id) ...@@ -200,7 +200,7 @@ ksocknal_find_peer_locked(struct lnet_ni *ni, lnet_process_id_t id)
} }
struct ksock_peer * struct ksock_peer *
ksocknal_find_peer(struct lnet_ni *ni, lnet_process_id_t id) ksocknal_find_peer(struct lnet_ni *ni, struct lnet_process_id id)
{ {
struct ksock_peer *peer; struct ksock_peer *peer;
...@@ -247,7 +247,7 @@ ksocknal_unlink_peer_locked(struct ksock_peer *peer) ...@@ -247,7 +247,7 @@ ksocknal_unlink_peer_locked(struct ksock_peer *peer)
static int static int
ksocknal_get_peer_info(struct lnet_ni *ni, int index, ksocknal_get_peer_info(struct lnet_ni *ni, int index,
lnet_process_id_t *id, __u32 *myip, __u32 *peer_ip, struct lnet_process_id *id, __u32 *myip, __u32 *peer_ip,
int *port, int *conn_count, int *share_count) int *port, int *conn_count, int *share_count)
{ {
struct ksock_peer *peer; struct ksock_peer *peer;
...@@ -450,7 +450,7 @@ ksocknal_del_route_locked(struct ksock_route *route) ...@@ -450,7 +450,7 @@ ksocknal_del_route_locked(struct ksock_route *route)
} }
int int
ksocknal_add_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ipaddr, ksocknal_add_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ipaddr,
int port) int port)
{ {
struct list_head *tmp; struct list_head *tmp;
...@@ -569,7 +569,7 @@ ksocknal_del_peer_locked(struct ksock_peer *peer, __u32 ip) ...@@ -569,7 +569,7 @@ ksocknal_del_peer_locked(struct ksock_peer *peer, __u32 ip)
} }
static int static int
ksocknal_del_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ip) ksocknal_del_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ip)
{ {
LIST_HEAD(zombies); LIST_HEAD(zombies);
struct list_head *ptmp; struct list_head *ptmp;
...@@ -1031,7 +1031,7 @@ ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route, ...@@ -1031,7 +1031,7 @@ ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
{ {
rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock; rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock;
LIST_HEAD(zombies); LIST_HEAD(zombies);
lnet_process_id_t peerid; struct lnet_process_id peerid;
struct list_head *tmp; struct list_head *tmp;
__u64 incarnation; __u64 incarnation;
struct ksock_conn *conn; struct ksock_conn *conn;
...@@ -1764,7 +1764,7 @@ ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why) ...@@ -1764,7 +1764,7 @@ ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why)
} }
int int
ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr) ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr)
{ {
struct ksock_peer *peer; struct ksock_peer *peer;
struct list_head *ptmp; struct list_head *ptmp;
...@@ -1817,7 +1817,7 @@ ksocknal_notify(struct lnet_ni *ni, lnet_nid_t gw_nid, int alive) ...@@ -1817,7 +1817,7 @@ ksocknal_notify(struct lnet_ni *ni, lnet_nid_t gw_nid, int alive)
* The router is telling me she's been notified of a change in * The router is telling me she's been notified of a change in
* gateway state.... * gateway state....
*/ */
lnet_process_id_t id = {0}; struct lnet_process_id id = {0};
id.nid = gw_nid; id.nid = gw_nid;
id.pid = LNET_PID_ANY; id.pid = LNET_PID_ANY;
...@@ -1845,7 +1845,7 @@ ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when) ...@@ -1845,7 +1845,7 @@ ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when)
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
struct ksock_peer *peer = NULL; struct ksock_peer *peer = NULL;
rwlock_t *glock = &ksocknal_data.ksnd_global_lock; rwlock_t *glock = &ksocknal_data.ksnd_global_lock;
lnet_process_id_t id = { struct lnet_process_id id = {
.nid = nid, .nid = nid,
.pid = LNET_PID_LUSTRE, .pid = LNET_PID_LUSTRE,
}; };
...@@ -1933,7 +1933,7 @@ ksocknal_push_peer(struct ksock_peer *peer) ...@@ -1933,7 +1933,7 @@ ksocknal_push_peer(struct ksock_peer *peer)
} }
} }
static int ksocknal_push(struct lnet_ni *ni, lnet_process_id_t id) static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)
{ {
struct list_head *start; struct list_head *start;
struct list_head *end; struct list_head *end;
...@@ -2135,7 +2135,7 @@ ksocknal_del_interface(struct lnet_ni *ni, __u32 ipaddress) ...@@ -2135,7 +2135,7 @@ ksocknal_del_interface(struct lnet_ni *ni, __u32 ipaddress)
int int
ksocknal_ctl(struct lnet_ni *ni, unsigned int cmd, void *arg) ksocknal_ctl(struct lnet_ni *ni, unsigned int cmd, void *arg)
{ {
lnet_process_id_t id = {0}; struct lnet_process_id id = {0};
struct libcfs_ioctl_data *data = arg; struct libcfs_ioctl_data *data = arg;
int rc; int rc;
...@@ -2592,7 +2592,7 @@ ksocknal_shutdown(struct lnet_ni *ni) ...@@ -2592,7 +2592,7 @@ ksocknal_shutdown(struct lnet_ni *ni)
{ {
struct ksock_net *net = ni->ni_data; struct ksock_net *net = ni->ni_data;
int i; int i;
lnet_process_id_t anyid = {0}; struct lnet_process_id anyid = {0};
anyid.nid = LNET_NID_ANY; anyid.nid = LNET_NID_ANY;
anyid.pid = LNET_PID_ANY; anyid.pid = LNET_PID_ANY;
......
...@@ -428,7 +428,7 @@ struct ksock_peer { ...@@ -428,7 +428,7 @@ struct ksock_peer {
unsigned long ksnp_last_alive; /* when (in jiffies) I was last unsigned long ksnp_last_alive; /* when (in jiffies) I was last
* alive * alive
*/ */
lnet_process_id_t ksnp_id; /* who's on the other end(s) */ struct lnet_process_id ksnp_id; /* who's on the other end(s) */
atomic_t ksnp_refcount; /* # users */ atomic_t ksnp_refcount; /* # users */
int ksnp_sharecount; /* lconf usage counter */ int ksnp_sharecount; /* lconf usage counter */
int ksnp_closing; /* being closed */ int ksnp_closing; /* being closed */
...@@ -655,12 +655,12 @@ int ksocknal_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, ...@@ -655,12 +655,12 @@ int ksocknal_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg,
int delayed, struct iov_iter *to, unsigned int rlen); int delayed, struct iov_iter *to, unsigned int rlen);
int ksocknal_accept(struct lnet_ni *ni, struct socket *sock); int ksocknal_accept(struct lnet_ni *ni, struct socket *sock);
int ksocknal_add_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ip, int ksocknal_add_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ip,
int port); int port);
struct ksock_peer *ksocknal_find_peer_locked(struct lnet_ni *ni, struct ksock_peer *ksocknal_find_peer_locked(struct lnet_ni *ni,
lnet_process_id_t id); struct lnet_process_id id);
struct ksock_peer *ksocknal_find_peer(struct lnet_ni *ni, struct ksock_peer *ksocknal_find_peer(struct lnet_ni *ni,
lnet_process_id_t id); struct lnet_process_id id);
void ksocknal_peer_failed(struct ksock_peer *peer); void ksocknal_peer_failed(struct ksock_peer *peer);
int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route, int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
struct socket *sock, int type); struct socket *sock, int type);
...@@ -670,12 +670,12 @@ void ksocknal_destroy_conn(struct ksock_conn *conn); ...@@ -670,12 +670,12 @@ void ksocknal_destroy_conn(struct ksock_conn *conn);
int ksocknal_close_peer_conns_locked(struct ksock_peer *peer, int ksocknal_close_peer_conns_locked(struct ksock_peer *peer,
__u32 ipaddr, int why); __u32 ipaddr, int why);
int ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why); int ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why);
int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); int ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr);
struct ksock_conn *ksocknal_find_conn_locked(struct ksock_peer *peer, struct ksock_conn *ksocknal_find_conn_locked(struct ksock_peer *peer,
struct ksock_tx *tx, int nonblk); struct ksock_tx *tx, int nonblk);
int ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx, int ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx,
lnet_process_id_t id); struct lnet_process_id id);
struct ksock_tx *ksocknal_alloc_tx(int type, int size); struct ksock_tx *ksocknal_alloc_tx(int type, int size);
void ksocknal_free_tx(struct ksock_tx *tx); void ksocknal_free_tx(struct ksock_tx *tx);
struct ksock_tx *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); struct ksock_tx *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk);
...@@ -696,7 +696,8 @@ int ksocknal_reaper(void *arg); ...@@ -696,7 +696,8 @@ int ksocknal_reaper(void *arg);
int ksocknal_send_hello(struct lnet_ni *ni, struct ksock_conn *conn, int ksocknal_send_hello(struct lnet_ni *ni, struct ksock_conn *conn,
lnet_nid_t peer_nid, struct ksock_hello_msg *hello); lnet_nid_t peer_nid, struct ksock_hello_msg *hello);
int ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, int ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn,
struct ksock_hello_msg *hello, lnet_process_id_t *id, struct ksock_hello_msg *hello,
struct lnet_process_id *id,
__u64 *incarnation); __u64 *incarnation);
void ksocknal_read_callback(struct ksock_conn *conn); void ksocknal_read_callback(struct ksock_conn *conn);
void ksocknal_write_callback(struct ksock_conn *conn); void ksocknal_write_callback(struct ksock_conn *conn);
......
...@@ -846,7 +846,7 @@ ksocknal_find_connecting_route_locked(struct ksock_peer *peer) ...@@ -846,7 +846,7 @@ ksocknal_find_connecting_route_locked(struct ksock_peer *peer)
int int
ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx, ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx,
lnet_process_id_t id) struct lnet_process_id id)
{ {
struct ksock_peer *peer; struct ksock_peer *peer;
struct ksock_conn *conn; struct ksock_conn *conn;
...@@ -943,7 +943,7 @@ ksocknal_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) ...@@ -943,7 +943,7 @@ ksocknal_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
{ {
int mpflag = 1; int mpflag = 1;
int type = lntmsg->msg_type; int type = lntmsg->msg_type;
lnet_process_id_t target = lntmsg->msg_target; struct lnet_process_id target = lntmsg->msg_target;
unsigned int payload_niov = lntmsg->msg_niov; unsigned int payload_niov = lntmsg->msg_niov;
struct kvec *payload_iov = lntmsg->msg_iov; struct kvec *payload_iov = lntmsg->msg_iov;
lnet_kiov_t *payload_kiov = lntmsg->msg_kiov; lnet_kiov_t *payload_kiov = lntmsg->msg_kiov;
...@@ -1133,7 +1133,7 @@ static int ...@@ -1133,7 +1133,7 @@ static int
ksocknal_process_receive(struct ksock_conn *conn) ksocknal_process_receive(struct ksock_conn *conn)
{ {
struct lnet_hdr *lhdr; struct lnet_hdr *lhdr;
lnet_process_id_t *id; struct lnet_process_id *id;
int rc; int rc;
LASSERT(atomic_read(&conn->ksnc_conn_refcount) > 0); LASSERT(atomic_read(&conn->ksnc_conn_refcount) > 0);
...@@ -1715,7 +1715,8 @@ ksocknal_invert_type(int type) ...@@ -1715,7 +1715,8 @@ ksocknal_invert_type(int type)
int int
ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn,
struct ksock_hello_msg *hello, lnet_process_id_t *peerid, struct ksock_hello_msg *hello,
struct lnet_process_id *peerid,
__u64 *incarnation) __u64 *incarnation)
{ {
/* Return < 0 fatal error /* Return < 0 fatal error
...@@ -1729,7 +1730,7 @@ ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, ...@@ -1729,7 +1730,7 @@ ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn,
int proto_match; int proto_match;
int rc; int rc;
struct ksock_proto *proto; struct ksock_proto *proto;
lnet_process_id_t recv_id; struct lnet_process_id recv_id;
/* socket type set on active connections - not set on passive */ /* socket type set on active connections - not set on passive */
LASSERT(!active == !(conn->ksnc_type != SOCKLND_CONN_NONE)); LASSERT(!active == !(conn->ksnc_type != SOCKLND_CONN_NONE));
......
...@@ -58,8 +58,8 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT; ...@@ -58,8 +58,8 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT;
module_param(rnet_htable_size, int, 0444); module_param(rnet_htable_size, int, 0444);
MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table"); MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table");
static int lnet_ping(lnet_process_id_t id, int timeout_ms, static int lnet_ping(struct lnet_process_id id, int timeout_ms,
lnet_process_id_t __user *ids, int n_ids); struct lnet_process_id __user *ids, int n_ids);
static char * static char *
lnet_get_routes(void) lnet_get_routes(void)
...@@ -901,7 +901,7 @@ lnet_ping_info_setup(struct lnet_ping_info **ppinfo, ...@@ -901,7 +901,7 @@ lnet_ping_info_setup(struct lnet_ping_info **ppinfo,
struct lnet_handle_md *md_handle, struct lnet_handle_md *md_handle,
int ni_count, bool set_eq) int ni_count, bool set_eq)
{ {
lnet_process_id_t id = {LNET_NID_ANY, LNET_PID_ANY}; struct lnet_process_id id = {LNET_NID_ANY, LNET_PID_ANY};
struct lnet_handle_me me_handle; struct lnet_handle_me me_handle;
struct lnet_md md = { NULL }; struct lnet_md md = { NULL };
int rc, rc2; int rc, rc2;
...@@ -1887,7 +1887,7 @@ LNetCtl(unsigned int cmd, void *arg) ...@@ -1887,7 +1887,7 @@ LNetCtl(unsigned int cmd, void *arg)
{ {
struct libcfs_ioctl_data *data = arg; struct libcfs_ioctl_data *data = arg;
struct lnet_ioctl_config_data *config; struct lnet_ioctl_config_data *config;
lnet_process_id_t id = {0}; struct lnet_process_id id = {0};
struct lnet_ni *ni; struct lnet_ni *ni;
int rc; int rc;
unsigned long secs_passed; unsigned long secs_passed;
...@@ -2059,7 +2059,7 @@ LNetCtl(unsigned int cmd, void *arg) ...@@ -2059,7 +2059,7 @@ LNetCtl(unsigned int cmd, void *arg)
id.pid = data->ioc_u32[0]; id.pid = data->ioc_u32[0];
rc = lnet_ping(id, data->ioc_u32[1], /* timeout */ rc = lnet_ping(id, data->ioc_u32[1], /* timeout */
data->ioc_pbuf1, data->ioc_pbuf1,
data->ioc_plen1 / sizeof(lnet_process_id_t)); data->ioc_plen1 / sizeof(struct lnet_process_id));
if (rc < 0) if (rc < 0)
return rc; return rc;
data->ioc_count = rc; data->ioc_count = rc;
...@@ -2082,25 +2082,25 @@ LNetCtl(unsigned int cmd, void *arg) ...@@ -2082,25 +2082,25 @@ LNetCtl(unsigned int cmd, void *arg)
} }
EXPORT_SYMBOL(LNetCtl); EXPORT_SYMBOL(LNetCtl);
void LNetDebugPeer(lnet_process_id_t id) void LNetDebugPeer(struct lnet_process_id id)
{ {
lnet_debug_peer(id.nid); lnet_debug_peer(id.nid);
} }
EXPORT_SYMBOL(LNetDebugPeer); EXPORT_SYMBOL(LNetDebugPeer);
/** /**
* Retrieve the lnet_process_id_t ID of LNet interface at \a index. Note that * Retrieve the lnet_process_id ID of LNet interface at \a index. Note that
* all interfaces share a same PID, as requested by LNetNIInit(). * all interfaces share a same PID, as requested by LNetNIInit().
* *
* \param index Index of the interface to look up. * \param index Index of the interface to look up.
* \param id On successful return, this location will hold the * \param id On successful return, this location will hold the
* lnet_process_id_t ID of the interface. * lnet_process_id ID of the interface.
* *
* \retval 0 If an interface exists at \a index. * \retval 0 If an interface exists at \a index.
* \retval -ENOENT If no interface has been found. * \retval -ENOENT If no interface has been found.
*/ */
int int
LNetGetId(unsigned int index, lnet_process_id_t *id) LNetGetId(unsigned int index, struct lnet_process_id *id)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
struct list_head *tmp; struct list_head *tmp;
...@@ -2128,8 +2128,8 @@ LNetGetId(unsigned int index, lnet_process_id_t *id) ...@@ -2128,8 +2128,8 @@ LNetGetId(unsigned int index, lnet_process_id_t *id)
} }
EXPORT_SYMBOL(LNetGetId); EXPORT_SYMBOL(LNetGetId);
static int lnet_ping(lnet_process_id_t id, int timeout_ms, static int lnet_ping(struct lnet_process_id id, int timeout_ms,
lnet_process_id_t __user *ids, int n_ids) struct lnet_process_id __user *ids, int n_ids)
{ {
struct lnet_handle_eq eqh; struct lnet_handle_eq eqh;
struct lnet_handle_md mdh; struct lnet_handle_md mdh;
...@@ -2141,7 +2141,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms, ...@@ -2141,7 +2141,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms,
const int a_long_time = 60000; /* mS */ const int a_long_time = 60000; /* mS */
int infosz; int infosz;
struct lnet_ping_info *info; struct lnet_ping_info *info;
lnet_process_id_t tmpid; struct lnet_process_id tmpid;
int i; int i;
int nob; int nob;
int rc; int rc;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
* \param portal The portal table index where the ME should be attached. * \param portal The portal table index where the ME should be attached.
* \param match_id Specifies the match criteria for the process ID of * \param match_id Specifies the match criteria for the process ID of
* the requester. The constants LNET_PID_ANY and LNET_NID_ANY can be * the requester. The constants LNET_PID_ANY and LNET_NID_ANY can be
* used to wildcard either of the identifiers in the lnet_process_id_t * used to wildcard either of the identifiers in the lnet_process_id
* structure. * structure.
* \param match_bits,ignore_bits Specify the match criteria to apply * \param match_bits,ignore_bits Specify the match criteria to apply
* to the match bits in the incoming request. The ignore bits are used * to the match bits in the incoming request. The ignore bits are used
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
*/ */
int int
LNetMEAttach(unsigned int portal, LNetMEAttach(unsigned int portal,
lnet_process_id_t match_id, struct lnet_process_id match_id,
__u64 match_bits, __u64 ignore_bits, __u64 match_bits, __u64 ignore_bits,
lnet_unlink_t unlink, lnet_ins_pos_t pos, lnet_unlink_t unlink, lnet_ins_pos_t pos,
struct lnet_handle_me *handle) struct lnet_handle_me *handle)
...@@ -141,7 +141,7 @@ EXPORT_SYMBOL(LNetMEAttach); ...@@ -141,7 +141,7 @@ EXPORT_SYMBOL(LNetMEAttach);
*/ */
int int
LNetMEInsert(struct lnet_handle_me current_meh, LNetMEInsert(struct lnet_handle_me current_meh,
lnet_process_id_t match_id, struct lnet_process_id match_id,
__u64 match_bits, __u64 ignore_bits, __u64 match_bits, __u64 ignore_bits,
lnet_unlink_t unlink, lnet_ins_pos_t pos, lnet_unlink_t unlink, lnet_ins_pos_t pos,
struct lnet_handle_me *handle) struct lnet_handle_me *handle)
......
...@@ -429,7 +429,7 @@ lnet_setpayloadbuffer(struct lnet_msg *msg) ...@@ -429,7 +429,7 @@ lnet_setpayloadbuffer(struct lnet_msg *msg)
} }
void void
lnet_prep_send(struct lnet_msg *msg, int type, lnet_process_id_t target, lnet_prep_send(struct lnet_msg *msg, int type, struct lnet_process_id target,
unsigned int offset, unsigned int len) unsigned int offset, unsigned int len)
{ {
msg->msg_type = type; msg->msg_type = type;
...@@ -1392,7 +1392,7 @@ lnet_parse_reply(struct lnet_ni *ni, struct lnet_msg *msg) ...@@ -1392,7 +1392,7 @@ lnet_parse_reply(struct lnet_ni *ni, struct lnet_msg *msg)
{ {
void *private = msg->msg_private; void *private = msg->msg_private;
struct lnet_hdr *hdr = &msg->msg_hdr; struct lnet_hdr *hdr = &msg->msg_hdr;
lnet_process_id_t src = {0}; struct lnet_process_id src = {0};
struct lnet_libmd *md; struct lnet_libmd *md;
int rlength; int rlength;
int mlength; int mlength;
...@@ -1456,7 +1456,7 @@ static int ...@@ -1456,7 +1456,7 @@ static int
lnet_parse_ack(struct lnet_ni *ni, struct lnet_msg *msg) lnet_parse_ack(struct lnet_ni *ni, struct lnet_msg *msg)
{ {
struct lnet_hdr *hdr = &msg->msg_hdr; struct lnet_hdr *hdr = &msg->msg_hdr;
lnet_process_id_t src = {0}; struct lnet_process_id src = {0};
struct lnet_libmd *md; struct lnet_libmd *md;
int cpt; int cpt;
...@@ -1580,8 +1580,8 @@ lnet_msgtyp2str(int type) ...@@ -1580,8 +1580,8 @@ lnet_msgtyp2str(int type)
void void
lnet_print_hdr(struct lnet_hdr *hdr) lnet_print_hdr(struct lnet_hdr *hdr)
{ {
lnet_process_id_t src = {0}; struct lnet_process_id src = {0};
lnet_process_id_t dst = {0}; struct lnet_process_id dst = {0};
char *type_str = lnet_msgtyp2str(hdr->type); char *type_str = lnet_msgtyp2str(hdr->type);
src.nid = hdr->src_nid; src.nid = hdr->src_nid;
...@@ -1875,7 +1875,7 @@ void ...@@ -1875,7 +1875,7 @@ void
lnet_drop_delayed_msg_list(struct list_head *head, char *reason) lnet_drop_delayed_msg_list(struct list_head *head, char *reason)
{ {
while (!list_empty(head)) { while (!list_empty(head)) {
lnet_process_id_t id = {0}; struct lnet_process_id id = {0};
struct lnet_msg *msg; struct lnet_msg *msg;
msg = list_entry(head->next, struct lnet_msg, msg_list); msg = list_entry(head->next, struct lnet_msg, msg_list);
...@@ -1918,7 +1918,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) ...@@ -1918,7 +1918,7 @@ lnet_recv_delayed_msg_list(struct list_head *head)
{ {
while (!list_empty(head)) { while (!list_empty(head)) {
struct lnet_msg *msg; struct lnet_msg *msg;
lnet_process_id_t id; struct lnet_process_id id;
msg = list_entry(head->next, struct lnet_msg, msg_list); msg = list_entry(head->next, struct lnet_msg, msg_list);
list_del(&msg->msg_list); list_del(&msg->msg_list);
...@@ -1991,7 +1991,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) ...@@ -1991,7 +1991,7 @@ lnet_recv_delayed_msg_list(struct list_head *head)
*/ */
int int
LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack, LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack,
lnet_process_id_t target, unsigned int portal, struct lnet_process_id target, unsigned int portal,
__u64 match_bits, unsigned int offset, __u64 match_bits, unsigned int offset,
__u64 hdr_data) __u64 hdr_data)
{ {
...@@ -2087,7 +2087,7 @@ lnet_create_reply_msg(struct lnet_ni *ni, struct lnet_msg *getmsg) ...@@ -2087,7 +2087,7 @@ lnet_create_reply_msg(struct lnet_ni *ni, struct lnet_msg *getmsg)
*/ */
struct lnet_msg *msg = lnet_msg_alloc(); struct lnet_msg *msg = lnet_msg_alloc();
struct lnet_libmd *getmd = getmsg->msg_md; struct lnet_libmd *getmd = getmsg->msg_md;
lnet_process_id_t peer_id = getmsg->msg_target; struct lnet_process_id peer_id = getmsg->msg_target;
int cpt; int cpt;
LASSERT(!getmsg->msg_target_is_router); LASSERT(!getmsg->msg_target_is_router);
...@@ -2197,7 +2197,7 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len); ...@@ -2197,7 +2197,7 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len);
*/ */
int int
LNetGet(lnet_nid_t self, struct lnet_handle_md mdh, LNetGet(lnet_nid_t self, struct lnet_handle_md mdh,
lnet_process_id_t target, unsigned int portal, struct lnet_process_id target, unsigned int portal,
__u64 match_bits, unsigned int offset) __u64 match_bits, unsigned int offset)
{ {
struct lnet_msg *msg; struct lnet_msg *msg;
......
...@@ -39,7 +39,7 @@ module_param(portal_rotor, int, 0644); ...@@ -39,7 +39,7 @@ module_param(portal_rotor, int, 0644);
MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions"); MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions");
static int static int
lnet_ptl_match_type(unsigned int index, lnet_process_id_t match_id, lnet_ptl_match_type(unsigned int index, struct lnet_process_id match_id,
__u64 mbits, __u64 ignore_bits) __u64 mbits, __u64 ignore_bits)
{ {
struct lnet_portal *ptl = the_lnet.ln_portals[index]; struct lnet_portal *ptl = the_lnet.ln_portals[index];
...@@ -212,7 +212,7 @@ lnet_try_match_md(struct lnet_libmd *md, ...@@ -212,7 +212,7 @@ lnet_try_match_md(struct lnet_libmd *md,
} }
static struct lnet_match_table * static struct lnet_match_table *
lnet_match2mt(struct lnet_portal *ptl, lnet_process_id_t id, __u64 mbits) lnet_match2mt(struct lnet_portal *ptl, struct lnet_process_id id, __u64 mbits)
{ {
if (LNET_CPT_NUMBER == 1) if (LNET_CPT_NUMBER == 1)
return ptl->ptl_mtables[0]; /* the only one */ return ptl->ptl_mtables[0]; /* the only one */
...@@ -223,7 +223,7 @@ lnet_match2mt(struct lnet_portal *ptl, lnet_process_id_t id, __u64 mbits) ...@@ -223,7 +223,7 @@ lnet_match2mt(struct lnet_portal *ptl, lnet_process_id_t id, __u64 mbits)
} }
struct lnet_match_table * struct lnet_match_table *
lnet_mt_of_attach(unsigned int index, lnet_process_id_t id, lnet_mt_of_attach(unsigned int index, struct lnet_process_id id,
__u64 mbits, __u64 ignore_bits, lnet_ins_pos_t pos) __u64 mbits, __u64 ignore_bits, lnet_ins_pos_t pos)
{ {
struct lnet_portal *ptl; struct lnet_portal *ptl;
...@@ -357,7 +357,7 @@ lnet_mt_set_exhausted(struct lnet_match_table *mtable, int pos, int exhausted) ...@@ -357,7 +357,7 @@ lnet_mt_set_exhausted(struct lnet_match_table *mtable, int pos, int exhausted)
struct list_head * struct list_head *
lnet_mt_match_head(struct lnet_match_table *mtable, lnet_mt_match_head(struct lnet_match_table *mtable,
lnet_process_id_t id, __u64 mbits) struct lnet_process_id id, __u64 mbits)
{ {
struct lnet_portal *ptl = the_lnet.ln_portals[mtable->mt_portal]; struct lnet_portal *ptl = the_lnet.ln_portals[mtable->mt_portal];
unsigned long hash = mbits; unsigned long hash = mbits;
......
...@@ -1226,7 +1226,7 @@ libcfs_str2nid(const char *str) ...@@ -1226,7 +1226,7 @@ libcfs_str2nid(const char *str)
EXPORT_SYMBOL(libcfs_str2nid); EXPORT_SYMBOL(libcfs_str2nid);
char * char *
libcfs_id2str(lnet_process_id_t id) libcfs_id2str(struct lnet_process_id id)
{ {
char *str = libcfs_next_nidstring(); char *str = libcfs_next_nidstring();
......
...@@ -1024,7 +1024,7 @@ lnet_ping_router_locked(struct lnet_peer *rtr) ...@@ -1024,7 +1024,7 @@ lnet_ping_router_locked(struct lnet_peer *rtr)
cfs_time_after(now, cfs_time_add(rtr->lp_ping_timestamp, cfs_time_after(now, cfs_time_add(rtr->lp_ping_timestamp,
cfs_time_seconds(secs)))) { cfs_time_seconds(secs)))) {
int rc; int rc;
lnet_process_id_t id; struct lnet_process_id id;
struct lnet_handle_md mdh; struct lnet_handle_md mdh;
id.nid = rtr->lp_nid; id.nid = rtr->lp_nid;
......
...@@ -267,8 +267,8 @@ brw_check_bulk(struct srpc_bulk *bk, int pattern, __u64 magic) ...@@ -267,8 +267,8 @@ brw_check_bulk(struct srpc_bulk *bk, int pattern, __u64 magic)
} }
static int static int
brw_client_prep_rpc(struct sfw_test_unit *tsu, brw_client_prep_rpc(struct sfw_test_unit *tsu, struct lnet_process_id dest,
lnet_process_id_t dest, struct srpc_client_rpc **rpcpp) struct srpc_client_rpc **rpcpp)
{ {
struct srpc_bulk *bulk = tsu->tsu_private; struct srpc_bulk *bulk = tsu->tsu_private;
struct sfw_test_instance *tsi = tsu->tsu_instance; struct sfw_test_instance *tsi = tsu->tsu_instance;
......
...@@ -505,7 +505,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans, ...@@ -505,7 +505,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans,
jiffies_to_timeval(dur, &tv); jiffies_to_timeval(dur, &tv);
if (copy_to_user(&ent->rpe_peer, &nd->nd_id, if (copy_to_user(&ent->rpe_peer, &nd->nd_id,
sizeof(lnet_process_id_t)) || sizeof(struct lnet_process_id)) ||
copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) || copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) ||
copy_to_user(&ent->rpe_state, &nd->nd_state, copy_to_user(&ent->rpe_state, &nd->nd_state,
sizeof(nd->nd_state)) || sizeof(nd->nd_state)) ||
......
...@@ -65,7 +65,8 @@ lstcon_node_get(struct lstcon_node *nd) ...@@ -65,7 +65,8 @@ lstcon_node_get(struct lstcon_node *nd)
} }
static int static int
lstcon_node_find(lnet_process_id_t id, struct lstcon_node **ndpp, int create) lstcon_node_find(struct lnet_process_id id, struct lstcon_node **ndpp,
int create)
{ {
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
unsigned int idx = LNET_NIDADDR(id.nid) % LST_GLOBAL_HASHSIZE; unsigned int idx = LNET_NIDADDR(id.nid) % LST_GLOBAL_HASHSIZE;
...@@ -135,7 +136,7 @@ lstcon_node_put(struct lstcon_node *nd) ...@@ -135,7 +136,7 @@ lstcon_node_put(struct lstcon_node *nd)
} }
static int static int
lstcon_ndlink_find(struct list_head *hash, lnet_process_id_t id, lstcon_ndlink_find(struct list_head *hash, struct lnet_process_id id,
struct lstcon_ndlink **ndlpp, int create) struct lstcon_ndlink **ndlpp, int create)
{ {
unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE; unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE;
...@@ -283,7 +284,7 @@ lstcon_group_find(const char *name, struct lstcon_group **grpp) ...@@ -283,7 +284,7 @@ lstcon_group_find(const char *name, struct lstcon_group **grpp)
} }
static int static int
lstcon_group_ndlink_find(struct lstcon_group *grp, lnet_process_id_t id, lstcon_group_ndlink_find(struct lstcon_group *grp, struct lnet_process_id id,
struct lstcon_ndlink **ndlpp, int create) struct lstcon_ndlink **ndlpp, int create)
{ {
int rc; int rc;
...@@ -397,14 +398,14 @@ lstcon_sesrpc_readent(int transop, struct srpc_msg *msg, ...@@ -397,14 +398,14 @@ lstcon_sesrpc_readent(int transop, struct srpc_msg *msg,
static int static int
lstcon_group_nodes_add(struct lstcon_group *grp, lstcon_group_nodes_add(struct lstcon_group *grp,
int count, lnet_process_id_t __user *ids_up, int count, struct lnet_process_id __user *ids_up,
unsigned int *featp, unsigned int *featp,
struct list_head __user *result_up) struct list_head __user *result_up)
{ {
struct lstcon_rpc_trans *trans; struct lstcon_rpc_trans *trans;
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
struct lstcon_group *tmp; struct lstcon_group *tmp;
lnet_process_id_t id; struct lnet_process_id id;
int i; int i;
int rc; int rc;
...@@ -465,13 +466,13 @@ lstcon_group_nodes_add(struct lstcon_group *grp, ...@@ -465,13 +466,13 @@ lstcon_group_nodes_add(struct lstcon_group *grp,
static int static int
lstcon_group_nodes_remove(struct lstcon_group *grp, lstcon_group_nodes_remove(struct lstcon_group *grp,
int count, lnet_process_id_t __user *ids_up, int count, struct lnet_process_id __user *ids_up,
struct list_head __user *result_up) struct list_head __user *result_up)
{ {
struct lstcon_rpc_trans *trans; struct lstcon_rpc_trans *trans;
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
struct lstcon_group *tmp; struct lstcon_group *tmp;
lnet_process_id_t id; struct lnet_process_id id;
int rc; int rc;
int i; int i;
...@@ -543,9 +544,8 @@ lstcon_group_add(char *name) ...@@ -543,9 +544,8 @@ lstcon_group_add(char *name)
} }
int int
lstcon_nodes_add(char *name, int count, lnet_process_id_t __user *ids_up, lstcon_nodes_add(char *name, int count, struct lnet_process_id __user *ids_up,
unsigned int *featp, unsigned int *featp, struct list_head __user *result_up)
struct list_head __user *result_up)
{ {
struct lstcon_group *grp; struct lstcon_group *grp;
int rc; int rc;
...@@ -650,7 +650,8 @@ lstcon_group_clean(char *name, int args) ...@@ -650,7 +650,8 @@ lstcon_group_clean(char *name, int args)
} }
int int
lstcon_nodes_remove(char *name, int count, lnet_process_id_t __user *ids_up, lstcon_nodes_remove(char *name, int count,
struct lnet_process_id __user *ids_up,
struct list_head __user *result_up) struct list_head __user *result_up)
{ {
struct lstcon_group *grp = NULL; struct lstcon_group *grp = NULL;
...@@ -1533,12 +1534,12 @@ lstcon_group_stat(char *grp_name, int timeout, ...@@ -1533,12 +1534,12 @@ lstcon_group_stat(char *grp_name, int timeout,
} }
int int
lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up, lstcon_nodes_stat(int count, struct lnet_process_id __user *ids_up,
int timeout, struct list_head __user *result_up) int timeout, struct list_head __user *result_up)
{ {
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
struct lstcon_group *tmp; struct lstcon_group *tmp;
lnet_process_id_t id; struct lnet_process_id id;
int i; int i;
int rc; int rc;
...@@ -1644,11 +1645,11 @@ lstcon_group_debug(int timeout, char *name, ...@@ -1644,11 +1645,11 @@ lstcon_group_debug(int timeout, char *name,
} }
int int
lstcon_nodes_debug(int timeout, lstcon_nodes_debug(int timeout, int count,
int count, lnet_process_id_t __user *ids_up, struct lnet_process_id __user *ids_up,
struct list_head __user *result_up) struct list_head __user *result_up)
{ {
lnet_process_id_t id; struct lnet_process_id id;
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
struct lstcon_group *grp; struct lstcon_group *grp;
int i; int i;
...@@ -1697,7 +1698,7 @@ lstcon_session_match(struct lst_sid sid) ...@@ -1697,7 +1698,7 @@ lstcon_session_match(struct lst_sid sid)
static void static void
lstcon_new_session_id(struct lst_sid *sid) lstcon_new_session_id(struct lst_sid *sid)
{ {
lnet_process_id_t id; struct lnet_process_id id;
LASSERT(console_session.ses_state == LST_SESSION_NONE); LASSERT(console_session.ses_state == LST_SESSION_NONE);
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
/* node descriptor */ /* node descriptor */
struct lstcon_node { struct lstcon_node {
lnet_process_id_t nd_id; /* id of the node */ struct lnet_process_id nd_id; /* id of the node */
int nd_ref; /* reference count */ int nd_ref; /* reference count */
int nd_state; /* state of the node */ int nd_state; /* state of the node */
int nd_timeout; /* session timeout */ int nd_timeout; /* session timeout */
...@@ -180,7 +180,7 @@ lstcon_trans_stat(void) ...@@ -180,7 +180,7 @@ lstcon_trans_stat(void)
} }
static inline struct list_head * static inline struct list_head *
lstcon_id2hash(lnet_process_id_t id, struct list_head *hash) lstcon_id2hash(struct lnet_process_id id, struct list_head *hash)
{ {
unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE; unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE;
...@@ -203,15 +203,17 @@ int lstcon_batch_debug(int timeout, char *name, ...@@ -203,15 +203,17 @@ int lstcon_batch_debug(int timeout, char *name,
int client, struct list_head __user *result_up); int client, struct list_head __user *result_up);
int lstcon_group_debug(int timeout, char *name, int lstcon_group_debug(int timeout, char *name,
struct list_head __user *result_up); struct list_head __user *result_up);
int lstcon_nodes_debug(int timeout, int nnd, lnet_process_id_t __user *nds_up, int lstcon_nodes_debug(int timeout, int nnd,
struct lnet_process_id __user *nds_up,
struct list_head __user *result_up); struct list_head __user *result_up);
int lstcon_group_add(char *name); int lstcon_group_add(char *name);
int lstcon_group_del(char *name); int lstcon_group_del(char *name);
int lstcon_group_clean(char *name, int args); int lstcon_group_clean(char *name, int args);
int lstcon_group_refresh(char *name, struct list_head __user *result_up); int lstcon_group_refresh(char *name, struct list_head __user *result_up);
int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t __user *nds_up, int lstcon_nodes_add(char *name, int nnd, struct lnet_process_id __user *nds_up,
unsigned int *featp, struct list_head __user *result_up); unsigned int *featp, struct list_head __user *result_up);
int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t __user *nds_up, int lstcon_nodes_remove(char *name, int nnd,
struct lnet_process_id __user *nds_up,
struct list_head __user *result_up); struct list_head __user *result_up);
int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up, 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,
...@@ -232,7 +234,7 @@ int lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up, ...@@ -232,7 +234,7 @@ int lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up,
int *ndent_p, struct lstcon_node_ent __user *dents_up); int *ndent_p, struct lstcon_node_ent __user *dents_up);
int lstcon_group_stat(char *grp_name, int timeout, int lstcon_group_stat(char *grp_name, int timeout,
struct list_head __user *result_up); struct list_head __user *result_up);
int lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up, int lstcon_nodes_stat(int count, struct lnet_process_id __user *ids_up,
int timeout, struct list_head __user *result_up); int timeout, struct list_head __user *result_up);
int lstcon_test_add(char *batch_name, int type, int loop, int lstcon_test_add(char *batch_name, int type, int loop,
int concur, int dist, int span, int concur, int dist, int span,
......
...@@ -899,7 +899,7 @@ sfw_test_rpc_done(struct srpc_client_rpc *rpc) ...@@ -899,7 +899,7 @@ sfw_test_rpc_done(struct srpc_client_rpc *rpc)
} }
int int
sfw_create_test_rpc(struct sfw_test_unit *tsu, lnet_process_id_t peer, sfw_create_test_rpc(struct sfw_test_unit *tsu, struct lnet_process_id peer,
unsigned int features, int nblk, int blklen, unsigned int features, int nblk, int blklen,
struct srpc_client_rpc **rpcpp) struct srpc_client_rpc **rpcpp)
{ {
...@@ -1379,7 +1379,7 @@ sfw_bulk_ready(struct srpc_server_rpc *rpc, int status) ...@@ -1379,7 +1379,7 @@ sfw_bulk_ready(struct srpc_server_rpc *rpc, int status)
} }
struct srpc_client_rpc * struct srpc_client_rpc *
sfw_create_rpc(lnet_process_id_t peer, int service, sfw_create_rpc(struct lnet_process_id peer, int service,
unsigned int features, int nbulkiov, int bulklen, unsigned int features, int nbulkiov, int bulklen,
void (*done)(struct srpc_client_rpc *), void *priv) void (*done)(struct srpc_client_rpc *), void *priv)
{ {
......
...@@ -82,7 +82,7 @@ ping_client_fini(struct sfw_test_instance *tsi) ...@@ -82,7 +82,7 @@ ping_client_fini(struct sfw_test_instance *tsi)
} }
static int static int
ping_client_prep_rpc(struct sfw_test_unit *tsu, lnet_process_id_t dest, ping_client_prep_rpc(struct sfw_test_unit *tsu, struct lnet_process_id dest,
struct srpc_client_rpc **rpc) struct srpc_client_rpc **rpc)
{ {
struct srpc_ping_reqst *req; struct srpc_ping_reqst *req;
......
...@@ -355,7 +355,7 @@ srpc_remove_service(struct srpc_service *sv) ...@@ -355,7 +355,7 @@ srpc_remove_service(struct srpc_service *sv)
static int static int
srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf, srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf,
int len, int options, lnet_process_id_t peer, int len, int options, struct lnet_process_id peer,
struct lnet_handle_md *mdh, struct srpc_event *ev) struct lnet_handle_md *mdh, struct srpc_event *ev)
{ {
int rc; int rc;
...@@ -394,8 +394,9 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf, ...@@ -394,8 +394,9 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf,
static int static int
srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len, srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len,
int options, lnet_process_id_t peer, lnet_nid_t self, int options, struct lnet_process_id peer,
struct lnet_handle_md *mdh, struct srpc_event *ev) lnet_nid_t self, struct lnet_handle_md *mdh,
struct srpc_event *ev)
{ {
int rc; int rc;
struct lnet_md md; struct lnet_md md;
...@@ -450,7 +451,7 @@ static int ...@@ -450,7 +451,7 @@ static int
srpc_post_passive_rqtbuf(int service, int local, void *buf, int len, srpc_post_passive_rqtbuf(int service, int local, void *buf, int len,
struct lnet_handle_md *mdh, struct srpc_event *ev) struct lnet_handle_md *mdh, struct srpc_event *ev)
{ {
lnet_process_id_t any = { 0 }; struct lnet_process_id any = { 0 };
any.nid = LNET_NID_ANY; any.nid = LNET_NID_ANY;
any.pid = LNET_PID_ANY; any.pid = LNET_PID_ANY;
...@@ -1310,7 +1311,7 @@ srpc_send_rpc(struct swi_workitem *wi) ...@@ -1310,7 +1311,7 @@ srpc_send_rpc(struct swi_workitem *wi)
} }
struct srpc_client_rpc * struct srpc_client_rpc *
srpc_create_client_rpc(lnet_process_id_t peer, int service, srpc_create_client_rpc(struct lnet_process_id peer, int service,
int nbulkiov, int bulklen, int nbulkiov, int bulklen,
void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_done)(struct srpc_client_rpc *),
void (*rpc_fini)(struct srpc_client_rpc *), void *priv) void (*rpc_fini)(struct srpc_client_rpc *), void *priv)
......
...@@ -165,7 +165,7 @@ struct srpc_buffer { ...@@ -165,7 +165,7 @@ struct srpc_buffer {
struct srpc_msg buf_msg; struct srpc_msg buf_msg;
struct lnet_handle_md buf_mdh; struct lnet_handle_md buf_mdh;
lnet_nid_t buf_self; lnet_nid_t buf_self;
lnet_process_id_t buf_peer; struct lnet_process_id buf_peer;
}; };
struct swi_workitem; struct swi_workitem;
...@@ -186,7 +186,7 @@ struct srpc_server_rpc { ...@@ -186,7 +186,7 @@ struct srpc_server_rpc {
struct swi_workitem srpc_wi; struct swi_workitem srpc_wi;
struct srpc_event srpc_ev; /* bulk/reply event */ struct srpc_event srpc_ev; /* bulk/reply event */
lnet_nid_t srpc_self; lnet_nid_t srpc_self;
lnet_process_id_t srpc_peer; struct lnet_process_id srpc_peer;
struct srpc_msg srpc_replymsg; struct srpc_msg srpc_replymsg;
struct lnet_handle_md srpc_replymdh; struct lnet_handle_md srpc_replymdh;
struct srpc_buffer *srpc_reqstbuf; struct srpc_buffer *srpc_reqstbuf;
...@@ -206,7 +206,7 @@ struct srpc_client_rpc { ...@@ -206,7 +206,7 @@ struct srpc_client_rpc {
int crpc_timeout; /* # seconds to wait for reply */ int crpc_timeout; /* # seconds to wait for reply */
struct stt_timer crpc_timer; struct stt_timer crpc_timer;
struct swi_workitem crpc_wi; struct swi_workitem crpc_wi;
lnet_process_id_t crpc_dest; struct lnet_process_id crpc_dest;
void (*crpc_done)(struct srpc_client_rpc *); void (*crpc_done)(struct srpc_client_rpc *);
void (*crpc_fini)(struct srpc_client_rpc *); void (*crpc_fini)(struct srpc_client_rpc *);
...@@ -355,7 +355,7 @@ struct sfw_test_client_ops { ...@@ -355,7 +355,7 @@ struct sfw_test_client_ops {
* client * client
*/ */
int (*tso_prep_rpc)(struct sfw_test_unit *tsu, int (*tso_prep_rpc)(struct sfw_test_unit *tsu,
lnet_process_id_t dest, struct lnet_process_id dest,
struct srpc_client_rpc **rpc); /* prep a tests rpc */ struct srpc_client_rpc **rpc); /* prep a tests rpc */
void (*tso_done_rpc)(struct sfw_test_unit *tsu, void (*tso_done_rpc)(struct sfw_test_unit *tsu,
struct srpc_client_rpc *rpc); /* done a test rpc */ struct srpc_client_rpc *rpc); /* done a test rpc */
...@@ -392,8 +392,8 @@ struct sfw_test_instance { ...@@ -392,8 +392,8 @@ struct sfw_test_instance {
}; };
/* /*
* XXX: trailing (PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at the end of * XXX: trailing (PAGE_SIZE % sizeof(struct lnet_process_id)) bytes at the end
* pages are not used * of pages are not used
*/ */
#define SFW_MAX_CONCUR LST_MAX_CONCUR #define SFW_MAX_CONCUR LST_MAX_CONCUR
#define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(struct lnet_process_id_packed)) #define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(struct lnet_process_id_packed))
...@@ -402,7 +402,7 @@ struct sfw_test_instance { ...@@ -402,7 +402,7 @@ struct sfw_test_instance {
struct sfw_test_unit { struct sfw_test_unit {
struct list_head tsu_list; /* chain on lst_test_instance */ struct list_head tsu_list; /* chain on lst_test_instance */
lnet_process_id_t tsu_dest; /* id of dest node */ struct lnet_process_id tsu_dest; /* id of dest node */
int tsu_loop; /* loop count of the test */ int tsu_loop; /* loop count of the test */
struct sfw_test_instance *tsu_instance; /* pointer to test instance */ struct sfw_test_instance *tsu_instance; /* pointer to test instance */
void *tsu_private; /* private data */ void *tsu_private; /* private data */
...@@ -416,11 +416,11 @@ struct sfw_test_case { ...@@ -416,11 +416,11 @@ struct sfw_test_case {
}; };
struct srpc_client_rpc * struct srpc_client_rpc *
sfw_create_rpc(lnet_process_id_t peer, int service, sfw_create_rpc(struct lnet_process_id peer, int service,
unsigned int features, int nbulkiov, int bulklen, unsigned int features, int nbulkiov, int bulklen,
void (*done)(struct srpc_client_rpc *), void *priv); void (*done)(struct srpc_client_rpc *), void *priv);
int sfw_create_test_rpc(struct sfw_test_unit *tsu, int sfw_create_test_rpc(struct sfw_test_unit *tsu,
lnet_process_id_t peer, unsigned int features, struct lnet_process_id peer, unsigned int features,
int nblk, int blklen, struct srpc_client_rpc **rpc); int nblk, int blklen, struct srpc_client_rpc **rpc);
void sfw_abort_rpc(struct srpc_client_rpc *rpc); void sfw_abort_rpc(struct srpc_client_rpc *rpc);
void sfw_post_rpc(struct srpc_client_rpc *rpc); void sfw_post_rpc(struct srpc_client_rpc *rpc);
...@@ -434,7 +434,7 @@ int sfw_make_session(struct srpc_mksn_reqst *request, ...@@ -434,7 +434,7 @@ int sfw_make_session(struct srpc_mksn_reqst *request,
struct srpc_mksn_reply *reply); struct srpc_mksn_reply *reply);
struct srpc_client_rpc * struct srpc_client_rpc *
srpc_create_client_rpc(lnet_process_id_t peer, int service, srpc_create_client_rpc(struct lnet_process_id peer, int service,
int nbulkiov, int bulklen, int nbulkiov, int bulklen,
void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_done)(struct srpc_client_rpc *),
void (*rpc_fini)(struct srpc_client_rpc *), void *priv); void (*rpc_fini)(struct srpc_client_rpc *), void *priv);
...@@ -522,7 +522,7 @@ srpc_destroy_client_rpc(struct srpc_client_rpc *rpc) ...@@ -522,7 +522,7 @@ srpc_destroy_client_rpc(struct srpc_client_rpc *rpc)
} }
static inline void static inline void
srpc_init_client_rpc(struct srpc_client_rpc *rpc, lnet_process_id_t peer, srpc_init_client_rpc(struct srpc_client_rpc *rpc, struct lnet_process_id peer,
int service, int nbulkiov, int bulklen, int service, int nbulkiov, int bulklen,
void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_done)(struct srpc_client_rpc *),
void (*rpc_fini)(struct srpc_client_rpc *), void *priv) void (*rpc_fini)(struct srpc_client_rpc *), void *priv)
......
...@@ -288,7 +288,7 @@ struct ptlrpc_connection { ...@@ -288,7 +288,7 @@ struct ptlrpc_connection {
/** Our own lnet nid for this connection */ /** Our own lnet nid for this connection */
lnet_nid_t c_self; lnet_nid_t c_self;
/** Remote side nid for this connection */ /** Remote side nid for this connection */
lnet_process_id_t c_peer; struct lnet_process_id c_peer;
/** UUID of the other side */ /** UUID of the other side */
struct obd_uuid c_remote_uuid; struct obd_uuid c_remote_uuid;
/** reference counter for this connection */ /** reference counter for this connection */
...@@ -876,7 +876,7 @@ struct ptlrpc_request { ...@@ -876,7 +876,7 @@ struct ptlrpc_request {
/** our LNet NID */ /** our LNet NID */
lnet_nid_t rq_self; lnet_nid_t rq_self;
/** Peer description (the other side) */ /** Peer description (the other side) */
lnet_process_id_t rq_peer; struct lnet_process_id rq_peer;
/** /**
* service time estimate (secs) * service time estimate (secs)
* If the request is not served by this time, it is marked as timed out. * If the request is not served by this time, it is marked as timed out.
...@@ -1751,7 +1751,7 @@ static inline bool nrs_policy_compat_one(const struct ptlrpc_service *svc, ...@@ -1751,7 +1751,7 @@ static inline bool nrs_policy_compat_one(const struct ptlrpc_service *svc,
/* ptlrpc/events.c */ /* ptlrpc/events.c */
extern struct lnet_handle_eq ptlrpc_eq_h; extern struct lnet_handle_eq ptlrpc_eq_h;
int ptlrpc_uuid_to_peer(struct obd_uuid *uuid, int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
lnet_process_id_t *peer, lnet_nid_t *self); struct lnet_process_id *peer, lnet_nid_t *self);
/** /**
* These callbacks are invoked by LNet when something happened to * These callbacks are invoked by LNet when something happened to
* underlying buffer * underlying buffer
...@@ -1765,7 +1765,7 @@ void reply_out_callback(struct lnet_event *ev); ...@@ -1765,7 +1765,7 @@ void reply_out_callback(struct lnet_event *ev);
/** @} */ /** @} */
/* ptlrpc/connection.c */ /* ptlrpc/connection.c */
struct ptlrpc_connection *ptlrpc_connection_get(lnet_process_id_t peer, struct ptlrpc_connection *ptlrpc_connection_get(struct lnet_process_id peer,
lnet_nid_t self, lnet_nid_t self,
struct obd_uuid *uuid); struct obd_uuid *uuid);
int ptlrpc_connection_put(struct ptlrpc_connection *c); int ptlrpc_connection_put(struct ptlrpc_connection *c);
......
...@@ -2512,7 +2512,7 @@ ssize_t ll_copy_user_md(const struct lov_user_md __user *md, ...@@ -2512,7 +2512,7 @@ ssize_t ll_copy_user_md(const struct lov_user_md __user *md,
void ll_compute_rootsquash_state(struct ll_sb_info *sbi) void ll_compute_rootsquash_state(struct ll_sb_info *sbi)
{ {
struct root_squash_info *squash = &sbi->ll_squash; struct root_squash_info *squash = &sbi->ll_squash;
lnet_process_id_t id; struct lnet_process_id id;
bool matched; bool matched;
int i; int i;
......
...@@ -84,7 +84,7 @@ MODULE_ALIAS_FS("lustre"); ...@@ -84,7 +84,7 @@ MODULE_ALIAS_FS("lustre");
static int __init lustre_init(void) static int __init lustre_init(void)
{ {
lnet_process_id_t lnet_id; struct lnet_process_id lnet_id;
struct timespec64 ts; struct timespec64 ts;
int i, rc, seed[2]; int i, rc, seed[2];
......
...@@ -1195,7 +1195,8 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli, ...@@ -1195,7 +1195,8 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
return rc; return rc;
} }
static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer, static int check_write_checksum(struct obdo *oa,
const struct lnet_process_id *peer,
__u32 client_cksum, __u32 server_cksum, int nob, __u32 client_cksum, __u32 server_cksum, int nob,
u32 page_count, struct brw_page **pga, u32 page_count, struct brw_page **pga,
enum cksum_type client_cksum_type) enum cksum_type client_cksum_type)
...@@ -1245,7 +1246,7 @@ static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer, ...@@ -1245,7 +1246,7 @@ static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer,
static int osc_brw_fini_request(struct ptlrpc_request *req, int rc) static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
{ {
struct osc_brw_async_args *aa = (void *)&req->rq_async_args; struct osc_brw_async_args *aa = (void *)&req->rq_async_args;
const lnet_process_id_t *peer = const struct lnet_process_id *peer =
&req->rq_import->imp_connection->c_peer; &req->rq_import->imp_connection->c_peer;
struct client_obd *cli = aa->aa_cli; struct client_obd *cli = aa->aa_cli;
struct ost_body *body; struct ost_body *body;
......
...@@ -78,7 +78,7 @@ struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid) ...@@ -78,7 +78,7 @@ struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid)
{ {
struct ptlrpc_connection *c; struct ptlrpc_connection *c;
lnet_nid_t self; lnet_nid_t self;
lnet_process_id_t peer; struct lnet_process_id peer;
int err; int err;
/* /*
......
...@@ -41,7 +41,7 @@ static struct cfs_hash *conn_hash; ...@@ -41,7 +41,7 @@ static struct cfs_hash *conn_hash;
static struct cfs_hash_ops conn_hash_ops; static struct cfs_hash_ops conn_hash_ops;
struct ptlrpc_connection * struct ptlrpc_connection *
ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self, ptlrpc_connection_get(struct lnet_process_id peer, lnet_nid_t self,
struct obd_uuid *uuid) struct obd_uuid *uuid)
{ {
struct ptlrpc_connection *conn, *conn2; struct ptlrpc_connection *conn, *conn2;
...@@ -155,14 +155,14 @@ void ptlrpc_connection_fini(void) ...@@ -155,14 +155,14 @@ void ptlrpc_connection_fini(void)
static unsigned int static unsigned int
conn_hashfn(struct cfs_hash *hs, const void *key, unsigned int mask) conn_hashfn(struct cfs_hash *hs, const void *key, unsigned int mask)
{ {
return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask); return cfs_hash_djb2_hash(key, sizeof(struct lnet_process_id), mask);
} }
static int static int
conn_keycmp(const void *key, struct hlist_node *hnode) conn_keycmp(const void *key, struct hlist_node *hnode)
{ {
struct ptlrpc_connection *conn; struct ptlrpc_connection *conn;
const lnet_process_id_t *conn_key; const struct lnet_process_id *conn_key;
LASSERT(key); LASSERT(key);
conn_key = key; conn_key = key;
......
...@@ -446,7 +446,7 @@ static void ptlrpc_master_callback(struct lnet_event *ev) ...@@ -446,7 +446,7 @@ static void ptlrpc_master_callback(struct lnet_event *ev)
} }
int ptlrpc_uuid_to_peer(struct obd_uuid *uuid, int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
lnet_process_id_t *peer, lnet_nid_t *self) struct lnet_process_id *peer, lnet_nid_t *self)
{ {
int best_dist = 0; int best_dist = 0;
__u32 best_order = 0; __u32 best_order = 0;
......
...@@ -109,7 +109,7 @@ static void mdunlink_iterate_helper(struct lnet_handle_md *bd_mds, int count) ...@@ -109,7 +109,7 @@ static void mdunlink_iterate_helper(struct lnet_handle_md *bd_mds, int count)
static int ptlrpc_register_bulk(struct ptlrpc_request *req) static int ptlrpc_register_bulk(struct ptlrpc_request *req)
{ {
struct ptlrpc_bulk_desc *desc = req->rq_bulk; struct ptlrpc_bulk_desc *desc = req->rq_bulk;
lnet_process_id_t peer; struct lnet_process_id peer;
int rc = 0; int rc = 0;
int rc2; int rc2;
int posted_md; int posted_md;
...@@ -719,7 +719,7 @@ EXPORT_SYMBOL(ptl_send_rpc); ...@@ -719,7 +719,7 @@ EXPORT_SYMBOL(ptl_send_rpc);
int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd) int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd)
{ {
struct ptlrpc_service *service = rqbd->rqbd_svcpt->scp_service; struct ptlrpc_service *service = rqbd->rqbd_svcpt->scp_service;
static lnet_process_id_t match_id = {LNET_NID_ANY, LNET_PID_ANY}; static struct lnet_process_id match_id = {LNET_NID_ANY, LNET_PID_ANY};
int rc; int rc;
struct lnet_md md; struct lnet_md md;
struct lnet_handle_me me_h; struct lnet_handle_me me_h;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment