net: dst: remove gc leftovers
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 20 Mar 2019 19:02:56 +0000 (20:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2019 20:39:25 +0000 (13:39 -0700)
Get rid of some obsolete gc-related documentation and macros that were
missed in commit 5b7c9a8ff828 ("net: remove dst gc related code").

CC: Wei Wang <weiwan@google.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dst.h
net/core/dst.c
net/ipv4/route.c

index 6cf0870414c783720026a151ba94307a2bb4ad30..12b31c602cb0dd648cca27ebd4eed4fa6b07e81e 100644 (file)
 #include <net/neighbour.h>
 #include <asm/processor.h>
 
-#define DST_GC_MIN     (HZ/10)
-#define DST_GC_INC     (HZ/2)
-#define DST_GC_MAX     (120*HZ)
-
-/* Each dst_entry has reference count and sits in some parent list(s).
- * When it is removed from parent list, it is "freed" (dst_free).
- * After this it enters dead state (dst->obsolete > 0) and if its refcnt
- * is zero, it can be destroyed immediately, otherwise it is added
- * to gc list and garbage collector periodically checks the refcnt.
- */
-
 struct sk_buff;
 
 struct dst_entry {
index a263309df115ee5157f3cd6c7bec88c8ce02fe09..1f13d90cd0e40628915c4e1e3b793c4ea1c5b448 100644 (file)
 #include <net/dst.h>
 #include <net/dst_metadata.h>
 
-/*
- * Theory of operations:
- * 1) We use a list, protected by a spinlock, to add
- *    new entries from both BH and non-BH context.
- * 2) In order to keep spinlock held for a small delay,
- *    we use a second list where are stored long lived
- *    entries, that are handled by the garbage collect thread
- *    fired by a workqueue.
- * 3) This list is guarded by a mutex,
- *    so that the gc_task and dst_dev_event() can be synchronized.
- */
-
-/*
- * We want to keep lock & list close together
- * to dirty as few cache lines as possible in __dst_free().
- * As this is not a very strong hint, we dont force an alignment on SMP.
- */
 int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb)
 {
        kfree_skb(skb);
index a5da63e5faa2d8118d3044a5a79b5e51bf61cafc..14c7fdacaa72ed2180169c3befb2aa04ce1e3093 100644 (file)
@@ -1176,7 +1176,7 @@ static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
         *
         * When a PMTU/redirect information update invalidates a route,
         * this is indicated by setting obsolete to DST_OBSOLETE_KILL or
-        * DST_OBSOLETE_DEAD by dst_free().
+        * DST_OBSOLETE_DEAD.
         */
        if (dst->obsolete != DST_OBSOLETE_FORCE_CHK || rt_is_expired(rt))
                return NULL;