]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/net/dst.h
net: Document dst->obsolete better.
[karo-tx-linux.git] / include / net / dst.h
index 51610468c63db1783ab2d9aa2e5b0a5caa6f3367..0df661a0c2958f9e6997437b49feb5e2e520fec2 100644 (file)
@@ -65,7 +65,19 @@ 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
        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 +371,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);