int (*lnd_eager_recv)(struct lnet_ni *ni, void *private,
struct lnet_msg *msg, void **new_privatep);
- /* notification of peer health */
- void (*lnd_notify)(struct lnet_ni *ni, lnet_nid_t peer, int alive);
+ /* notification of peer down */
+ void (*lnd_notify_peer_down)(lnet_nid_t peer);
/* query of peer aliveness */
void (*lnd_query)(struct lnet_ni *ni, lnet_nid_t peer, time64_t *when);
/* network state */
enum lnet_net_state net_state;
+
+ /* when I was last alive */
+ time64_t net_last_alive;
+
+ /* protects access to net_last_alive */
+ spinlock_t net_lock;
};
struct lnet_ni {
/* percpt reference count */
int **ni_refs;
- /* when I was last alive */
- time64_t ni_last_alive;
-
/* pointer to parent network */
struct lnet_net *ni_net;
/* primary NID of the peer */
lnet_nid_t lp_primary_nid;
+ /* net to perform discovery on */
+ __u32 lp_disc_net_id;
+
/* CPT of peer_table */
int lp_cpt;
/* # refs from lnet_route_t::lr_gateway */
int lp_rtr_refcount;
+ /*
+ * peer specific health sensitivity value to decrement peer nis in
+ * this peer with if set to something other than 0
+ */
+ __u32 lp_health_sensitivity;
+
/* messages blocking for router credits */
struct list_head lp_rtrq;
/* routes on this peer */
struct list_head lp_routes;
- /* time of last router check attempt */
- time64_t lp_rtrcheck_timestamp;
-
/* reference count */
atomic_t lp_refcount;
#define LNET_PEER_FORCE_PING (1 << 13) /* Forced Ping */
#define LNET_PEER_FORCE_PUSH (1 << 14) /* Forced Push */
+/* force delete even if router */
+#define LNET_PEER_RTR_NI_FORCE_DEL (1 << 15)
+
+/* gw undergoing alive discovery */
+#define LNET_PEER_RTR_DISCOVERY (1 << 16)
+
struct lnet_peer_net {
/* chain on lp_peer_nets */
struct list_head lpn_peer_nets;
/* Net ID */
__u32 lpn_net_id;
+ /* time of last router net check attempt */
+ time64_t lpn_rtrcheck_timestamp;
+
+ /* selection sequence number */
+ __u32 lpn_seq;
+
/* reference count */
atomic_t lpn_refcount;
};
struct list_head lr_list; /* chain on net */
struct list_head lr_gwlist; /* chain on gateway */
struct lnet_peer *lr_gateway; /* router node */
+ lnet_nid_t lr_nid; /* NID used to add route */
__u32 lr_net; /* remote network number */
__u32 lr_lnet; /* local network number */
int lr_seq; /* sequence for round-robin */