Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
[firefly-linux-kernel-4.4.55.git] / include / net / dst.h
index 51610468c63db1783ab2d9aa2e5b0a5caa6f3367..baf59789006427bc7c373449b62b271e6e777d15 100644 (file)
@@ -65,7 +65,20 @@ struct dst_entry {
        unsigned short          pending_confirm;
 
        short                   error;
+
+       /* A non-zero value of dst->obsolete forces by-hand validation
+        * of the route entry.  Positive values are set by the generic
+        * dst layer to indicate that the entry has been forcefully
+        * destroyed.
+        *
+        * Negative values are used by the implementation layer code to
+        * force invocation of the dst_ops->check() method.
+        */
        short                   obsolete;
+#define DST_OBSOLETE_NONE      0
+#define DST_OBSOLETE_DEAD      2
+#define DST_OBSOLETE_FORCE_CHK -1
+#define DST_OBSOLETE_KILL      -2
        unsigned short          header_len;     /* more space at head required */
        unsigned short          trailer_len;    /* space to reserve at tail */
 #ifdef CONFIG_IP_ROUTE_CLASSID
@@ -359,7 +372,7 @@ extern struct dst_entry *dst_destroy(struct dst_entry *dst);
 
 static inline void dst_free(struct dst_entry *dst)
 {
-       if (dst->obsolete > 1)
+       if (dst->obsolete > 0)
                return;
        if (!atomic_read(&dst->__refcnt)) {
                dst = dst_destroy(dst);