typedef struct {
__u64 lrtrsi_version;
- lnet_peer_t *lrtrsi_router;
+ lnet_peer_t *lrtrsi_router;
loff_t lrtrsi_off;
} lnet_router_seq_iterator_t;
}
lrtrsi->lrtrsi_version = the_lnet.ln_routers_version;
- lrtrsi->lrtrsi_off = off;
+ lrtrsi->lrtrsi_off = off;
while (r != &the_lnet.ln_routers) {
lnet_peer_t *rtr = list_entry(r,
}
lrtrsi->lrtrsi_router = NULL;
- rc = -ENOENT;
+ rc = -ENOENT;
out:
LNET_UNLOCK();
return rc;
{
lnet_router_seq_iterator_t *lrtrsi = iter;
lnet_peer_t *lp;
- lnet_nid_t nid;
- int alive;
- int nrefs;
- int nrtrrefs;
+ lnet_nid_t nid;
+ int alive;
+ int alive_cnt;
+ int nrefs;
+ int nrtrrefs;
+ time_t last_ping;
if (lrtrsi->lrtrsi_off == 0) {
seq_printf(s, "%-4s %7s %9s %6s %12s %s\n",
return -ESTALE;
}
- nrefs = lp->lp_refcount;
- nrtrrefs = lp->lp_rtr_refcount;
- nid = lp->lp_nid;
- alive = lp->lp_alive;
+ nid = lp->lp_nid;
+ alive = lp->lp_alive;
+ alive_cnt = lp->lp_alive_count;
+ nrefs = lp->lp_refcount;
+ nrtrrefs = lp->lp_rtr_refcount;
+ last_ping = lp->lp_ping_timestamp;
LNET_UNLOCK();
seq_printf(s,
- "%-4d %7d %9d %6s %12lu %s\n",
- nrefs, nrtrrefs,
- lp->lp_alive_count,
- alive ? "up" : "down",
- lp->lp_ping_timestamp,
- libcfs_nid2str(nid));
+ "%-4d %7d %9d %6s %12lu %s\n", nrefs, nrtrrefs,
+ alive_cnt, alive ? "up" : "down",
+ last_ping, libcfs_nid2str(nid));
return 0;
}
seq_printf(s, "%-24s %4d %5s %5d %5d %5d %5d %5d %d\n",
libcfs_nid2str(nid), nrefs,
- !rtr ? "~rtr" : (lp->lp_alive ? "up" : "down"),
+ !rtr ? "~rtr" : (alive ? "up" : "down"),
maxcr, rtrcr, minrtrcr, txcr, mintxcr, txqnob);
return 0;
}