Whamcloud - gitweb
LU-12053 lnet: look up MR peers routes
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index 6121592..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;
 
@@ -636,9 +642,6 @@ struct lnet_peer {
        /* 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;
 
@@ -759,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;
 };