Whamcloud - gitweb
LU-12053 lnet: look up MR peers routes
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index 3cf7783..ae1a639 100644 (file)
@@ -415,6 +415,12 @@ struct lnet_net {
 
        /* 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 {
@@ -450,9 +456,6 @@ 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;
 
@@ -615,6 +618,9 @@ struct lnet_peer {
        /* 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;
 
@@ -624,15 +630,18 @@ struct lnet_peer {
        /* # 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;
 
@@ -734,6 +743,9 @@ struct lnet_peer {
 #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)
 
@@ -750,6 +762,12 @@ struct lnet_peer_net {
        /* 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;
 };