*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* lnet/include/lnet/lib-types.h
*
#include <linux/uio.h>
#include <linux/semaphore.h>
#include <linux/types.h>
+#include <linux/kref.h>
#include <uapi/linux/lnet/lnet-dlc.h>
#include <uapi/linux/lnet/lnetctl.h>
/* Recovery state. Protected by lnet_ni_lock() */
__u32 ni_recovery_state;
+ /* When to send the next recovery ping */
+ time64_t ni_next_ping;
+ /* How many pings sent during current recovery period did not receive
+ * a reply. NB: reset whenever _any_ message arrives on this NI
+ */
+ unsigned int ni_ping_count;
+
/* per NI LND tunables */
struct lnet_lnd_tunables ni_lnd_tunables;
__u32 ni_sel_priority;
/*
- * equivalent interfaces to use
- * This is an array because socklnd bonding can still be configured
+ * equivalent interface to use
*/
- char *ni_interfaces[LNET_INTERFACES_NUM];
+ char *ni_interface;
struct net *ni_net_ns; /* original net namespace */
};
/* peer's NID */
lnet_nid_t lpni_nid;
/* # refs */
- atomic_t lpni_refcount;
+ struct kref lpni_kref;
/* health value for the peer */
atomic_t lpni_healthv;
/* recovery ping mdh */
struct lnet_handle_md lpni_recovery_ping_mdh;
+ /* When to send the next recovery ping */
+ time64_t lpni_next_ping;
+ /* How many pings sent during current recovery period did not receive
+ * a reply. NB: reset whenever _any_ message arrives from this peer NI
+ */
+ unsigned int lpni_ping_count;
/* CPT this peer attached on */
int lpni_cpt;
/* state flags -- protected by lpni_lock */
int lr_seq; /* sequence for round-robin */
__u32 lr_hops; /* how far I am */
unsigned int lr_priority; /* route priority */
- bool lr_alive; /* cached route aliveness */
+ atomic_t lr_alive; /* cached route aliveness */
bool lr_single_hop; /* this route is single-hop */
};