Commit 5716397a authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: lnet: change lnet_peer_t to proper structure

Change lnet_peer_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 ff67f7f6
...@@ -364,16 +364,16 @@ lnet_handle2me(struct lnet_handle_me *handle) ...@@ -364,16 +364,16 @@ lnet_handle2me(struct lnet_handle_me *handle)
} }
static inline void static inline void
lnet_peer_addref_locked(lnet_peer_t *lp) lnet_peer_addref_locked(struct lnet_peer *lp)
{ {
LASSERT(lp->lp_refcount > 0); LASSERT(lp->lp_refcount > 0);
lp->lp_refcount++; lp->lp_refcount++;
} }
void lnet_destroy_peer_locked(lnet_peer_t *lp); void lnet_destroy_peer_locked(struct lnet_peer *lp);
static inline void static inline void
lnet_peer_decref_locked(lnet_peer_t *lp) lnet_peer_decref_locked(struct lnet_peer *lp)
{ {
LASSERT(lp->lp_refcount > 0); LASSERT(lp->lp_refcount > 0);
lp->lp_refcount--; lp->lp_refcount--;
...@@ -382,7 +382,7 @@ lnet_peer_decref_locked(lnet_peer_t *lp) ...@@ -382,7 +382,7 @@ lnet_peer_decref_locked(lnet_peer_t *lp)
} }
static inline int static inline int
lnet_isrouter(lnet_peer_t *lp) lnet_isrouter(struct lnet_peer *lp)
{ {
return lp->lp_rtr_refcount ? 1 : 0; return lp->lp_rtr_refcount ? 1 : 0;
} }
...@@ -454,7 +454,7 @@ int lnet_lib_init(void); ...@@ -454,7 +454,7 @@ int lnet_lib_init(void);
void lnet_lib_exit(void); void lnet_lib_exit(void);
int lnet_notify(struct lnet_ni *ni, lnet_nid_t peer, int alive, unsigned long when); int lnet_notify(struct lnet_ni *ni, lnet_nid_t peer, int alive, unsigned long when);
void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, void lnet_notify_locked(struct lnet_peer *lp, int notifylnd, int alive,
unsigned long when); unsigned long when);
int lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway_nid, int lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway_nid,
unsigned int priority); unsigned int priority);
...@@ -666,7 +666,7 @@ int lnet_peer_buffer_credits(struct lnet_ni *ni); ...@@ -666,7 +666,7 @@ int lnet_peer_buffer_credits(struct lnet_ni *ni);
int lnet_router_checker_start(void); int lnet_router_checker_start(void);
void lnet_router_checker_stop(void); void lnet_router_checker_stop(void);
void lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net); void lnet_router_ni_update_locked(struct lnet_peer *gw, __u32 net);
void lnet_swap_pinginfo(struct lnet_ping_info *info); void lnet_swap_pinginfo(struct lnet_ping_info *info);
int lnet_parse_ip2nets(char **networksp, char *ip2nets); int lnet_parse_ip2nets(char **networksp, char *ip2nets);
...@@ -674,9 +674,9 @@ int lnet_parse_routes(char *route_str, int *im_a_router); ...@@ -674,9 +674,9 @@ int lnet_parse_routes(char *route_str, int *im_a_router);
int lnet_parse_networks(struct list_head *nilist, char *networks); int lnet_parse_networks(struct list_head *nilist, char *networks);
int lnet_net_unique(__u32 net, struct list_head *nilist); int lnet_net_unique(__u32 net, struct list_head *nilist);
int lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt); int lnet_nid2peer_locked(struct lnet_peer **lpp, lnet_nid_t nid, int cpt);
lnet_peer_t *lnet_find_peer_locked(struct lnet_peer_table *ptable, struct lnet_peer *lnet_find_peer_locked(struct lnet_peer_table *ptable,
lnet_nid_t nid); lnet_nid_t nid);
void lnet_peer_tables_cleanup(struct lnet_ni *ni); void lnet_peer_tables_cleanup(struct lnet_ni *ni);
void lnet_peer_tables_destroy(void); void lnet_peer_tables_destroy(void);
int lnet_peer_tables_create(void); int lnet_peer_tables_create(void);
...@@ -689,7 +689,7 @@ int lnet_get_peer_info(__u32 peer_index, __u64 *nid, ...@@ -689,7 +689,7 @@ int lnet_get_peer_info(__u32 peer_index, __u64 *nid,
__u32 *peer_tx_qnob); __u32 *peer_tx_qnob);
static inline void static inline void
lnet_peer_set_alive(lnet_peer_t *lp) lnet_peer_set_alive(struct lnet_peer *lp)
{ {
lp->lp_last_query = jiffies; lp->lp_last_query = jiffies;
lp->lp_last_alive = jiffies; lp->lp_last_alive = jiffies;
......
...@@ -305,7 +305,7 @@ struct lnet_rc_data { ...@@ -305,7 +305,7 @@ struct lnet_rc_data {
struct lnet_ping_info *rcd_pinginfo; /* ping buffer */ struct lnet_ping_info *rcd_pinginfo; /* ping buffer */
}; };
typedef struct lnet_peer { struct lnet_peer {
struct list_head lp_hashlist; /* chain on peer hash */ struct list_head lp_hashlist; /* chain on peer hash */
struct list_head lp_txq; /* messages blocking for struct list_head lp_txq; /* messages blocking for
tx credits */ tx credits */
...@@ -346,7 +346,7 @@ typedef struct lnet_peer { ...@@ -346,7 +346,7 @@ typedef struct lnet_peer {
unsigned int lp_ping_feats; unsigned int lp_ping_feats;
struct list_head lp_routes; /* routers on this peer */ struct list_head lp_routes; /* routers on this peer */
struct lnet_rc_data *lp_rcd; /* router checker state */ struct lnet_rc_data *lp_rcd; /* router checker state */
} lnet_peer_t; };
/* peer hash size */ /* peer hash size */
#define LNET_PEER_HASH_BITS 9 #define LNET_PEER_HASH_BITS 9
...@@ -372,7 +372,7 @@ struct lnet_peer_table { ...@@ -372,7 +372,7 @@ struct lnet_peer_table {
typedef struct { typedef struct {
struct list_head lr_list; /* chain on net */ struct list_head lr_list; /* chain on net */
struct list_head lr_gwlist; /* chain on gateway */ struct list_head lr_gwlist; /* chain on gateway */
lnet_peer_t *lr_gateway; /* router node */ struct lnet_peer *lr_gateway; /* router node */
__u32 lr_net; /* remote network number */ __u32 lr_net; /* remote network number */
int lr_seq; /* sequence for round-robin */ int lr_seq; /* sequence for round-robin */
unsigned int lr_downis; /* number of down NIs */ unsigned int lr_downis; /* number of down NIs */
......
...@@ -489,7 +489,7 @@ lnet_ni_eager_recv(struct lnet_ni *ni, struct lnet_msg *msg) ...@@ -489,7 +489,7 @@ lnet_ni_eager_recv(struct lnet_ni *ni, struct lnet_msg *msg)
/* NB: caller shall hold a ref on 'lp' as I'd drop lnet_net_lock */ /* NB: caller shall hold a ref on 'lp' as I'd drop lnet_net_lock */
static void static void
lnet_ni_query_locked(struct lnet_ni *ni, lnet_peer_t *lp) lnet_ni_query_locked(struct lnet_ni *ni, struct lnet_peer *lp)
{ {
unsigned long last_alive = 0; unsigned long last_alive = 0;
...@@ -508,7 +508,7 @@ lnet_ni_query_locked(struct lnet_ni *ni, lnet_peer_t *lp) ...@@ -508,7 +508,7 @@ lnet_ni_query_locked(struct lnet_ni *ni, lnet_peer_t *lp)
/* NB: always called with lnet_net_lock held */ /* NB: always called with lnet_net_lock held */
static inline int static inline int
lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now) lnet_peer_is_alive(struct lnet_peer *lp, unsigned long now)
{ {
int alive; int alive;
unsigned long deadline; unsigned long deadline;
...@@ -542,7 +542,7 @@ lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now) ...@@ -542,7 +542,7 @@ lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now)
* may drop the lnet_net_lock * may drop the lnet_net_lock
*/ */
static int static int
lnet_peer_alive_locked(lnet_peer_t *lp) lnet_peer_alive_locked(struct lnet_peer *lp)
{ {
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
...@@ -598,7 +598,7 @@ lnet_peer_alive_locked(lnet_peer_t *lp) ...@@ -598,7 +598,7 @@ lnet_peer_alive_locked(lnet_peer_t *lp)
static int static int
lnet_post_send_locked(struct lnet_msg *msg, int do_send) lnet_post_send_locked(struct lnet_msg *msg, int do_send)
{ {
lnet_peer_t *lp = msg->msg_txpeer; struct lnet_peer *lp = msg->msg_txpeer;
struct lnet_ni *ni = lp->lp_ni; struct lnet_ni *ni = lp->lp_ni;
int cpt = msg->msg_tx_cpt; int cpt = msg->msg_tx_cpt;
struct lnet_tx_queue *tq = ni->ni_tx_queues[cpt]; struct lnet_tx_queue *tq = ni->ni_tx_queues[cpt];
...@@ -709,7 +709,7 @@ lnet_post_routed_recv_locked(struct lnet_msg *msg, int do_recv) ...@@ -709,7 +709,7 @@ lnet_post_routed_recv_locked(struct lnet_msg *msg, int do_recv)
* I return LNET_CREDIT_WAIT if msg blocked and LNET_CREDIT_OK if * I return LNET_CREDIT_WAIT if msg blocked and LNET_CREDIT_OK if
* received or OK to receive * received or OK to receive
*/ */
lnet_peer_t *lp = msg->msg_rxpeer; struct lnet_peer *lp = msg->msg_rxpeer;
lnet_rtrbufpool_t *rbp; lnet_rtrbufpool_t *rbp;
lnet_rtrbuf_t *rb; lnet_rtrbuf_t *rb;
...@@ -779,7 +779,7 @@ lnet_post_routed_recv_locked(struct lnet_msg *msg, int do_recv) ...@@ -779,7 +779,7 @@ lnet_post_routed_recv_locked(struct lnet_msg *msg, int do_recv)
void void
lnet_return_tx_credits_locked(struct lnet_msg *msg) lnet_return_tx_credits_locked(struct lnet_msg *msg)
{ {
lnet_peer_t *txpeer = msg->msg_txpeer; struct lnet_peer *txpeer = msg->msg_txpeer;
struct lnet_msg *msg2; struct lnet_msg *msg2;
if (msg->msg_txcredit) { if (msg->msg_txcredit) {
...@@ -874,7 +874,7 @@ lnet_drop_routed_msgs_locked(struct list_head *list, int cpt) ...@@ -874,7 +874,7 @@ lnet_drop_routed_msgs_locked(struct list_head *list, int cpt)
void void
lnet_return_rx_credits_locked(struct lnet_msg *msg) lnet_return_rx_credits_locked(struct lnet_msg *msg)
{ {
lnet_peer_t *rxpeer = msg->msg_rxpeer; struct lnet_peer *rxpeer = msg->msg_rxpeer;
struct lnet_msg *msg2; struct lnet_msg *msg2;
if (msg->msg_rtrcredit) { if (msg->msg_rtrcredit) {
...@@ -959,8 +959,8 @@ lnet_return_rx_credits_locked(struct lnet_msg *msg) ...@@ -959,8 +959,8 @@ lnet_return_rx_credits_locked(struct lnet_msg *msg)
static int static int
lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2) lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2)
{ {
lnet_peer_t *p1 = r1->lr_gateway; struct lnet_peer *p1 = r1->lr_gateway;
lnet_peer_t *p2 = r2->lr_gateway; struct lnet_peer *p2 = r2->lr_gateway;
int r1_hops = (r1->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r1->lr_hops; int r1_hops = (r1->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r1->lr_hops;
int r2_hops = (r2->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r2->lr_hops; int r2_hops = (r2->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r2->lr_hops;
...@@ -994,7 +994,7 @@ lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2) ...@@ -994,7 +994,7 @@ lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2)
return -ERANGE; return -ERANGE;
} }
static lnet_peer_t * static struct lnet_peer *
lnet_find_route_locked(struct lnet_ni *ni, lnet_nid_t target, lnet_find_route_locked(struct lnet_ni *ni, lnet_nid_t target,
lnet_nid_t rtr_nid) lnet_nid_t rtr_nid)
{ {
......
...@@ -105,8 +105,8 @@ lnet_peer_table_cleanup_locked(struct lnet_ni *ni, ...@@ -105,8 +105,8 @@ lnet_peer_table_cleanup_locked(struct lnet_ni *ni,
struct lnet_peer_table *ptable) struct lnet_peer_table *ptable)
{ {
int i; int i;
lnet_peer_t *lp; struct lnet_peer *lp;
lnet_peer_t *tmp; struct lnet_peer *tmp;
for (i = 0; i < LNET_PEER_HASH_SIZE; i++) { for (i = 0; i < LNET_PEER_HASH_SIZE; i++) {
list_for_each_entry_safe(lp, tmp, &ptable->pt_hash[i], list_for_each_entry_safe(lp, tmp, &ptable->pt_hash[i],
...@@ -146,8 +146,8 @@ lnet_peer_table_del_rtrs_locked(struct lnet_ni *ni, ...@@ -146,8 +146,8 @@ lnet_peer_table_del_rtrs_locked(struct lnet_ni *ni,
struct lnet_peer_table *ptable, struct lnet_peer_table *ptable,
int cpt_locked) int cpt_locked)
{ {
lnet_peer_t *lp; struct lnet_peer *lp;
lnet_peer_t *tmp; struct lnet_peer *tmp;
lnet_nid_t lp_nid; lnet_nid_t lp_nid;
int i; int i;
...@@ -174,8 +174,8 @@ lnet_peer_tables_cleanup(struct lnet_ni *ni) ...@@ -174,8 +174,8 @@ lnet_peer_tables_cleanup(struct lnet_ni *ni)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
struct list_head deathrow; struct list_head deathrow;
lnet_peer_t *lp; struct lnet_peer *lp;
lnet_peer_t *temp; struct lnet_peer *temp;
int i; int i;
INIT_LIST_HEAD(&deathrow); INIT_LIST_HEAD(&deathrow);
...@@ -216,7 +216,7 @@ lnet_peer_tables_cleanup(struct lnet_ni *ni) ...@@ -216,7 +216,7 @@ lnet_peer_tables_cleanup(struct lnet_ni *ni)
} }
void void
lnet_destroy_peer_locked(lnet_peer_t *lp) lnet_destroy_peer_locked(struct lnet_peer *lp)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
...@@ -238,11 +238,11 @@ lnet_destroy_peer_locked(lnet_peer_t *lp) ...@@ -238,11 +238,11 @@ lnet_destroy_peer_locked(lnet_peer_t *lp)
ptable->pt_zombies--; ptable->pt_zombies--;
} }
lnet_peer_t * struct lnet_peer *
lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid) lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid)
{ {
struct list_head *peers; struct list_head *peers;
lnet_peer_t *lp; struct lnet_peer *lp;
LASSERT(!the_lnet.ln_shutdown); LASSERT(!the_lnet.ln_shutdown);
...@@ -258,11 +258,11 @@ lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid) ...@@ -258,11 +258,11 @@ lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid)
} }
int int
lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt) lnet_nid2peer_locked(struct lnet_peer **lpp, lnet_nid_t nid, int cpt)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
lnet_peer_t *lp = NULL; struct lnet_peer *lp = NULL;
lnet_peer_t *lp2; struct lnet_peer *lp2;
int cpt2; int cpt2;
int rc = 0; int rc = 0;
...@@ -282,7 +282,7 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt) ...@@ -282,7 +282,7 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
if (!list_empty(&ptable->pt_deathrow)) { if (!list_empty(&ptable->pt_deathrow)) {
lp = list_entry(ptable->pt_deathrow.next, lp = list_entry(ptable->pt_deathrow.next,
lnet_peer_t, lp_hashlist); struct lnet_peer, lp_hashlist);
list_del(&lp->lp_hashlist); list_del(&lp->lp_hashlist);
} }
...@@ -364,7 +364,7 @@ void ...@@ -364,7 +364,7 @@ void
lnet_debug_peer(lnet_nid_t nid) lnet_debug_peer(lnet_nid_t nid)
{ {
char *aliveness = "NA"; char *aliveness = "NA";
lnet_peer_t *lp; struct lnet_peer *lp;
int rc; int rc;
int cpt; int cpt;
...@@ -401,7 +401,7 @@ lnet_get_peer_info(__u32 peer_index, __u64 *nid, ...@@ -401,7 +401,7 @@ lnet_get_peer_info(__u32 peer_index, __u64 *nid,
__u32 *peer_tx_qnob) __u32 *peer_tx_qnob)
{ {
struct lnet_peer_table *peer_table; struct lnet_peer_table *peer_table;
lnet_peer_t *lp; struct lnet_peer *lp;
bool found = false; bool found = false;
int lncpt, j; int lncpt, j;
......
...@@ -98,7 +98,7 @@ lnet_peers_start_down(void) ...@@ -98,7 +98,7 @@ lnet_peers_start_down(void)
} }
void void
lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, lnet_notify_locked(struct lnet_peer *lp, int notifylnd, int alive,
unsigned long when) unsigned long when)
{ {
if (time_before(when, lp->lp_timestamp)) { /* out of date information */ if (time_before(when, lp->lp_timestamp)) { /* out of date information */
...@@ -128,7 +128,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, ...@@ -128,7 +128,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive,
} }
static void static void
lnet_ni_notify_locked(struct lnet_ni *ni, lnet_peer_t *lp) lnet_ni_notify_locked(struct lnet_ni *ni, struct lnet_peer *lp)
{ {
int alive; int alive;
int notifylnd; int notifylnd;
...@@ -167,7 +167,7 @@ lnet_ni_notify_locked(struct lnet_ni *ni, lnet_peer_t *lp) ...@@ -167,7 +167,7 @@ lnet_ni_notify_locked(struct lnet_ni *ni, lnet_peer_t *lp)
} }
static void static void
lnet_rtr_addref_locked(lnet_peer_t *lp) lnet_rtr_addref_locked(struct lnet_peer *lp)
{ {
LASSERT(lp->lp_refcount > 0); LASSERT(lp->lp_refcount > 0);
LASSERT(lp->lp_rtr_refcount >= 0); LASSERT(lp->lp_rtr_refcount >= 0);
...@@ -179,9 +179,9 @@ lnet_rtr_addref_locked(lnet_peer_t *lp) ...@@ -179,9 +179,9 @@ lnet_rtr_addref_locked(lnet_peer_t *lp)
/* a simple insertion sort */ /* a simple insertion sort */
list_for_each_prev(pos, &the_lnet.ln_routers) { list_for_each_prev(pos, &the_lnet.ln_routers) {
lnet_peer_t *rtr = list_entry(pos, lnet_peer_t, struct lnet_peer *rtr;
lp_rtr_list);
rtr = list_entry(pos, struct lnet_peer, lp_rtr_list);
if (rtr->lp_nid < lp->lp_nid) if (rtr->lp_nid < lp->lp_nid)
break; break;
} }
...@@ -194,7 +194,7 @@ lnet_rtr_addref_locked(lnet_peer_t *lp) ...@@ -194,7 +194,7 @@ lnet_rtr_addref_locked(lnet_peer_t *lp)
} }
static void static void
lnet_rtr_decref_locked(lnet_peer_t *lp) lnet_rtr_decref_locked(struct lnet_peer *lp)
{ {
LASSERT(lp->lp_refcount > 0); LASSERT(lp->lp_refcount > 0);
LASSERT(lp->lp_rtr_refcount > 0); LASSERT(lp->lp_rtr_refcount > 0);
...@@ -791,7 +791,7 @@ lnet_router_checker_event(lnet_event_t *event) ...@@ -791,7 +791,7 @@ lnet_router_checker_event(lnet_event_t *event)
static void static void
lnet_wait_known_routerstate(void) lnet_wait_known_routerstate(void)
{ {
lnet_peer_t *rtr; struct lnet_peer *rtr;
struct list_head *entry; struct list_head *entry;
int all_known; int all_known;
...@@ -802,7 +802,7 @@ lnet_wait_known_routerstate(void) ...@@ -802,7 +802,7 @@ lnet_wait_known_routerstate(void)
all_known = 1; all_known = 1;
list_for_each(entry, &the_lnet.ln_routers) { list_for_each(entry, &the_lnet.ln_routers) {
rtr = list_entry(entry, lnet_peer_t, lp_rtr_list); rtr = list_entry(entry,struct lnet_peer, lp_rtr_list);
if (!rtr->lp_alive_count) { if (!rtr->lp_alive_count) {
all_known = 0; all_known = 0;
...@@ -821,7 +821,7 @@ lnet_wait_known_routerstate(void) ...@@ -821,7 +821,7 @@ lnet_wait_known_routerstate(void)
} }
void void
lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net) lnet_router_ni_update_locked(struct lnet_peer *gw, __u32 net)
{ {
lnet_route_t *rte; lnet_route_t *rte;
...@@ -899,7 +899,7 @@ lnet_destroy_rc_data(struct lnet_rc_data *rcd) ...@@ -899,7 +899,7 @@ lnet_destroy_rc_data(struct lnet_rc_data *rcd)
} }
static struct lnet_rc_data * static struct lnet_rc_data *
lnet_create_rc_data_locked(lnet_peer_t *gateway) lnet_create_rc_data_locked(struct lnet_peer *gateway)
{ {
struct lnet_rc_data *rcd = NULL; struct lnet_rc_data *rcd = NULL;
struct lnet_ping_info *pi; struct lnet_ping_info *pi;
...@@ -969,7 +969,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway) ...@@ -969,7 +969,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
} }
static int static int
lnet_router_check_interval(lnet_peer_t *rtr) lnet_router_check_interval(struct lnet_peer *rtr)
{ {
int secs; int secs;
...@@ -982,7 +982,7 @@ lnet_router_check_interval(lnet_peer_t *rtr) ...@@ -982,7 +982,7 @@ lnet_router_check_interval(lnet_peer_t *rtr)
} }
static void static void
lnet_ping_router_locked(lnet_peer_t *rtr) lnet_ping_router_locked(struct lnet_peer *rtr)
{ {
struct lnet_rc_data *rcd = NULL; struct lnet_rc_data *rcd = NULL;
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
...@@ -1126,7 +1126,7 @@ lnet_prune_rc_data(int wait_unlink) ...@@ -1126,7 +1126,7 @@ lnet_prune_rc_data(int wait_unlink)
{ {
struct lnet_rc_data *rcd; struct lnet_rc_data *rcd;
struct lnet_rc_data *tmp; struct lnet_rc_data *tmp;
lnet_peer_t *lp; struct lnet_peer *lp;
struct list_head head; struct list_head head;
int i = 2; int i = 2;
...@@ -1232,7 +1232,7 @@ lnet_router_checker_active(void) ...@@ -1232,7 +1232,7 @@ lnet_router_checker_active(void)
static int static int
lnet_router_checker(void *arg) lnet_router_checker(void *arg)
{ {
lnet_peer_t *rtr; struct lnet_peer *rtr;
struct list_head *entry; struct list_head *entry;
cfs_block_allsigs(); cfs_block_allsigs();
...@@ -1247,7 +1247,7 @@ lnet_router_checker(void *arg) ...@@ -1247,7 +1247,7 @@ lnet_router_checker(void *arg)
version = the_lnet.ln_routers_version; version = the_lnet.ln_routers_version;
list_for_each(entry, &the_lnet.ln_routers) { list_for_each(entry, &the_lnet.ln_routers) {
rtr = list_entry(entry, lnet_peer_t, lp_rtr_list); rtr = list_entry(entry, struct lnet_peer, lp_rtr_list);
cpt2 = lnet_cpt_of_nid_locked(rtr->lp_nid); cpt2 = lnet_cpt_of_nid_locked(rtr->lp_nid);
if (cpt != cpt2) { if (cpt != cpt2) {
......
...@@ -307,9 +307,9 @@ static int proc_lnet_routers(struct ctl_table *table, int write, ...@@ -307,9 +307,9 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
r = the_lnet.ln_routers.next; r = the_lnet.ln_routers.next;
while (r != &the_lnet.ln_routers) { while (r != &the_lnet.ln_routers) {
lnet_peer_t *lp = list_entry(r, lnet_peer_t, struct lnet_peer *lp;
lp_rtr_list);
lp = list_entry(r, struct lnet_peer, lp_rtr_list);
if (!skip) { if (!skip) {
peer = lp; peer = lp;
break; break;
...@@ -454,8 +454,10 @@ static int proc_lnet_peers(struct ctl_table *table, int write, ...@@ -454,8 +454,10 @@ static int proc_lnet_peers(struct ctl_table *table, int write,
p = ptable->pt_hash[hash].next; p = ptable->pt_hash[hash].next;
while (p != &ptable->pt_hash[hash]) { while (p != &ptable->pt_hash[hash]) {
lnet_peer_t *lp = list_entry(p, lnet_peer_t, struct lnet_peer *lp;
lp_hashlist);
lp = list_entry(p, struct lnet_peer,
lp_hashlist);
if (!skip) { if (!skip) {
peer = lp; peer = lp;
......
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