Commit 7e7ab095 authored by Mike Shuey's avatar Mike Shuey Committed by Greg Kroah-Hartman

staging: lustre: lnet: lnet: code cleanups - variable declarations

Unify variable declarations to use a single space, and any other obvious
spacing flaws.
Signed-off-by: default avatarMike Shuey <shuey@purdue.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f445e63
...@@ -143,10 +143,10 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid, ...@@ -143,10 +143,10 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid,
__u32 local_ip, __u32 peer_ip, int peer_port) __u32 local_ip, __u32 peer_ip, int peer_port)
{ {
lnet_acceptor_connreq_t cr; lnet_acceptor_connreq_t cr;
struct socket *sock; struct socket *sock;
int rc; int rc;
int port; int port;
int fatal; int fatal;
CLASSERT(sizeof(cr) <= 16); /* not too big to be on the stack */ CLASSERT(sizeof(cr) <= 16); /* not too big to be on the stack */
...@@ -211,12 +211,12 @@ static int ...@@ -211,12 +211,12 @@ static int
lnet_accept(struct socket *sock, __u32 magic) lnet_accept(struct socket *sock, __u32 magic)
{ {
lnet_acceptor_connreq_t cr; lnet_acceptor_connreq_t cr;
__u32 peer_ip; __u32 peer_ip;
int peer_port; int peer_port;
int rc; int rc;
int flip; int flip;
lnet_ni_t *ni; lnet_ni_t *ni;
char *str; char *str;
LASSERT(sizeof(cr) <= 16); /* not too big for the stack */ LASSERT(sizeof(cr) <= 16); /* not too big for the stack */
...@@ -333,11 +333,11 @@ static int ...@@ -333,11 +333,11 @@ static int
lnet_acceptor(void *arg) lnet_acceptor(void *arg)
{ {
struct socket *newsock; struct socket *newsock;
int rc; int rc;
__u32 magic; __u32 magic;
__u32 peer_ip; __u32 peer_ip;
int peer_port; int peer_port;
int secure = (int)((long_ptr_t)arg); int secure = (int)((long_ptr_t)arg);
LASSERT(lnet_acceptor_state.pta_sock == NULL); LASSERT(lnet_acceptor_state.pta_sock == NULL);
...@@ -444,7 +444,7 @@ accept2secure(const char *acc, long *sec) ...@@ -444,7 +444,7 @@ accept2secure(const char *acc, long *sec)
int int
lnet_acceptor_start(void) lnet_acceptor_start(void)
{ {
int rc; int rc;
long rc2; long rc2;
long secure; long secure;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#define D_LNI D_CONSOLE #define D_LNI D_CONSOLE
lnet_t the_lnet; /* THE state of the network */ lnet_t the_lnet; /* THE state of the network */
EXPORT_SYMBOL(the_lnet); EXPORT_SYMBOL(the_lnet);
...@@ -70,8 +70,8 @@ lnet_get_routes(void) ...@@ -70,8 +70,8 @@ lnet_get_routes(void)
static char * static char *
lnet_get_networks(void) lnet_get_networks(void)
{ {
char *nets; char *nets;
int rc; int rc;
if (*networks != 0 && *ip2nets != 0) { if (*networks != 0 && *ip2nets != 0) {
LCONSOLE_ERROR_MSG(0x101, "Please specify EITHER 'networks' or 'ip2nets' but not both at once\n"); LCONSOLE_ERROR_MSG(0x101, "Please specify EITHER 'networks' or 'ip2nets' but not both at once\n");
...@@ -107,8 +107,8 @@ lnet_fini_locks(void) ...@@ -107,8 +107,8 @@ lnet_fini_locks(void)
static int static int
lnet_create_remote_nets_table(void) lnet_create_remote_nets_table(void)
{ {
int i; int i;
struct list_head *hash; struct list_head *hash;
LASSERT(the_lnet.ln_remote_nets_hash == NULL); LASSERT(the_lnet.ln_remote_nets_hash == NULL);
LASSERT(the_lnet.ln_remote_nets_hbits > 0); LASSERT(the_lnet.ln_remote_nets_hbits > 0);
...@@ -273,8 +273,8 @@ static void lnet_assert_wire_constants(void) ...@@ -273,8 +273,8 @@ static void lnet_assert_wire_constants(void)
static lnd_t * static lnd_t *
lnet_find_lnd_by_type(int type) lnet_find_lnd_by_type(int type)
{ {
lnd_t *lnd; lnd_t *lnd;
struct list_head *tmp; struct list_head *tmp;
/* holding lnd mutex */ /* holding lnd mutex */
list_for_each(tmp, &the_lnet.ln_lnds) { list_for_each(tmp, &the_lnet.ln_lnds) {
...@@ -325,7 +325,7 @@ void ...@@ -325,7 +325,7 @@ void
lnet_counters_get(lnet_counters_t *counters) lnet_counters_get(lnet_counters_t *counters)
{ {
lnet_counters_t *ctr; lnet_counters_t *ctr;
int i; int i;
memset(counters, 0, sizeof(*counters)); memset(counters, 0, sizeof(*counters));
...@@ -353,7 +353,7 @@ void ...@@ -353,7 +353,7 @@ void
lnet_counters_reset(void) lnet_counters_reset(void)
{ {
lnet_counters_t *counters; lnet_counters_t *counters;
int i; int i;
lnet_net_lock(LNET_LOCK_EX); lnet_net_lock(LNET_LOCK_EX);
...@@ -396,8 +396,8 @@ lnet_freelist_init(lnet_freelist_t *fl, int n, int size) ...@@ -396,8 +396,8 @@ lnet_freelist_init(lnet_freelist_t *fl, int n, int size)
void void
lnet_freelist_fini(lnet_freelist_t *fl) lnet_freelist_fini(lnet_freelist_t *fl)
{ {
struct list_head *el; struct list_head *el;
int count; int count;
if (fl->fl_nobjs == 0) if (fl->fl_nobjs == 0)
return; return;
...@@ -441,7 +441,7 @@ lnet_res_type2str(int type) ...@@ -441,7 +441,7 @@ lnet_res_type2str(int type)
static void static void
lnet_res_container_cleanup(struct lnet_res_container *rec) lnet_res_container_cleanup(struct lnet_res_container *rec)
{ {
int count = 0; int count = 0;
if (rec->rec_type == 0) /* not set yet, it's uninitialized */ if (rec->rec_type == 0) /* not set yet, it's uninitialized */
return; return;
...@@ -486,8 +486,8 @@ static int ...@@ -486,8 +486,8 @@ static int
lnet_res_container_setup(struct lnet_res_container *rec, lnet_res_container_setup(struct lnet_res_container *rec,
int cpt, int type, int objnum, int objsz) int cpt, int type, int objnum, int objsz)
{ {
int rc = 0; int rc = 0;
int i; int i;
LASSERT(rec->rec_type == 0); LASSERT(rec->rec_type == 0);
...@@ -525,8 +525,8 @@ lnet_res_container_setup(struct lnet_res_container *rec, ...@@ -525,8 +525,8 @@ lnet_res_container_setup(struct lnet_res_container *rec,
static void static void
lnet_res_containers_destroy(struct lnet_res_container **recs) lnet_res_containers_destroy(struct lnet_res_container **recs)
{ {
struct lnet_res_container *rec; struct lnet_res_container *rec;
int i; int i;
cfs_percpt_for_each(rec, i, recs) cfs_percpt_for_each(rec, i, recs)
lnet_res_container_cleanup(rec); lnet_res_container_cleanup(rec);
...@@ -537,10 +537,10 @@ lnet_res_containers_destroy(struct lnet_res_container **recs) ...@@ -537,10 +537,10 @@ lnet_res_containers_destroy(struct lnet_res_container **recs)
static struct lnet_res_container ** static struct lnet_res_container **
lnet_res_containers_create(int type, int objnum, int objsz) lnet_res_containers_create(int type, int objnum, int objsz)
{ {
struct lnet_res_container **recs; struct lnet_res_container **recs;
struct lnet_res_container *rec; struct lnet_res_container *rec;
int rc; int rc;
int i; int i;
recs = cfs_percpt_alloc(lnet_cpt_table(), sizeof(*rec)); recs = cfs_percpt_alloc(lnet_cpt_table(), sizeof(*rec));
if (recs == NULL) { if (recs == NULL) {
...@@ -564,9 +564,9 @@ lnet_libhandle_t * ...@@ -564,9 +564,9 @@ lnet_libhandle_t *
lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie) lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie)
{ {
/* ALWAYS called with lnet_res_lock held */ /* ALWAYS called with lnet_res_lock held */
struct list_head *head; struct list_head *head;
lnet_libhandle_t *lh; lnet_libhandle_t *lh;
unsigned int hash; unsigned int hash;
if ((cookie & LNET_COOKIE_MASK) != rec->rec_type) if ((cookie & LNET_COOKIE_MASK) != rec->rec_type)
return NULL; return NULL;
...@@ -586,8 +586,8 @@ void ...@@ -586,8 +586,8 @@ void
lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)
{ {
/* ALWAYS called with lnet_res_lock held */ /* ALWAYS called with lnet_res_lock held */
unsigned int ibits = LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS; unsigned int ibits = LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS;
unsigned int hash; unsigned int hash;
lh->lh_cookie = rec->rec_lh_cookie; lh->lh_cookie = rec->rec_lh_cookie;
rec->rec_lh_cookie += 1 << ibits; rec->rec_lh_cookie += 1 << ibits;
...@@ -605,7 +605,7 @@ lnet_prepare(lnet_pid_t requested_pid) ...@@ -605,7 +605,7 @@ lnet_prepare(lnet_pid_t requested_pid)
{ {
/* Prepare to bring up the network */ /* Prepare to bring up the network */
struct lnet_res_container **recs; struct lnet_res_container **recs;
int rc = 0; int rc = 0;
LASSERT(the_lnet.ln_refcount == 0); LASSERT(the_lnet.ln_refcount == 0);
...@@ -725,8 +725,8 @@ lnet_unprepare(void) ...@@ -725,8 +725,8 @@ lnet_unprepare(void)
lnet_ni_t * lnet_ni_t *
lnet_net2ni_locked(__u32 net, int cpt) lnet_net2ni_locked(__u32 net, int cpt)
{ {
struct list_head *tmp; struct list_head *tmp;
lnet_ni_t *ni; lnet_ni_t *ni;
LASSERT(cpt != LNET_LOCK_EX); LASSERT(cpt != LNET_LOCK_EX);
...@@ -758,8 +758,8 @@ EXPORT_SYMBOL(lnet_net2ni); ...@@ -758,8 +758,8 @@ EXPORT_SYMBOL(lnet_net2ni);
static unsigned int static unsigned int
lnet_nid_cpt_hash(lnet_nid_t nid, unsigned int number) lnet_nid_cpt_hash(lnet_nid_t nid, unsigned int number)
{ {
__u64 key = nid; __u64 key = nid;
unsigned int val; unsigned int val;
LASSERT(number >= 1 && number <= LNET_CPT_NUMBER); LASSERT(number >= 1 && number <= LNET_CPT_NUMBER);
...@@ -801,8 +801,8 @@ lnet_cpt_of_nid_locked(lnet_nid_t nid) ...@@ -801,8 +801,8 @@ lnet_cpt_of_nid_locked(lnet_nid_t nid)
int int
lnet_cpt_of_nid(lnet_nid_t nid) lnet_cpt_of_nid(lnet_nid_t nid)
{ {
int cpt; int cpt;
int cpt2; int cpt2;
if (LNET_CPT_NUMBER == 1) if (LNET_CPT_NUMBER == 1)
return 0; /* the only one */ return 0; /* the only one */
...@@ -821,8 +821,8 @@ EXPORT_SYMBOL(lnet_cpt_of_nid); ...@@ -821,8 +821,8 @@ EXPORT_SYMBOL(lnet_cpt_of_nid);
int int
lnet_islocalnet(__u32 net) lnet_islocalnet(__u32 net)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
int cpt; int cpt;
cpt = lnet_net_lock_current(); cpt = lnet_net_lock_current();
...@@ -838,8 +838,8 @@ lnet_islocalnet(__u32 net) ...@@ -838,8 +838,8 @@ lnet_islocalnet(__u32 net)
lnet_ni_t * lnet_ni_t *
lnet_nid2ni_locked(lnet_nid_t nid, int cpt) lnet_nid2ni_locked(lnet_nid_t nid, int cpt)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
struct list_head *tmp; struct list_head *tmp;
LASSERT(cpt != LNET_LOCK_EX); LASSERT(cpt != LNET_LOCK_EX);
...@@ -858,8 +858,8 @@ lnet_nid2ni_locked(lnet_nid_t nid, int cpt) ...@@ -858,8 +858,8 @@ lnet_nid2ni_locked(lnet_nid_t nid, int cpt)
int int
lnet_islocalnid(lnet_nid_t nid) lnet_islocalnid(lnet_nid_t nid)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
int cpt; int cpt;
cpt = lnet_net_lock_current(); cpt = lnet_net_lock_current();
ni = lnet_nid2ni_locked(nid, cpt); ni = lnet_nid2ni_locked(nid, cpt);
...@@ -874,10 +874,10 @@ int ...@@ -874,10 +874,10 @@ int
lnet_count_acceptor_nis(void) lnet_count_acceptor_nis(void)
{ {
/* Return the # of NIs that need the acceptor. */ /* Return the # of NIs that need the acceptor. */
int count = 0; int count = 0;
struct list_head *tmp; struct list_head *tmp;
struct lnet_ni *ni; struct lnet_ni *ni;
int cpt; int cpt;
cpt = lnet_net_lock_current(); cpt = lnet_net_lock_current();
list_for_each(tmp, &the_lnet.ln_nis) { list_for_each(tmp, &the_lnet.ln_nis) {
...@@ -895,7 +895,7 @@ lnet_count_acceptor_nis(void) ...@@ -895,7 +895,7 @@ lnet_count_acceptor_nis(void)
static int static int
lnet_ni_tq_credits(lnet_ni_t *ni) lnet_ni_tq_credits(lnet_ni_t *ni)
{ {
int credits; int credits;
LASSERT(ni->ni_ncpts >= 1); LASSERT(ni->ni_ncpts >= 1);
...@@ -912,9 +912,9 @@ lnet_ni_tq_credits(lnet_ni_t *ni) ...@@ -912,9 +912,9 @@ lnet_ni_tq_credits(lnet_ni_t *ni)
static void static void
lnet_shutdown_lndnis(void) lnet_shutdown_lndnis(void)
{ {
int i; int i;
int islo; int islo;
lnet_ni_t *ni; lnet_ni_t *ni;
/* NB called holding the global mutex */ /* NB called holding the global mutex */
...@@ -968,8 +968,8 @@ lnet_shutdown_lndnis(void) ...@@ -968,8 +968,8 @@ lnet_shutdown_lndnis(void)
* and shut them down in guaranteed thread context */ * and shut them down in guaranteed thread context */
i = 2; i = 2;
while (!list_empty(&the_lnet.ln_nis_zombie)) { while (!list_empty(&the_lnet.ln_nis_zombie)) {
int *ref; int *ref;
int j; int j;
ni = list_entry(the_lnet.ln_nis_zombie.next, ni = list_entry(the_lnet.ln_nis_zombie.next,
lnet_ni_t, ni_list); lnet_ni_t, ni_list);
...@@ -1029,15 +1029,15 @@ lnet_shutdown_lndnis(void) ...@@ -1029,15 +1029,15 @@ lnet_shutdown_lndnis(void)
static int static int
lnet_startup_lndnis(void) lnet_startup_lndnis(void)
{ {
lnd_t *lnd; lnd_t *lnd;
struct lnet_ni *ni; struct lnet_ni *ni;
struct lnet_tx_queue *tq; struct lnet_tx_queue *tq;
struct list_head nilist; struct list_head nilist;
int i; int i;
int rc = 0; int rc = 0;
int lnd_type; int lnd_type;
int nicount = 0; int nicount = 0;
char *nets = lnet_get_networks(); char *nets = lnet_get_networks();
INIT_LIST_HEAD(&nilist); INIT_LIST_HEAD(&nilist);
...@@ -1181,7 +1181,7 @@ lnet_startup_lndnis(void) ...@@ -1181,7 +1181,7 @@ lnet_startup_lndnis(void)
int int
LNetInit(void) LNetInit(void)
{ {
int rc; int rc;
lnet_assert_wire_constants(); lnet_assert_wire_constants();
LASSERT(!the_lnet.ln_init); LASSERT(!the_lnet.ln_init);
...@@ -1277,8 +1277,8 @@ EXPORT_SYMBOL(LNetFini); ...@@ -1277,8 +1277,8 @@ EXPORT_SYMBOL(LNetFini);
int int
LNetNIInit(lnet_pid_t requested_pid) LNetNIInit(lnet_pid_t requested_pid)
{ {
int im_a_router = 0; int im_a_router = 0;
int rc; int rc;
LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex); LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
...@@ -1413,9 +1413,9 @@ int ...@@ -1413,9 +1413,9 @@ int
LNetCtl(unsigned int cmd, void *arg) LNetCtl(unsigned int cmd, void *arg)
{ {
struct libcfs_ioctl_data *data = arg; struct libcfs_ioctl_data *data = arg;
lnet_process_id_t id = {0}; lnet_process_id_t id = {0};
lnet_ni_t *ni; lnet_ni_t *ni;
int rc; int rc;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -1531,10 +1531,10 @@ EXPORT_SYMBOL(LNetCtl); ...@@ -1531,10 +1531,10 @@ EXPORT_SYMBOL(LNetCtl);
int int
LNetGetId(unsigned int index, lnet_process_id_t *id) LNetGetId(unsigned int index, lnet_process_id_t *id)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
struct list_head *tmp; struct list_head *tmp;
int cpt; int cpt;
int rc = -ENOENT; int rc = -ENOENT;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
...@@ -1575,11 +1575,11 @@ EXPORT_SYMBOL(LNetSnprintHandle); ...@@ -1575,11 +1575,11 @@ EXPORT_SYMBOL(LNetSnprintHandle);
static int static int
lnet_create_ping_info(void) lnet_create_ping_info(void)
{ {
int i; int i;
int n; int n;
int rc; int rc;
unsigned int infosz; unsigned int infosz;
lnet_ni_t *ni; lnet_ni_t *ni;
lnet_process_id_t id; lnet_process_id_t id;
lnet_ping_info_t *pinfo; lnet_ping_info_t *pinfo;
...@@ -1633,7 +1633,7 @@ lnet_create_ping_info(void) ...@@ -1633,7 +1633,7 @@ lnet_create_ping_info(void)
static void static void
lnet_destroy_ping_info(void) lnet_destroy_ping_info(void)
{ {
struct lnet_ni *ni; struct lnet_ni *ni;
lnet_net_lock(0); lnet_net_lock(0);
...@@ -1654,12 +1654,12 @@ lnet_destroy_ping_info(void) ...@@ -1654,12 +1654,12 @@ lnet_destroy_ping_info(void)
int int
lnet_ping_target_init(void) lnet_ping_target_init(void)
{ {
lnet_md_t md = { NULL }; lnet_md_t md = { NULL };
lnet_handle_me_t meh; lnet_handle_me_t meh;
lnet_process_id_t id; lnet_process_id_t id;
int rc; int rc;
int rc2; int rc2;
int infosz; int infosz;
rc = lnet_create_ping_info(); rc = lnet_create_ping_info();
if (rc != 0) if (rc != 0)
...@@ -1722,11 +1722,11 @@ lnet_ping_target_init(void) ...@@ -1722,11 +1722,11 @@ lnet_ping_target_init(void)
void void
lnet_ping_target_fini(void) lnet_ping_target_fini(void)
{ {
lnet_event_t event; lnet_event_t event;
int rc; int rc;
int which; int which;
int timeout_ms = 1000; int timeout_ms = 1000;
sigset_t blocked = cfs_block_allsigs(); sigset_t blocked = cfs_block_allsigs();
LNetMDUnlink(the_lnet.ln_ping_target_md); LNetMDUnlink(the_lnet.ln_ping_target_md);
/* NB md could be busy; this just starts the unlink */ /* NB md could be busy; this just starts the unlink */
...@@ -1759,22 +1759,22 @@ lnet_ping_target_fini(void) ...@@ -1759,22 +1759,22 @@ lnet_ping_target_fini(void)
int int
lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_ids) lnet_ping(lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_ids)
{ {
lnet_handle_eq_t eqh; lnet_handle_eq_t eqh;
lnet_handle_md_t mdh; lnet_handle_md_t mdh;
lnet_event_t event; lnet_event_t event;
lnet_md_t md = { NULL }; lnet_md_t md = { NULL };
int which; int which;
int unlinked = 0; int unlinked = 0;
int replied = 0; int replied = 0;
const int a_long_time = 60000; /* mS */ const int a_long_time = 60000; /* mS */
int infosz = offsetof(lnet_ping_info_t, pi_ni[n_ids]); int infosz = offsetof(lnet_ping_info_t, pi_ni[n_ids]);
lnet_ping_info_t *info; lnet_ping_info_t *info;
lnet_process_id_t tmpid; lnet_process_id_t tmpid;
int i; int i;
int nob; int nob;
int rc; int rc;
int rc2; int rc2;
sigset_t blocked; sigset_t blocked;
if (n_ids <= 0 || if (n_ids <= 0 ||
id.nid == LNET_NID_ANY || id.nid == LNET_NID_ANY ||
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
#include "../../include/linux/lnet/lib-lnet.h" #include "../../include/linux/lnet/lib-lnet.h"
struct lnet_text_buf_t { /* tmp struct for parsing routes */ struct lnet_text_buf_t { /* tmp struct for parsing routes */
struct list_head ltb_list; /* stash on lists */ struct list_head ltb_list; /* stash on lists */
int ltb_size; /* allocated size */ int ltb_size; /* allocated size */
char ltb_text[0]; /* text buffer */ char ltb_text[0]; /* text buffer */
}; };
static int lnet_tbnob; /* track text buf allocation */ static int lnet_tbnob; /* track text buf allocation */
...@@ -80,8 +80,8 @@ lnet_issep(char c) ...@@ -80,8 +80,8 @@ lnet_issep(char c)
static int static int
lnet_net_unique(__u32 net, struct list_head *nilist) lnet_net_unique(__u32 net, struct list_head *nilist)
{ {
struct list_head *tmp; struct list_head *tmp;
lnet_ni_t *ni; lnet_ni_t *ni;
list_for_each(tmp, nilist) { list_for_each(tmp, nilist) {
ni = list_entry(tmp, lnet_ni_t, ni_list); ni = list_entry(tmp, lnet_ni_t, ni_list);
...@@ -111,10 +111,10 @@ lnet_ni_free(struct lnet_ni *ni) ...@@ -111,10 +111,10 @@ lnet_ni_free(struct lnet_ni *ni)
static lnet_ni_t * static lnet_ni_t *
lnet_ni_alloc(__u32 net, struct cfs_expr_list *el, struct list_head *nilist) lnet_ni_alloc(__u32 net, struct cfs_expr_list *el, struct list_head *nilist)
{ {
struct lnet_tx_queue *tq; struct lnet_tx_queue *tq;
struct lnet_ni *ni; struct lnet_ni *ni;
int rc; int rc;
int i; int i;
if (!lnet_net_unique(net, nilist)) { if (!lnet_net_unique(net, nilist)) {
LCONSOLE_ERROR_MSG(0x111, "Duplicate network specified: %s\n", LCONSOLE_ERROR_MSG(0x111, "Duplicate network specified: %s\n",
...@@ -178,13 +178,13 @@ int ...@@ -178,13 +178,13 @@ int
lnet_parse_networks(struct list_head *nilist, char *networks) lnet_parse_networks(struct list_head *nilist, char *networks)
{ {
struct cfs_expr_list *el = NULL; struct cfs_expr_list *el = NULL;
int tokensize = strlen(networks) + 1; int tokensize = strlen(networks) + 1;
char *tokens; char *tokens;
char *str; char *str;
char *tmp; char *tmp;
struct lnet_ni *ni; struct lnet_ni *ni;
__u32 net; __u32 net;
int nnets = 0; int nnets = 0;
if (strlen(networks) > LNET_SINGLE_TEXTBUF_NOB) { if (strlen(networks) > LNET_SINGLE_TEXTBUF_NOB) {
/* _WAY_ conservative */ /* _WAY_ conservative */
...@@ -210,12 +210,12 @@ lnet_parse_networks(struct list_head *nilist, char *networks) ...@@ -210,12 +210,12 @@ lnet_parse_networks(struct list_head *nilist, char *networks)
goto failed; goto failed;
while (str != NULL && *str != 0) { while (str != NULL && *str != 0) {
char *comma = strchr(str, ','); char *comma = strchr(str, ',');
char *bracket = strchr(str, '('); char *bracket = strchr(str, '(');
char *square = strchr(str, '['); char *square = strchr(str, '[');
char *iface; char *iface;
int niface; int niface;
int rc; int rc;
/* NB we don't check interface conflicts here; it's the LNDs /* NB we don't check interface conflicts here; it's the LNDs
* responsibility (if it cares at all) */ * responsibility (if it cares at all) */
...@@ -369,7 +369,7 @@ static struct lnet_text_buf_t * ...@@ -369,7 +369,7 @@ static struct lnet_text_buf_t *
lnet_new_text_buf(int str_len) lnet_new_text_buf(int str_len)
{ {
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
int nob; int nob;
/* NB allocate space for the terminating 0 */ /* NB allocate space for the terminating 0 */
nob = offsetof(struct lnet_text_buf_t, ltb_text[str_len + 1]); nob = offsetof(struct lnet_text_buf_t, ltb_text[str_len + 1]);
...@@ -404,7 +404,7 @@ lnet_free_text_buf(struct lnet_text_buf_t *ltb) ...@@ -404,7 +404,7 @@ lnet_free_text_buf(struct lnet_text_buf_t *ltb)
static void static void
lnet_free_text_bufs(struct list_head *tbs) lnet_free_text_bufs(struct list_head *tbs)
{ {
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
while (!list_empty(tbs)) { while (!list_empty(tbs)) {
ltb = list_entry(tbs->next, struct lnet_text_buf_t, ltb_list); ltb = list_entry(tbs->next, struct lnet_text_buf_t, ltb_list);
...@@ -417,11 +417,11 @@ lnet_free_text_bufs(struct list_head *tbs) ...@@ -417,11 +417,11 @@ lnet_free_text_bufs(struct list_head *tbs)
static int static int
lnet_str2tbs_sep(struct list_head *tbs, char *str) lnet_str2tbs_sep(struct list_head *tbs, char *str)
{ {
struct list_head pending; struct list_head pending;
char *sep; char *sep;
int nob; int nob;
int i; int i;
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
INIT_LIST_HEAD(&pending); INIT_LIST_HEAD(&pending);
...@@ -477,8 +477,8 @@ lnet_expand1tb(struct list_head *list, ...@@ -477,8 +477,8 @@ lnet_expand1tb(struct list_head *list,
char *str, char *sep1, char *sep2, char *str, char *sep1, char *sep2,
char *item, int itemlen) char *item, int itemlen)
{ {
int len1 = (int)(sep1 - str); int len1 = (int)(sep1 - str);
int len2 = strlen(sep2 + 1); int len2 = strlen(sep2 + 1);
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
LASSERT(*sep1 == '['); LASSERT(*sep1 == '[');
...@@ -500,18 +500,18 @@ lnet_expand1tb(struct list_head *list, ...@@ -500,18 +500,18 @@ lnet_expand1tb(struct list_head *list,
static int static int
lnet_str2tbs_expand(struct list_head *tbs, char *str) lnet_str2tbs_expand(struct list_head *tbs, char *str)
{ {
char num[16]; char num[16];
struct list_head pending; struct list_head pending;
char *sep; char *sep;
char *sep2; char *sep2;
char *parsed; char *parsed;
char *enditem; char *enditem;
int lo; int lo;
int hi; int hi;
int stride; int stride;
int i; int i;
int nob; int nob;
int scanned; int scanned;
INIT_LIST_HEAD(&pending); INIT_LIST_HEAD(&pending);
...@@ -584,8 +584,8 @@ lnet_str2tbs_expand(struct list_head *tbs, char *str) ...@@ -584,8 +584,8 @@ lnet_str2tbs_expand(struct list_head *tbs, char *str)
static int static int
lnet_parse_hops(char *str, unsigned int *hops) lnet_parse_hops(char *str, unsigned int *hops)
{ {
int len = strlen(str); int len = strlen(str);
int nob = len; int nob = len;
return (sscanf(str, "%u%n", hops, &nob) >= 1 && return (sscanf(str, "%u%n", hops, &nob) >= 1 &&
nob == len && nob == len &&
...@@ -597,9 +597,9 @@ lnet_parse_hops(char *str, unsigned int *hops) ...@@ -597,9 +597,9 @@ lnet_parse_hops(char *str, unsigned int *hops)
static int static int
lnet_parse_priority(char *str, unsigned int *priority, char **token) lnet_parse_priority(char *str, unsigned int *priority, char **token)
{ {
int nob; int nob;
char *sep; char *sep;
int len; int len;
sep = strchr(str, LNET_PRIORITY_SEPARATOR); sep = strchr(str, LNET_PRIORITY_SEPARATOR);
if (sep == NULL) { if (sep == NULL) {
...@@ -628,23 +628,23 @@ static int ...@@ -628,23 +628,23 @@ static int
lnet_parse_route(char *str, int *im_a_router) lnet_parse_route(char *str, int *im_a_router)
{ {
/* static scratch buffer OK (single threaded) */ /* static scratch buffer OK (single threaded) */
static char cmd[LNET_SINGLE_TEXTBUF_NOB]; static char cmd[LNET_SINGLE_TEXTBUF_NOB];
struct list_head nets; struct list_head nets;
struct list_head gateways; struct list_head gateways;
struct list_head *tmp1; struct list_head *tmp1;
struct list_head *tmp2; struct list_head *tmp2;
__u32 net; __u32 net;
lnet_nid_t nid; lnet_nid_t nid;
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
int rc; int rc;
char *sep; char *sep;
char *token = str; char *token = str;
int ntokens = 0; int ntokens = 0;
int myrc = -1; int myrc = -1;
unsigned int hops; unsigned int hops;
int got_hops = 0; int got_hops = 0;
unsigned int priority = 0; unsigned int priority = 0;
INIT_LIST_HEAD(&gateways); INIT_LIST_HEAD(&gateways);
INIT_LIST_HEAD(&nets); INIT_LIST_HEAD(&nets);
...@@ -772,7 +772,7 @@ lnet_parse_route(char *str, int *im_a_router) ...@@ -772,7 +772,7 @@ lnet_parse_route(char *str, int *im_a_router)
static int static int
lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router) lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router)
{ {
struct lnet_text_buf_t *ltb; struct lnet_text_buf_t *ltb;
while (!list_empty(tbs)) { while (!list_empty(tbs)) {
ltb = list_entry(tbs->next, struct lnet_text_buf_t, ltb_list); ltb = list_entry(tbs->next, struct lnet_text_buf_t, ltb_list);
...@@ -792,8 +792,8 @@ lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router) ...@@ -792,8 +792,8 @@ lnet_parse_route_tbs(struct list_head *tbs, int *im_a_router)
int int
lnet_parse_routes(char *routes, int *im_a_router) lnet_parse_routes(char *routes, int *im_a_router)
{ {
struct list_head tbs; struct list_head tbs;
int rc = 0; int rc = 0;
*im_a_router = 0; *im_a_router = 0;
...@@ -814,8 +814,8 @@ static int ...@@ -814,8 +814,8 @@ static int
lnet_match_network_token(char *token, int len, __u32 *ipaddrs, int nip) lnet_match_network_token(char *token, int len, __u32 *ipaddrs, int nip)
{ {
LIST_HEAD(list); LIST_HEAD(list);
int rc; int rc;
int i; int i;
rc = cfs_ip_addr_parse(token, len, &list); rc = cfs_ip_addr_parse(token, len, &list);
if (rc != 0) if (rc != 0)
...@@ -834,13 +834,13 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip) ...@@ -834,13 +834,13 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip)
{ {
static char tokens[LNET_SINGLE_TEXTBUF_NOB]; static char tokens[LNET_SINGLE_TEXTBUF_NOB];
int matched = 0; int matched = 0;
int ntokens = 0; int ntokens = 0;
int len; int len;
char *net = NULL; char *net = NULL;
char *sep; char *sep;
char *token; char *token;
int rc; int rc;
LASSERT(strlen(net_entry) < sizeof(tokens)); LASSERT(strlen(net_entry) < sizeof(tokens));
...@@ -889,8 +889,8 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip) ...@@ -889,8 +889,8 @@ lnet_match_network_tokens(char *net_entry, __u32 *ipaddrs, int nip)
static __u32 static __u32
lnet_netspec2net(char *netspec) lnet_netspec2net(char *netspec)
{ {
char *bracket = strchr(netspec, '('); char *bracket = strchr(netspec, '(');
__u32 net; __u32 net;
if (bracket != NULL) if (bracket != NULL)
*bracket = 0; *bracket = 0;
...@@ -906,15 +906,15 @@ lnet_netspec2net(char *netspec) ...@@ -906,15 +906,15 @@ lnet_netspec2net(char *netspec)
static int static int
lnet_splitnets(char *source, struct list_head *nets) lnet_splitnets(char *source, struct list_head *nets)
{ {
int offset = 0; int offset = 0;
int offset2; int offset2;
int len; int len;
struct lnet_text_buf_t *tb; struct lnet_text_buf_t *tb;
struct lnet_text_buf_t *tb2; struct lnet_text_buf_t *tb2;
struct list_head *t; struct list_head *t;
char *sep; char *sep;
char *bracket; char *bracket;
__u32 net; __u32 net;
LASSERT(!list_empty(nets)); LASSERT(!list_empty(nets));
LASSERT(nets->next == nets->prev); /* single entry */ LASSERT(nets->next == nets->prev); /* single entry */
...@@ -986,22 +986,22 @@ lnet_splitnets(char *source, struct list_head *nets) ...@@ -986,22 +986,22 @@ lnet_splitnets(char *source, struct list_head *nets)
static int static int
lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
{ {
static char networks[LNET_SINGLE_TEXTBUF_NOB]; static char networks[LNET_SINGLE_TEXTBUF_NOB];
static char source[LNET_SINGLE_TEXTBUF_NOB]; static char source[LNET_SINGLE_TEXTBUF_NOB];
struct list_head raw_entries; struct list_head raw_entries;
struct list_head matched_nets; struct list_head matched_nets;
struct list_head current_nets; struct list_head current_nets;
struct list_head *t; struct list_head *t;
struct list_head *t2; struct list_head *t2;
struct lnet_text_buf_t *tb; struct lnet_text_buf_t *tb;
struct lnet_text_buf_t *tb2; struct lnet_text_buf_t *tb2;
__u32 net1; __u32 net1;
__u32 net2; __u32 net2;
int len; int len;
int count; int count;
int dup; int dup;
int rc; int rc;
INIT_LIST_HEAD(&raw_entries); INIT_LIST_HEAD(&raw_entries);
if (lnet_str2tbs_sep(&raw_entries, ip2nets) < 0) { if (lnet_str2tbs_sep(&raw_entries, ip2nets) < 0) {
...@@ -1112,15 +1112,15 @@ lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip) ...@@ -1112,15 +1112,15 @@ lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip)
static int static int
lnet_ipaddr_enumerate(__u32 **ipaddrsp) lnet_ipaddr_enumerate(__u32 **ipaddrsp)
{ {
int up; int up;
__u32 netmask; __u32 netmask;
__u32 *ipaddrs; __u32 *ipaddrs;
__u32 *ipaddrs2; __u32 *ipaddrs2;
int nip; int nip;
char **ifnames; char **ifnames;
int nif = libcfs_ipif_enumerate(&ifnames); int nif = libcfs_ipif_enumerate(&ifnames);
int i; int i;
int rc; int rc;
if (nif <= 0) if (nif <= 0)
return nif; return nif;
...@@ -1178,9 +1178,9 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp) ...@@ -1178,9 +1178,9 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp)
int int
lnet_parse_ip2nets(char **networksp, char *ip2nets) lnet_parse_ip2nets(char **networksp, char *ip2nets)
{ {
__u32 *ipaddrs = NULL; __u32 *ipaddrs = NULL;
int nip = lnet_ipaddr_enumerate(&ipaddrs); int nip = lnet_ipaddr_enumerate(&ipaddrs);
int rc; int rc;
if (nip < 0) { if (nip < 0) {
LCONSOLE_ERROR_MSG(0x117, LCONSOLE_ERROR_MSG(0x117,
...@@ -1215,14 +1215,14 @@ lnet_parse_ip2nets(char **networksp, char *ip2nets) ...@@ -1215,14 +1215,14 @@ lnet_parse_ip2nets(char **networksp, char *ip2nets)
int int
lnet_set_ip_niaddr(lnet_ni_t *ni) lnet_set_ip_niaddr(lnet_ni_t *ni)
{ {
__u32 net = LNET_NIDNET(ni->ni_nid); __u32 net = LNET_NIDNET(ni->ni_nid);
char **names; char **names;
int n; int n;
__u32 ip; __u32 ip;
__u32 netmask; __u32 netmask;
int up; int up;
int i; int i;
int rc; int rc;
/* Convenience for LNDs that use the IP address of a local interface as /* Convenience for LNDs that use the IP address of a local interface as
* the local address part of their NID */ * the local address part of their NID */
......
...@@ -70,7 +70,7 @@ int ...@@ -70,7 +70,7 @@ int
LNetEQAlloc(unsigned int count, lnet_eq_handler_t callback, LNetEQAlloc(unsigned int count, lnet_eq_handler_t callback,
lnet_handle_eq_t *handle) lnet_handle_eq_t *handle)
{ {
lnet_eq_t *eq; lnet_eq_t *eq;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -151,13 +151,13 @@ EXPORT_SYMBOL(LNetEQAlloc); ...@@ -151,13 +151,13 @@ EXPORT_SYMBOL(LNetEQAlloc);
int int
LNetEQFree(lnet_handle_eq_t eqh) LNetEQFree(lnet_handle_eq_t eqh)
{ {
struct lnet_eq *eq; struct lnet_eq *eq;
lnet_event_t *events = NULL; lnet_event_t *events = NULL;
int **refs = NULL; int **refs = NULL;
int *ref; int *ref;
int rc = 0; int rc = 0;
int size = 0; int size = 0;
int i; int i;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -185,9 +185,9 @@ LNetEQFree(lnet_handle_eq_t eqh) ...@@ -185,9 +185,9 @@ LNetEQFree(lnet_handle_eq_t eqh)
} }
/* stash for free after lock dropped */ /* stash for free after lock dropped */
events = eq->eq_events; events = eq->eq_events;
size = eq->eq_size; size = eq->eq_size;
refs = eq->eq_refs; refs = eq->eq_refs;
lnet_res_lh_invalidate(&eq->eq_lh); lnet_res_lh_invalidate(&eq->eq_lh);
list_del(&eq->eq_list); list_del(&eq->eq_list);
...@@ -237,9 +237,9 @@ lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev) ...@@ -237,9 +237,9 @@ lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev)
static int static int
lnet_eq_dequeue_event(lnet_eq_t *eq, lnet_event_t *ev) lnet_eq_dequeue_event(lnet_eq_t *eq, lnet_event_t *ev)
{ {
int new_index = eq->eq_deq_seq & (eq->eq_size - 1); int new_index = eq->eq_deq_seq & (eq->eq_size - 1);
lnet_event_t *new_event = &eq->eq_events[new_index]; lnet_event_t *new_event = &eq->eq_events[new_index];
int rc; int rc;
/* must called with lnet_eq_wait_lock hold */ /* must called with lnet_eq_wait_lock hold */
if (LNET_SEQ_GT(eq->eq_deq_seq, new_event->sequence)) if (LNET_SEQ_GT(eq->eq_deq_seq, new_event->sequence))
...@@ -323,10 +323,10 @@ static int ...@@ -323,10 +323,10 @@ static int
lnet_eq_wait_locked(int *timeout_ms) lnet_eq_wait_locked(int *timeout_ms)
__must_hold(&the_lnet.ln_eq_wait_lock) __must_hold(&the_lnet.ln_eq_wait_lock)
{ {
int tms = *timeout_ms; int tms = *timeout_ms;
int wait; int wait;
wait_queue_t wl; wait_queue_t wl;
unsigned long now; unsigned long now;
if (tms == 0) if (tms == 0)
return -1; /* don't want to wait and no new event */ return -1; /* don't want to wait and no new event */
...@@ -392,9 +392,9 @@ int ...@@ -392,9 +392,9 @@ int
LNetEQPoll(lnet_handle_eq_t *eventqs, int neq, int timeout_ms, LNetEQPoll(lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
lnet_event_t *event, int *which) lnet_event_t *event, int *which)
{ {
int wait = 1; int wait = 1;
int rc; int rc;
int i; int i;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
......
...@@ -74,7 +74,7 @@ lnet_md_unlink(lnet_libmd_t *md) ...@@ -74,7 +74,7 @@ lnet_md_unlink(lnet_libmd_t *md)
CDEBUG(D_NET, "Unlinking md %p\n", md); CDEBUG(D_NET, "Unlinking md %p\n", md);
if (md->md_eq != NULL) { if (md->md_eq != NULL) {
int cpt = lnet_cpt_of_cookie(md->md_lh.lh_cookie); int cpt = lnet_cpt_of_cookie(md->md_lh.lh_cookie);
LASSERT(*md->md_eq->eq_refs[cpt] > 0); LASSERT(*md->md_eq->eq_refs[cpt] > 0);
(*md->md_eq->eq_refs[cpt])--; (*md->md_eq->eq_refs[cpt])--;
...@@ -88,9 +88,9 @@ lnet_md_unlink(lnet_libmd_t *md) ...@@ -88,9 +88,9 @@ lnet_md_unlink(lnet_libmd_t *md)
static int static int
lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink) lnet_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
{ {
int i; int i;
unsigned int niov; unsigned int niov;
int total_length = 0; int total_length = 0;
lmd->md_me = NULL; lmd->md_me = NULL;
lmd->md_start = umd->start; lmd->md_start = umd->start;
...@@ -268,10 +268,10 @@ LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd, ...@@ -268,10 +268,10 @@ LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd,
{ {
LIST_HEAD(matches); LIST_HEAD(matches);
LIST_HEAD(drops); LIST_HEAD(drops);
struct lnet_me *me; struct lnet_me *me;
struct lnet_libmd *md; struct lnet_libmd *md;
int cpt; int cpt;
int rc; int rc;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -346,9 +346,9 @@ EXPORT_SYMBOL(LNetMDAttach); ...@@ -346,9 +346,9 @@ EXPORT_SYMBOL(LNetMDAttach);
int int
LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink, lnet_handle_md_t *handle) LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink, lnet_handle_md_t *handle)
{ {
lnet_libmd_t *md; lnet_libmd_t *md;
int cpt; int cpt;
int rc; int rc;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -421,9 +421,9 @@ EXPORT_SYMBOL(LNetMDBind); ...@@ -421,9 +421,9 @@ EXPORT_SYMBOL(LNetMDBind);
int int
LNetMDUnlink(lnet_handle_md_t mdh) LNetMDUnlink(lnet_handle_md_t mdh)
{ {
lnet_event_t ev; lnet_event_t ev;
lnet_libmd_t *md; lnet_libmd_t *md;
int cpt; int cpt;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
......
...@@ -80,8 +80,8 @@ LNetMEAttach(unsigned int portal, ...@@ -80,8 +80,8 @@ LNetMEAttach(unsigned int portal,
lnet_handle_me_t *handle) lnet_handle_me_t *handle)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct lnet_me *me; struct lnet_me *me;
struct list_head *head; struct list_head *head;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -151,10 +151,10 @@ LNetMEInsert(lnet_handle_me_t current_meh, ...@@ -151,10 +151,10 @@ LNetMEInsert(lnet_handle_me_t current_meh,
lnet_unlink_t unlink, lnet_ins_pos_t pos, lnet_unlink_t unlink, lnet_ins_pos_t pos,
lnet_handle_me_t *handle) lnet_handle_me_t *handle)
{ {
struct lnet_me *current_me; struct lnet_me *current_me;
struct lnet_me *new_me; struct lnet_me *new_me;
struct lnet_portal *ptl; struct lnet_portal *ptl;
int cpt; int cpt;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
...@@ -228,10 +228,10 @@ EXPORT_SYMBOL(LNetMEInsert); ...@@ -228,10 +228,10 @@ EXPORT_SYMBOL(LNetMEInsert);
int int
LNetMEUnlink(lnet_handle_me_t meh) LNetMEUnlink(lnet_handle_me_t meh)
{ {
lnet_me_t *me; lnet_me_t *me;
lnet_libmd_t *md; lnet_libmd_t *md;
lnet_event_t ev; lnet_event_t ev;
int cpt; int cpt;
LASSERT(the_lnet.ln_init); LASSERT(the_lnet.ln_init);
LASSERT(the_lnet.ln_refcount > 0); LASSERT(the_lnet.ln_refcount > 0);
......
This diff is collapsed.
...@@ -60,8 +60,8 @@ lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev) ...@@ -60,8 +60,8 @@ lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev)
void void
lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type) lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type)
{ {
lnet_hdr_t *hdr = &msg->msg_hdr; lnet_hdr_t *hdr = &msg->msg_hdr;
lnet_event_t *ev = &msg->msg_ev; lnet_event_t *ev = &msg->msg_ev;
LASSERT(!msg->msg_routing); LASSERT(!msg->msg_routing);
...@@ -73,7 +73,7 @@ lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type) ...@@ -73,7 +73,7 @@ lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type)
ev->target.pid = le32_to_cpu(hdr->dest_pid); ev->target.pid = le32_to_cpu(hdr->dest_pid);
ev->initiator.nid = LNET_NID_ANY; ev->initiator.nid = LNET_NID_ANY;
ev->initiator.pid = the_lnet.ln_pid; ev->initiator.pid = the_lnet.ln_pid;
ev->sender = LNET_NID_ANY; ev->sender = LNET_NID_ANY;
} else { } else {
/* event for passive message */ /* event for passive message */
...@@ -82,9 +82,9 @@ lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type) ...@@ -82,9 +82,9 @@ lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type)
ev->initiator.pid = hdr->src_pid; ev->initiator.pid = hdr->src_pid;
ev->initiator.nid = hdr->src_nid; ev->initiator.nid = hdr->src_nid;
ev->rlength = hdr->payload_length; ev->rlength = hdr->payload_length;
ev->sender = msg->msg_from; ev->sender = msg->msg_from;
ev->mlength = msg->msg_wanted; ev->mlength = msg->msg_wanted;
ev->offset = msg->msg_offset; ev->offset = msg->msg_offset;
} }
switch (ev_type) { switch (ev_type) {
...@@ -137,7 +137,7 @@ void ...@@ -137,7 +137,7 @@ void
lnet_msg_commit(lnet_msg_t *msg, int cpt) lnet_msg_commit(lnet_msg_t *msg, int cpt)
{ {
struct lnet_msg_container *container = the_lnet.ln_msg_containers[cpt]; struct lnet_msg_container *container = the_lnet.ln_msg_containers[cpt];
lnet_counters_t *counters = the_lnet.ln_counters[cpt]; lnet_counters_t *counters = the_lnet.ln_counters[cpt];
/* routed message can be committed for both receiving and sending */ /* routed message can be committed for both receiving and sending */
LASSERT(!msg->msg_tx_committed); LASSERT(!msg->msg_tx_committed);
...@@ -170,7 +170,7 @@ static void ...@@ -170,7 +170,7 @@ static void
lnet_msg_decommit_tx(lnet_msg_t *msg, int status) lnet_msg_decommit_tx(lnet_msg_t *msg, int status)
{ {
lnet_counters_t *counters; lnet_counters_t *counters;
lnet_event_t *ev = &msg->msg_ev; lnet_event_t *ev = &msg->msg_ev;
LASSERT(msg->msg_tx_committed); LASSERT(msg->msg_tx_committed);
if (status != 0) if (status != 0)
...@@ -219,8 +219,8 @@ lnet_msg_decommit_tx(lnet_msg_t *msg, int status) ...@@ -219,8 +219,8 @@ lnet_msg_decommit_tx(lnet_msg_t *msg, int status)
static void static void
lnet_msg_decommit_rx(lnet_msg_t *msg, int status) lnet_msg_decommit_rx(lnet_msg_t *msg, int status)
{ {
lnet_counters_t *counters; lnet_counters_t *counters;
lnet_event_t *ev = &msg->msg_ev; lnet_event_t *ev = &msg->msg_ev;
LASSERT(!msg->msg_tx_committed); /* decommitted or never committed */ LASSERT(!msg->msg_tx_committed); /* decommitted or never committed */
LASSERT(msg->msg_rx_committed); LASSERT(msg->msg_rx_committed);
...@@ -273,7 +273,7 @@ lnet_msg_decommit_rx(lnet_msg_t *msg, int status) ...@@ -273,7 +273,7 @@ lnet_msg_decommit_rx(lnet_msg_t *msg, int status)
void void
lnet_msg_decommit(lnet_msg_t *msg, int cpt, int status) lnet_msg_decommit(lnet_msg_t *msg, int cpt, int status)
{ {
int cpt2 = cpt; int cpt2 = cpt;
LASSERT(msg->msg_tx_committed || msg->msg_rx_committed); LASSERT(msg->msg_tx_committed || msg->msg_rx_committed);
LASSERT(msg->msg_onactivelist); LASSERT(msg->msg_onactivelist);
...@@ -335,8 +335,8 @@ lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md, ...@@ -335,8 +335,8 @@ lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md,
void void
lnet_msg_detach_md(lnet_msg_t *msg, int status) lnet_msg_detach_md(lnet_msg_t *msg, int status)
{ {
lnet_libmd_t *md = msg->msg_md; lnet_libmd_t *md = msg->msg_md;
int unlink; int unlink;
/* Now it's safe to drop my caller's ref */ /* Now it's safe to drop my caller's ref */
md->md_refcount--; md->md_refcount--;
...@@ -359,8 +359,8 @@ static int ...@@ -359,8 +359,8 @@ static int
lnet_complete_msg_locked(lnet_msg_t *msg, int cpt) lnet_complete_msg_locked(lnet_msg_t *msg, int cpt)
{ {
lnet_handle_wire_t ack_wmd; lnet_handle_wire_t ack_wmd;
int rc; int rc;
int status = msg->msg_ev.status; int status = msg->msg_ev.status;
LASSERT(msg->msg_onactivelist); LASSERT(msg->msg_onactivelist);
...@@ -434,11 +434,11 @@ lnet_complete_msg_locked(lnet_msg_t *msg, int cpt) ...@@ -434,11 +434,11 @@ lnet_complete_msg_locked(lnet_msg_t *msg, int cpt)
void void
lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int status) lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int status)
{ {
struct lnet_msg_container *container; struct lnet_msg_container *container;
int my_slot; int my_slot;
int cpt; int cpt;
int rc; int rc;
int i; int i;
LASSERT(!in_interrupt()); LASSERT(!in_interrupt());
...@@ -534,7 +534,7 @@ EXPORT_SYMBOL(lnet_finalize); ...@@ -534,7 +534,7 @@ EXPORT_SYMBOL(lnet_finalize);
void void
lnet_msg_container_cleanup(struct lnet_msg_container *container) lnet_msg_container_cleanup(struct lnet_msg_container *container)
{ {
int count = 0; int count = 0;
if (container->msc_init == 0) if (container->msc_init == 0)
return; return;
...@@ -568,7 +568,7 @@ lnet_msg_container_cleanup(struct lnet_msg_container *container) ...@@ -568,7 +568,7 @@ lnet_msg_container_cleanup(struct lnet_msg_container *container)
int int
lnet_msg_container_setup(struct lnet_msg_container *container, int cpt) lnet_msg_container_setup(struct lnet_msg_container *container, int cpt)
{ {
int rc; int rc;
container->msc_init = 1; container->msc_init = 1;
...@@ -608,7 +608,7 @@ void ...@@ -608,7 +608,7 @@ void
lnet_msg_containers_destroy(void) lnet_msg_containers_destroy(void)
{ {
struct lnet_msg_container *container; struct lnet_msg_container *container;
int i; int i;
if (the_lnet.ln_msg_containers == NULL) if (the_lnet.ln_msg_containers == NULL)
return; return;
...@@ -624,8 +624,8 @@ int ...@@ -624,8 +624,8 @@ int
lnet_msg_containers_create(void) lnet_msg_containers_create(void)
{ {
struct lnet_msg_container *container; struct lnet_msg_container *container;
int rc; int rc;
int i; int i;
the_lnet.ln_msg_containers = cfs_percpt_alloc(lnet_cpt_table(), the_lnet.ln_msg_containers = cfs_percpt_alloc(lnet_cpt_table(),
sizeof(*container)); sizeof(*container));
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "../../include/linux/lnet/lib-lnet.h" #include "../../include/linux/lnet/lib-lnet.h"
/* NB: add /proc interfaces in upcoming patches */ /* NB: add /proc interfaces in upcoming patches */
int portal_rotor = LNET_PTL_ROTOR_HASH_RT; int portal_rotor = LNET_PTL_ROTOR_HASH_RT;
module_param(portal_rotor, int, 0644); 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");
...@@ -47,8 +47,8 @@ static int ...@@ -47,8 +47,8 @@ static int
lnet_ptl_match_type(unsigned int index, lnet_process_id_t match_id, lnet_ptl_match_type(unsigned int index, lnet_process_id_t 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];
int unique; int unique;
unique = ignore_bits == 0 && unique = ignore_bits == 0 &&
match_id.nid != LNET_NID_ANY && match_id.nid != LNET_NID_ANY &&
...@@ -89,7 +89,7 @@ static void ...@@ -89,7 +89,7 @@ static void
lnet_ptl_enable_mt(struct lnet_portal *ptl, int cpt) lnet_ptl_enable_mt(struct lnet_portal *ptl, int cpt)
{ {
struct lnet_match_table *mtable = ptl->ptl_mtables[cpt]; struct lnet_match_table *mtable = ptl->ptl_mtables[cpt];
int i; int i;
/* with hold of both lnet_res_lock(cpt) and lnet_ptl_lock */ /* with hold of both lnet_res_lock(cpt) and lnet_ptl_lock */
LASSERT(lnet_ptl_is_wildcard(ptl)); LASSERT(lnet_ptl_is_wildcard(ptl));
...@@ -114,7 +114,7 @@ static void ...@@ -114,7 +114,7 @@ static void
lnet_ptl_disable_mt(struct lnet_portal *ptl, int cpt) lnet_ptl_disable_mt(struct lnet_portal *ptl, int cpt)
{ {
struct lnet_match_table *mtable = ptl->ptl_mtables[cpt]; struct lnet_match_table *mtable = ptl->ptl_mtables[cpt];
int i; int i;
/* with hold of both lnet_res_lock(cpt) and lnet_ptl_lock */ /* with hold of both lnet_res_lock(cpt) and lnet_ptl_lock */
LASSERT(lnet_ptl_is_wildcard(ptl)); LASSERT(lnet_ptl_is_wildcard(ptl));
...@@ -141,9 +141,9 @@ lnet_try_match_md(lnet_libmd_t *md, ...@@ -141,9 +141,9 @@ lnet_try_match_md(lnet_libmd_t *md,
{ {
/* ALWAYS called holding the lnet_res_lock, and can't lnet_res_unlock; /* ALWAYS called holding the lnet_res_lock, and can't lnet_res_unlock;
* lnet_match_blocked_msg() relies on this to avoid races */ * lnet_match_blocked_msg() relies on this to avoid races */
unsigned int offset; unsigned int offset;
unsigned int mlength; unsigned int mlength;
lnet_me_t *me = md->md_me; lnet_me_t *me = md->md_me;
/* MD exhausted */ /* MD exhausted */
if (lnet_md_exhausted(md)) if (lnet_md_exhausted(md))
...@@ -227,7 +227,7 @@ struct lnet_match_table * ...@@ -227,7 +227,7 @@ struct lnet_match_table *
lnet_mt_of_attach(unsigned int index, lnet_process_id_t id, lnet_mt_of_attach(unsigned int index, lnet_process_id_t 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;
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
/* NB: called w/o lock */ /* NB: called w/o lock */
...@@ -261,11 +261,11 @@ static struct lnet_match_table * ...@@ -261,11 +261,11 @@ static struct lnet_match_table *
lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg) lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct lnet_portal *ptl; struct lnet_portal *ptl;
unsigned int nmaps; unsigned int nmaps;
unsigned int rotor; unsigned int rotor;
unsigned int cpt; unsigned int cpt;
bool routed; bool routed;
/* NB: called w/o lock */ /* NB: called w/o lock */
LASSERT(info->mi_portal < the_lnet.ln_nportals); LASSERT(info->mi_portal < the_lnet.ln_nportals);
...@@ -312,8 +312,8 @@ lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg) ...@@ -312,8 +312,8 @@ lnet_mt_of_match(struct lnet_match_info *info, struct lnet_msg *msg)
static int static int
lnet_mt_test_exhausted(struct lnet_match_table *mtable, int pos) lnet_mt_test_exhausted(struct lnet_match_table *mtable, int pos)
{ {
__u64 *bmap; __u64 *bmap;
int i; int i;
if (!lnet_ptl_is_wildcard(the_lnet.ln_portals[mtable->mt_portal])) if (!lnet_ptl_is_wildcard(the_lnet.ln_portals[mtable->mt_portal]))
return 0; return 0;
...@@ -337,7 +337,7 @@ lnet_mt_test_exhausted(struct lnet_match_table *mtable, int pos) ...@@ -337,7 +337,7 @@ lnet_mt_test_exhausted(struct lnet_match_table *mtable, int pos)
static void static void
lnet_mt_set_exhausted(struct lnet_match_table *mtable, int pos, int exhausted) lnet_mt_set_exhausted(struct lnet_match_table *mtable, int pos, int exhausted)
{ {
__u64 *bmap; __u64 *bmap;
LASSERT(lnet_ptl_is_wildcard(the_lnet.ln_portals[mtable->mt_portal])); LASSERT(lnet_ptl_is_wildcard(the_lnet.ln_portals[mtable->mt_portal]));
LASSERT(pos <= LNET_MT_HASH_IGNORE); LASSERT(pos <= LNET_MT_HASH_IGNORE);
...@@ -373,11 +373,11 @@ int ...@@ -373,11 +373,11 @@ int
lnet_mt_match_md(struct lnet_match_table *mtable, 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)
{ {
struct list_head *head; struct list_head *head;
lnet_me_t *me; lnet_me_t *me;
lnet_me_t *tmp; lnet_me_t *tmp;
int exhausted = 0; int exhausted = 0;
int rc; int rc;
/* any ME with ignore bits? */ /* any ME with ignore bits? */
if (!list_empty(&mtable->mt_mhash[LNET_MT_HASH_IGNORE])) if (!list_empty(&mtable->mt_mhash[LNET_MT_HASH_IGNORE]))
...@@ -428,7 +428,7 @@ lnet_mt_match_md(struct lnet_match_table *mtable, ...@@ -428,7 +428,7 @@ lnet_mt_match_md(struct lnet_match_table *mtable,
static int static int
lnet_ptl_match_early(struct lnet_portal *ptl, struct lnet_msg *msg) lnet_ptl_match_early(struct lnet_portal *ptl, struct lnet_msg *msg)
{ {
int rc; int rc;
/* message arrived before any buffer posting on this portal, /* message arrived before any buffer posting on this portal,
* simply delay or drop this message */ * simply delay or drop this message */
...@@ -461,9 +461,9 @@ static int ...@@ -461,9 +461,9 @@ static int
lnet_ptl_match_delay(struct lnet_portal *ptl, lnet_ptl_match_delay(struct lnet_portal *ptl,
struct lnet_match_info *info, struct lnet_msg *msg) struct lnet_match_info *info, struct lnet_msg *msg)
{ {
int first = ptl->ptl_mt_maps[0]; /* read w/o lock */ int first = ptl->ptl_mt_maps[0]; /* read w/o lock */
int rc = 0; int rc = 0;
int i; int i;
/* steal buffer from other CPTs, and delay it if nothing to steal, /* steal buffer from other CPTs, and delay it if nothing to steal,
* this function is more expensive than a regular match, but we * this function is more expensive than a regular match, but we
...@@ -472,7 +472,7 @@ lnet_ptl_match_delay(struct lnet_portal *ptl, ...@@ -472,7 +472,7 @@ lnet_ptl_match_delay(struct lnet_portal *ptl,
for (i = 0; i < LNET_CPT_NUMBER; i++) { for (i = 0; i < LNET_CPT_NUMBER; i++) {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
int cpt; int cpt;
cpt = (first + i) % LNET_CPT_NUMBER; cpt = (first + i) % LNET_CPT_NUMBER;
mtable = ptl->ptl_mtables[cpt]; mtable = ptl->ptl_mtables[cpt];
...@@ -536,8 +536,8 @@ int ...@@ -536,8 +536,8 @@ int
lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg) lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct lnet_portal *ptl; struct lnet_portal *ptl;
int rc; int rc;
CDEBUG(D_NET, "Request from %s of length %d into portal %d MB=%#llx\n", CDEBUG(D_NET, "Request from %s of length %d into portal %d MB=%#llx\n",
libcfs_id2str(info->mi_id), info->mi_rlength, info->mi_portal, libcfs_id2str(info->mi_id), info->mi_rlength, info->mi_portal,
...@@ -622,13 +622,13 @@ void ...@@ -622,13 +622,13 @@ void
lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md, lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
struct list_head *matches, struct list_head *drops) struct list_head *matches, struct list_head *drops)
{ {
struct lnet_portal *ptl = the_lnet.ln_portals[me->me_portal]; struct lnet_portal *ptl = the_lnet.ln_portals[me->me_portal];
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct list_head *head; struct list_head *head;
lnet_msg_t *tmp; lnet_msg_t *tmp;
lnet_msg_t *msg; lnet_msg_t *msg;
int exhausted = 0; int exhausted = 0;
int cpt; int cpt;
LASSERT(md->md_refcount == 0); /* a brand new MD */ LASSERT(md->md_refcount == 0); /* a brand new MD */
...@@ -647,20 +647,20 @@ lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md, ...@@ -647,20 +647,20 @@ lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
head = &ptl->ptl_msg_stealing; head = &ptl->ptl_msg_stealing;
again: again:
list_for_each_entry_safe(msg, tmp, head, msg_list) { list_for_each_entry_safe(msg, tmp, head, msg_list) {
struct lnet_match_info info; struct lnet_match_info info;
lnet_hdr_t *hdr; lnet_hdr_t *hdr;
int rc; int rc;
LASSERT(msg->msg_rx_delayed || head == &ptl->ptl_msg_stealing); LASSERT(msg->msg_rx_delayed || head == &ptl->ptl_msg_stealing);
hdr = &msg->msg_hdr; hdr = &msg->msg_hdr;
info.mi_id.nid = hdr->src_nid; info.mi_id.nid = hdr->src_nid;
info.mi_id.pid = hdr->src_pid; info.mi_id.pid = hdr->src_pid;
info.mi_opc = LNET_MD_OP_PUT; info.mi_opc = LNET_MD_OP_PUT;
info.mi_portal = hdr->msg.put.ptl_index; info.mi_portal = hdr->msg.put.ptl_index;
info.mi_rlength = hdr->payload_length; info.mi_rlength = hdr->payload_length;
info.mi_roffset = hdr->msg.put.offset; info.mi_roffset = hdr->msg.put.offset;
info.mi_mbits = hdr->msg.put.match_bits; info.mi_mbits = hdr->msg.put.match_bits;
rc = lnet_try_match_md(md, &info, msg); rc = lnet_try_match_md(md, &info, msg);
...@@ -715,7 +715,7 @@ static void ...@@ -715,7 +715,7 @@ static void
lnet_ptl_cleanup(struct lnet_portal *ptl) lnet_ptl_cleanup(struct lnet_portal *ptl)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
int i; int i;
if (ptl->ptl_mtables == NULL) /* uninitialized portal */ if (ptl->ptl_mtables == NULL) /* uninitialized portal */
return; return;
...@@ -723,9 +723,9 @@ lnet_ptl_cleanup(struct lnet_portal *ptl) ...@@ -723,9 +723,9 @@ lnet_ptl_cleanup(struct lnet_portal *ptl)
LASSERT(list_empty(&ptl->ptl_msg_delayed)); LASSERT(list_empty(&ptl->ptl_msg_delayed));
LASSERT(list_empty(&ptl->ptl_msg_stealing)); LASSERT(list_empty(&ptl->ptl_msg_stealing));
cfs_percpt_for_each(mtable, i, ptl->ptl_mtables) { cfs_percpt_for_each(mtable, i, ptl->ptl_mtables) {
struct list_head *mhash; struct list_head *mhash;
lnet_me_t *me; lnet_me_t *me;
int j; int j;
if (mtable->mt_mhash == NULL) /* uninitialized match-table */ if (mtable->mt_mhash == NULL) /* uninitialized match-table */
continue; continue;
...@@ -753,9 +753,9 @@ static int ...@@ -753,9 +753,9 @@ static int
lnet_ptl_setup(struct lnet_portal *ptl, int index) lnet_ptl_setup(struct lnet_portal *ptl, int index)
{ {
struct lnet_match_table *mtable; struct lnet_match_table *mtable;
struct list_head *mhash; struct list_head *mhash;
int i; int i;
int j; int j;
ptl->ptl_mtables = cfs_percpt_alloc(lnet_cpt_table(), ptl->ptl_mtables = cfs_percpt_alloc(lnet_cpt_table(),
sizeof(struct lnet_match_table)); sizeof(struct lnet_match_table));
...@@ -798,7 +798,7 @@ lnet_ptl_setup(struct lnet_portal *ptl, int index) ...@@ -798,7 +798,7 @@ lnet_ptl_setup(struct lnet_portal *ptl, int index)
void void
lnet_portals_destroy(void) lnet_portals_destroy(void)
{ {
int i; int i;
if (the_lnet.ln_portals == NULL) if (the_lnet.ln_portals == NULL)
return; return;
...@@ -813,8 +813,8 @@ lnet_portals_destroy(void) ...@@ -813,8 +813,8 @@ lnet_portals_destroy(void)
int int
lnet_portals_create(void) lnet_portals_create(void)
{ {
int size; int size;
int i; int i;
size = offsetof(struct lnet_portal, ptl_mt_maps[LNET_CPT_NUMBER]); size = offsetof(struct lnet_portal, ptl_mt_maps[LNET_CPT_NUMBER]);
...@@ -898,8 +898,8 @@ EXPORT_SYMBOL(LNetSetLazyPortal); ...@@ -898,8 +898,8 @@ EXPORT_SYMBOL(LNetSetLazyPortal);
int int
LNetClearLazyPortal(int portal) LNetClearLazyPortal(int portal)
{ {
struct lnet_portal *ptl; struct lnet_portal *ptl;
LIST_HEAD (zombies); LIST_HEAD(zombies);
if (portal < 0 || portal >= the_lnet.ln_nportals) if (portal < 0 || portal >= the_lnet.ln_nportals)
return -EINVAL; return -EINVAL;
......
...@@ -111,7 +111,7 @@ lnd_t the_lolnd = { ...@@ -111,7 +111,7 @@ lnd_t the_lolnd = {
/* .lnd_type = */ LOLND, /* .lnd_type = */ LOLND,
/* .lnd_startup = */ lolnd_startup, /* .lnd_startup = */ lolnd_startup,
/* .lnd_shutdown = */ lolnd_shutdown, /* .lnd_shutdown = */ lolnd_shutdown,
/* .lnt_ctl = */ NULL, /* .lnt_ctl = */ NULL,
/* .lnd_send = */ lolnd_send, /* .lnd_send = */ lolnd_send,
/* .lnd_recv = */ lolnd_recv, /* .lnd_recv = */ lolnd_recv,
/* .lnd_eager_recv = */ NULL, /* .lnd_eager_recv = */ NULL,
......
...@@ -47,7 +47,7 @@ static int ...@@ -47,7 +47,7 @@ static int
lnet_configure(void *arg) lnet_configure(void *arg)
{ {
/* 'arg' only there so I can be passed to cfs_create_thread() */ /* 'arg' only there so I can be passed to cfs_create_thread() */
int rc = 0; int rc = 0;
LNET_MUTEX_LOCK(&lnet_config_mutex); LNET_MUTEX_LOCK(&lnet_config_mutex);
...@@ -66,7 +66,7 @@ lnet_configure(void *arg) ...@@ -66,7 +66,7 @@ lnet_configure(void *arg)
static int static int
lnet_unconfigure(void) lnet_unconfigure(void)
{ {
int refcount; int refcount;
LNET_MUTEX_LOCK(&lnet_config_mutex); LNET_MUTEX_LOCK(&lnet_config_mutex);
...@@ -86,7 +86,7 @@ lnet_unconfigure(void) ...@@ -86,7 +86,7 @@ lnet_unconfigure(void)
static int static int
lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data) lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
{ {
int rc; int rc;
switch (cmd) { switch (cmd) {
case IOC_LIBCFS_CONFIGURE: case IOC_LIBCFS_CONFIGURE:
...@@ -113,7 +113,7 @@ static DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl); ...@@ -113,7 +113,7 @@ static DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl);
static int __init static int __init
init_lnet(void) init_lnet(void)
{ {
int rc; int rc;
mutex_init(&lnet_config_mutex); mutex_init(&lnet_config_mutex);
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
int int
lnet_peer_tables_create(void) lnet_peer_tables_create(void)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
struct list_head *hash; struct list_head *hash;
int i; int i;
int j; int j;
the_lnet.ln_peer_tables = cfs_percpt_alloc(lnet_cpt_table(), the_lnet.ln_peer_tables = cfs_percpt_alloc(lnet_cpt_table(),
sizeof(*ptable)); sizeof(*ptable));
...@@ -77,10 +77,10 @@ lnet_peer_tables_create(void) ...@@ -77,10 +77,10 @@ lnet_peer_tables_create(void)
void void
lnet_peer_tables_destroy(void) lnet_peer_tables_destroy(void)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
struct list_head *hash; struct list_head *hash;
int i; int i;
int j; int j;
if (the_lnet.ln_peer_tables == NULL) if (the_lnet.ln_peer_tables == NULL)
return; return;
...@@ -106,9 +106,9 @@ lnet_peer_tables_destroy(void) ...@@ -106,9 +106,9 @@ lnet_peer_tables_destroy(void)
void void
lnet_peer_tables_cleanup(void) lnet_peer_tables_cleanup(void)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
int i; int i;
int j; int j;
LASSERT(the_lnet.ln_shutdown); /* i.e. no new peers */ LASSERT(the_lnet.ln_shutdown); /* i.e. no new peers */
...@@ -133,7 +133,7 @@ lnet_peer_tables_cleanup(void) ...@@ -133,7 +133,7 @@ lnet_peer_tables_cleanup(void)
cfs_percpt_for_each(ptable, i, the_lnet.ln_peer_tables) { cfs_percpt_for_each(ptable, i, the_lnet.ln_peer_tables) {
LIST_HEAD(deathrow); LIST_HEAD(deathrow);
lnet_peer_t *lp; lnet_peer_t *lp;
lnet_net_lock(i); lnet_net_lock(i);
...@@ -186,8 +186,8 @@ lnet_destroy_peer_locked(lnet_peer_t *lp) ...@@ -186,8 +186,8 @@ lnet_destroy_peer_locked(lnet_peer_t *lp)
lnet_peer_t * lnet_peer_t *
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; lnet_peer_t *lp;
LASSERT(!the_lnet.ln_shutdown); LASSERT(!the_lnet.ln_shutdown);
...@@ -205,11 +205,11 @@ lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid) ...@@ -205,11 +205,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(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
{ {
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
lnet_peer_t *lp = NULL; lnet_peer_t *lp = NULL;
lnet_peer_t *lp2; lnet_peer_t *lp2;
int cpt2; int cpt2;
int rc = 0; int rc = 0;
*lpp = NULL; *lpp = NULL;
if (the_lnet.ln_shutdown) /* it's shutting down */ if (the_lnet.ln_shutdown) /* it's shutting down */
...@@ -287,8 +287,8 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt) ...@@ -287,8 +287,8 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
goto out; goto out;
} }
lp->lp_txcredits = lp->lp_txcredits =
lp->lp_mintxcredits = lp->lp_ni->ni_peertxcredits; lp->lp_mintxcredits = lp->lp_ni->ni_peertxcredits;
lp->lp_rtrcredits = lp->lp_rtrcredits =
lp->lp_minrtrcredits = lnet_peer_buffer_credits(lp->lp_ni); lp->lp_minrtrcredits = lnet_peer_buffer_credits(lp->lp_ni);
...@@ -308,10 +308,10 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt) ...@@ -308,10 +308,10 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
void 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; lnet_peer_t *lp;
int rc; int rc;
int cpt; int cpt;
cpt = lnet_cpt_of_nid(nid); cpt = lnet_cpt_of_nid(nid);
lnet_net_lock(cpt); lnet_net_lock(cpt);
......
This diff is collapsed.
...@@ -112,11 +112,11 @@ static int proc_call_handler(void *data, int write, loff_t *ppos, ...@@ -112,11 +112,11 @@ static int proc_call_handler(void *data, int write, loff_t *ppos,
static int __proc_lnet_stats(void *data, int write, static int __proc_lnet_stats(void *data, int write,
loff_t pos, void __user *buffer, int nob) loff_t pos, void __user *buffer, int nob)
{ {
int rc; int rc;
lnet_counters_t *ctrs; lnet_counters_t *ctrs;
int len; int len;
char *tmpstr; char *tmpstr;
const int tmpsiz = 256; /* 7 %u and 4 %llu */ const int tmpsiz = 256; /* 7 %u and 4 %llu */
if (write) { if (write) {
lnet_counters_reset(); lnet_counters_reset();
...@@ -167,13 +167,13 @@ static int proc_lnet_stats(struct ctl_table *table, int write, ...@@ -167,13 +167,13 @@ static int proc_lnet_stats(struct ctl_table *table, int write,
static int proc_lnet_routes(struct ctl_table *table, int write, static int proc_lnet_routes(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
const int tmpsiz = 256; const int tmpsiz = 256;
char *tmpstr; char *tmpstr;
char *s; char *s;
int rc = 0; int rc = 0;
int len; int len;
int ver; int ver;
int off; int off;
CLASSERT(sizeof(loff_t) >= 4); CLASSERT(sizeof(loff_t) >= 4);
...@@ -205,13 +205,13 @@ static int proc_lnet_routes(struct ctl_table *table, int write, ...@@ -205,13 +205,13 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
lnet_net_unlock(0); lnet_net_unlock(0);
*ppos = LNET_PROC_POS_MAKE(0, ver, 0, off); *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
} else { } else {
struct list_head *n; struct list_head *n;
struct list_head *r; struct list_head *r;
lnet_route_t *route = NULL; lnet_route_t *route = NULL;
lnet_remotenet_t *rnet = NULL; lnet_remotenet_t *rnet = NULL;
int skip = off - 1; int skip = off - 1;
struct list_head *rn_list; struct list_head *rn_list;
int i; int i;
lnet_net_lock(0); lnet_net_lock(0);
...@@ -251,11 +251,11 @@ static int proc_lnet_routes(struct ctl_table *table, int write, ...@@ -251,11 +251,11 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
} }
if (route != NULL) { if (route != NULL) {
__u32 net = rnet->lrn_net; __u32 net = rnet->lrn_net;
unsigned int hops = route->lr_hops; unsigned int hops = route->lr_hops;
unsigned int priority = route->lr_priority; unsigned int priority = route->lr_priority;
lnet_nid_t nid = route->lr_gateway->lp_nid; lnet_nid_t nid = route->lr_gateway->lp_nid;
int alive = route->lr_gateway->lp_alive; int alive = route->lr_gateway->lp_alive;
s += snprintf(s, tmpstr + tmpsiz - s, s += snprintf(s, tmpstr + tmpsiz - s,
"%-8s %4u %8u %7s %s\n", "%-8s %4u %8u %7s %s\n",
...@@ -293,13 +293,13 @@ static int proc_lnet_routes(struct ctl_table *table, int write, ...@@ -293,13 +293,13 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
static int proc_lnet_routers(struct ctl_table *table, int write, static int proc_lnet_routers(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int rc = 0; int rc = 0;
char *tmpstr; char *tmpstr;
char *s; char *s;
const int tmpsiz = 256; const int tmpsiz = 256;
int len; int len;
int ver; int ver;
int off; int off;
off = LNET_PROC_HOFF_GET(*ppos); off = LNET_PROC_HOFF_GET(*ppos);
ver = LNET_PROC_VER_GET(*ppos); ver = LNET_PROC_VER_GET(*ppos);
...@@ -328,9 +328,9 @@ static int proc_lnet_routers(struct ctl_table *table, int write, ...@@ -328,9 +328,9 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
lnet_net_unlock(0); lnet_net_unlock(0);
*ppos = LNET_PROC_POS_MAKE(0, ver, 0, off); *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
} else { } else {
struct list_head *r; struct list_head *r;
struct lnet_peer *peer = NULL; struct lnet_peer *peer = NULL;
int skip = off - 1; int skip = off - 1;
lnet_net_lock(0); lnet_net_lock(0);
...@@ -360,14 +360,14 @@ static int proc_lnet_routers(struct ctl_table *table, int write, ...@@ -360,14 +360,14 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
lnet_nid_t nid = peer->lp_nid; lnet_nid_t nid = peer->lp_nid;
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
unsigned long deadline = peer->lp_ping_deadline; unsigned long deadline = peer->lp_ping_deadline;
int nrefs = peer->lp_refcount; int nrefs = peer->lp_refcount;
int nrtrrefs = peer->lp_rtr_refcount; int nrtrrefs = peer->lp_rtr_refcount;
int alive_cnt = peer->lp_alive_count; int alive_cnt = peer->lp_alive_count;
int alive = peer->lp_alive; int alive = peer->lp_alive;
int pingsent = !peer->lp_ping_notsent; int pingsent = !peer->lp_ping_notsent;
int last_ping = cfs_duration_sec(cfs_time_sub(now, int last_ping = cfs_duration_sec(cfs_time_sub(now,
peer->lp_ping_timestamp)); peer->lp_ping_timestamp));
int down_ni = 0; int down_ni = 0;
lnet_route_t *rtr; lnet_route_t *rtr;
if ((peer->lp_ping_feats & if ((peer->lp_ping_feats &
...@@ -428,16 +428,16 @@ static int proc_lnet_routers(struct ctl_table *table, int write, ...@@ -428,16 +428,16 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
static int proc_lnet_peers(struct ctl_table *table, int write, static int proc_lnet_peers(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
const int tmpsiz = 256; const int tmpsiz = 256;
struct lnet_peer_table *ptable; struct lnet_peer_table *ptable;
char *tmpstr; char *tmpstr;
char *s; char *s;
int cpt = LNET_PROC_CPT_GET(*ppos); int cpt = LNET_PROC_CPT_GET(*ppos);
int ver = LNET_PROC_VER_GET(*ppos); int ver = LNET_PROC_VER_GET(*ppos);
int hash = LNET_PROC_HASH_GET(*ppos); int hash = LNET_PROC_HASH_GET(*ppos);
int hoff = LNET_PROC_HOFF_GET(*ppos); int hoff = LNET_PROC_HOFF_GET(*ppos);
int rc = 0; int rc = 0;
int len; int len;
CLASSERT(LNET_PROC_HASH_BITS >= LNET_PEER_HASH_BITS); CLASSERT(LNET_PROC_HASH_BITS >= LNET_PEER_HASH_BITS);
LASSERT(!write); LASSERT(!write);
...@@ -465,9 +465,9 @@ static int proc_lnet_peers(struct ctl_table *table, int write, ...@@ -465,9 +465,9 @@ static int proc_lnet_peers(struct ctl_table *table, int write,
hoff++; hoff++;
} else { } else {
struct lnet_peer *peer; struct lnet_peer *peer;
struct list_head *p; struct list_head *p;
int skip; int skip;
again: again:
p = NULL; p = NULL;
peer = NULL; peer = NULL;
...@@ -521,23 +521,23 @@ static int proc_lnet_peers(struct ctl_table *table, int write, ...@@ -521,23 +521,23 @@ static int proc_lnet_peers(struct ctl_table *table, int write,
} }
if (peer != NULL) { if (peer != NULL) {
lnet_nid_t nid = peer->lp_nid; lnet_nid_t nid = peer->lp_nid;
int nrefs = peer->lp_refcount; int nrefs = peer->lp_refcount;
int lastalive = -1; int lastalive = -1;
char *aliveness = "NA"; char *aliveness = "NA";
int maxcr = peer->lp_ni->ni_peertxcredits; int maxcr = peer->lp_ni->ni_peertxcredits;
int txcr = peer->lp_txcredits; int txcr = peer->lp_txcredits;
int mintxcr = peer->lp_mintxcredits; int mintxcr = peer->lp_mintxcredits;
int rtrcr = peer->lp_rtrcredits; int rtrcr = peer->lp_rtrcredits;
int minrtrcr = peer->lp_minrtrcredits; int minrtrcr = peer->lp_minrtrcredits;
int txqnob = peer->lp_txqnob; int txqnob = peer->lp_txqnob;
if (lnet_isrouter(peer) || if (lnet_isrouter(peer) ||
lnet_peer_aliveness_enabled(peer)) lnet_peer_aliveness_enabled(peer))
aliveness = peer->lp_alive ? "up" : "down"; aliveness = peer->lp_alive ? "up" : "down";
if (lnet_peer_aliveness_enabled(peer)) { if (lnet_peer_aliveness_enabled(peer)) {
unsigned long now = cfs_time_current(); unsigned long now = cfs_time_current();
long delta; long delta;
delta = cfs_time_sub(now, peer->lp_last_alive); delta = cfs_time_sub(now, peer->lp_last_alive);
...@@ -595,13 +595,13 @@ static int proc_lnet_peers(struct ctl_table *table, int write, ...@@ -595,13 +595,13 @@ static int proc_lnet_peers(struct ctl_table *table, int write,
static int __proc_lnet_buffers(void *data, int write, static int __proc_lnet_buffers(void *data, int write,
loff_t pos, void __user *buffer, int nob) loff_t pos, void __user *buffer, int nob)
{ {
char *s; char *s;
char *tmpstr; char *tmpstr;
int tmpsiz; int tmpsiz;
int idx; int idx;
int len; int len;
int rc; int rc;
int i; int i;
LASSERT(!write); LASSERT(!write);
...@@ -660,11 +660,11 @@ static int proc_lnet_buffers(struct ctl_table *table, int write, ...@@ -660,11 +660,11 @@ static int proc_lnet_buffers(struct ctl_table *table, int write,
static int proc_lnet_nis(struct ctl_table *table, int write, static int proc_lnet_nis(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
{ {
int tmpsiz = 128 * LNET_CPT_NUMBER; int tmpsiz = 128 * LNET_CPT_NUMBER;
int rc = 0; int rc = 0;
char *tmpstr; char *tmpstr;
char *s; char *s;
int len; int len;
LASSERT(!write); LASSERT(!write);
...@@ -684,9 +684,9 @@ static int proc_lnet_nis(struct ctl_table *table, int write, ...@@ -684,9 +684,9 @@ static int proc_lnet_nis(struct ctl_table *table, int write,
"rtr", "max", "tx", "min"); "rtr", "max", "tx", "min");
LASSERT(tmpstr + tmpsiz - s > 0); LASSERT(tmpstr + tmpsiz - s > 0);
} else { } else {
struct list_head *n; struct list_head *n;
lnet_ni_t *ni = NULL; lnet_ni_t *ni = NULL;
int skip = *ppos - 1; int skip = *ppos - 1;
lnet_net_lock(0); lnet_net_lock(0);
...@@ -705,12 +705,12 @@ static int proc_lnet_nis(struct ctl_table *table, int write, ...@@ -705,12 +705,12 @@ static int proc_lnet_nis(struct ctl_table *table, int write,
} }
if (ni != NULL) { if (ni != NULL) {
struct lnet_tx_queue *tq; struct lnet_tx_queue *tq;
char *stat; char *stat;
long now = get_seconds(); long now = get_seconds();
int last_alive = -1; int last_alive = -1;
int i; int i;
int j; int j;
if (the_lnet.ln_routing) if (the_lnet.ln_routing)
last_alive = now - ni->ni_last_alive; last_alive = now - ni->ni_last_alive;
...@@ -777,9 +777,9 @@ static int proc_lnet_nis(struct ctl_table *table, int write, ...@@ -777,9 +777,9 @@ static int proc_lnet_nis(struct ctl_table *table, int write,
} }
struct lnet_portal_rotors { struct lnet_portal_rotors {
int pr_value; int pr_value;
const char *pr_name; const char *pr_name;
const char *pr_desc; const char *pr_desc;
}; };
static struct lnet_portal_rotors portal_rotors[] = { static struct lnet_portal_rotors portal_rotors[] = {
...@@ -815,11 +815,11 @@ extern int portal_rotor; ...@@ -815,11 +815,11 @@ extern int portal_rotor;
static int __proc_lnet_portal_rotor(void *data, int write, static int __proc_lnet_portal_rotor(void *data, int write,
loff_t pos, void __user *buffer, int nob) loff_t pos, void __user *buffer, int nob)
{ {
const int buf_len = 128; const int buf_len = 128;
char *buf; char *buf;
char *tmp; char *tmp;
int rc; int rc;
int i; int i;
LIBCFS_ALLOC(buf, buf_len); LIBCFS_ALLOC(buf, buf_len);
if (buf == NULL) if (buf == NULL)
...@@ -887,38 +887,38 @@ static struct ctl_table lnet_table[] = { ...@@ -887,38 +887,38 @@ static struct ctl_table lnet_table[] = {
* to go via /proc for portability. * to go via /proc for portability.
*/ */
{ {
.procname = "stats", .procname = "stats",
.mode = 0644, .mode = 0644,
.proc_handler = &proc_lnet_stats, .proc_handler = &proc_lnet_stats,
}, },
{ {
.procname = "routes", .procname = "routes",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_routes, .proc_handler = &proc_lnet_routes,
}, },
{ {
.procname = "routers", .procname = "routers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_routers, .proc_handler = &proc_lnet_routers,
}, },
{ {
.procname = "peers", .procname = "peers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_peers, .proc_handler = &proc_lnet_peers,
}, },
{ {
.procname = "buffers", .procname = "buffers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_buffers, .proc_handler = &proc_lnet_buffers,
}, },
{ {
.procname = "nis", .procname = "nis",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_nis, .proc_handler = &proc_lnet_nis,
}, },
{ {
.procname = "portal_rotor", .procname = "portal_rotor",
.mode = 0644, .mode = 0644,
.proc_handler = &proc_lnet_portal_rotor, .proc_handler = &proc_lnet_portal_rotor,
}, },
{ {
......
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