+/*
+ * The status flags in lp_state. Their semantics have chosen so that
+ * lp_state can be zero-initialized.
+ *
+ * A peer is marked MULTI_RAIL in two cases: it was configured using DLC
+ * as multi-rail aware, or the LNET_PING_FEAT_MULTI_RAIL bit was set.
+ *
+ * A peer is marked NO_DISCOVERY if the LNET_PING_FEAT_DISCOVERY bit was
+ * NOT set when the peer was pinged by discovery.
+ *
+ * A peer is marked ROUTER if it indicates so in the feature bit.
+ */
+#define LNET_PEER_MULTI_RAIL BIT(0) /* Multi-rail aware */
+#define LNET_PEER_NO_DISCOVERY BIT(1) /* Peer disabled discovery */
+#define LNET_PEER_ROUTER_ENABLED BIT(2) /* router feature enabled */
+
+/*
+ * A peer is marked CONFIGURED if it was configured by DLC.
+ *
+ * In addition, a peer is marked DISCOVERED if it has fully passed
+ * through Peer Discovery.
+ *
+ * When Peer Discovery is disabled, the discovery thread will mark
+ * peers REDISCOVER to indicate that they should be re-examined if
+ * discovery is (re)enabled on the node.
+ *
+ * A peer that was created as the result of inbound traffic will not
+ * be marked at all.
+ */
+#define LNET_PEER_CONFIGURED BIT(3) /* Configured via DLC */
+#define LNET_PEER_DISCOVERED BIT(4) /* Peer was discovered */
+#define LNET_PEER_REDISCOVER BIT(5) /* Discovery was disabled */
+/*
+ * A peer is marked DISCOVERING when discovery is in progress.
+ * The other flags below correspond to stages of discovery.
+ */
+#define LNET_PEER_DISCOVERING BIT(6) /* Discovering */
+#define LNET_PEER_DATA_PRESENT BIT(7) /* Remote peer data present */
+#define LNET_PEER_NIDS_UPTODATE BIT(8) /* Remote peer info uptodate */
+#define LNET_PEER_PING_SENT BIT(9) /* Waiting for REPLY to Ping */
+#define LNET_PEER_PUSH_SENT BIT(10) /* Waiting for ACK of Push */
+#define LNET_PEER_PING_FAILED BIT(11) /* Ping send failure */
+#define LNET_PEER_PUSH_FAILED BIT(12) /* Push send failure */
+/*
+ * A ping can be forced as a way to fix up state, or as a manual
+ * intervention by an admin.
+ * A push can be forced in circumstances that would normally not
+ * allow for one to happen.
+ */
+#define LNET_PEER_FORCE_PING BIT(13) /* Forced Ping */
+#define LNET_PEER_FORCE_PUSH BIT(14) /* Forced Push */
+
+/* force delete even if router */
+#define LNET_PEER_RTR_NI_FORCE_DEL BIT(15)
+
+/* gw undergoing alive discovery */
+#define LNET_PEER_RTR_DISCOVERY BIT(16)
+/* gw has undergone discovery (does not indicate success or failure) */
+#define LNET_PEER_RTR_DISCOVERED BIT(17)
+
+/* peer is marked for deletion */
+#define LNET_PEER_MARK_DELETION BIT(18)
+