#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>
#define LNET_COOKIE_TYPE_BITS 2
#define LNET_COOKIE_MASK ((1ULL << LNET_COOKIE_TYPE_BITS) - 1ULL)
+struct netstrfns {
+ u32 nf_type;
+ char *nf_name;
+ char *nf_modname;
+ void (*nf_addr2str)(u32 addr, char *str, size_t size);
+ int (*nf_str2addr)(const char *str, int nob, u32 *addr);
+ int (*nf_parse_addrlist)(char *str, int len,
+ struct list_head *list);
+ int (*nf_print_addrlist)(char *buffer, int count,
+ struct list_head *list);
+ int (*nf_match_addr)(u32 addr, struct list_head *list);
+ int (*nf_min_max)(struct list_head *nidlist, u32 *min_nid,
+ u32 *max_nid);
+};
+
struct lnet_ni; /* forward ref */
struct socket;
* lnet/include/lnet/nidstr.h */
__u32 net_id;
+ /* round robin selection */
+ __u32 net_seq;
+
/* total number of CPTs in the array */
__u32 net_ncpts;
__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 */
/* peer is marked for deletion */
#define LNET_PEER_MARK_DELETION BIT(18)
+/* lnet_peer_del()/lnet_peer_del_locked() has been called on the peer */
+#define LNET_PEER_MARK_DELETED BIT(19)
struct lnet_peer_net {
/* chain on lp_peer_nets */