From: Simon Horman <simon.horman@corigine.com>
To: Kui-Feng Lee <thinker.li@gmail.com>
Cc: netdev@vger.kernel.org, ast@kernel.org, martin.lau@linux.dev,
kernel-team@meta.com, Kui-Feng Lee <kuifeng@meta.com>
Subject: Re: [RFC PATCH net-next 2/2] net: Remove unused code and variables.
Date: Wed, 17 May 2023 16:56:56 +0200 [thread overview]
Message-ID: <ZGTrOCcP9ITrKLlw@corigine.com> (raw)
In-Reply-To: <20230517042757.161832-3-kuifeng@meta.com>
On Tue, May 16, 2023 at 09:27:57PM -0700, Kui-Feng Lee wrote:
> Since GC has been removed, some functions and variables are useless. That
> includes some sysctl variables that control GC.
>
> Signed-off-by: Kui-Feng Lee <kuifeng@meta.com>
Hi Kui-Feng,
thanks for your patch.
Some initial review from my side.
> -static void fib6_gc_timer_cb(struct timer_list *t)
> -{
> - struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer);
> -
> - fib6_run_gc(0, arg, true);
> -}
> -
There is a forward declaration of fib6_gc_timer_cb around line 80.
It should be removed too.
...
> @@ -3283,28 +3281,6 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
> return dst;
> }
>
> -static void ip6_dst_gc(struct dst_ops *ops)
There is a forward declaration of ip6_dst_gc() around line 94.
That should be deleted too.
> -{
> - struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops);
> - int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval;
> - int rt_elasticity = net->ipv6.sysctl.ip6_rt_gc_elasticity;
> - int rt_gc_timeout = net->ipv6.sysctl.ip6_rt_gc_timeout;
> - unsigned long rt_last_gc = net->ipv6.ip6_rt_last_gc;
> - unsigned int val;
> - int entries;
> -
> - if (time_after(rt_last_gc + rt_min_interval, jiffies))
> - goto out;
> -
> - fib6_run_gc(atomic_inc_return(&net->ipv6.ip6_rt_gc_expire), net, true);
> - entries = dst_entries_get_slow(ops);
> - if (entries < ops->gc_thresh)
> - atomic_set(&net->ipv6.ip6_rt_gc_expire, rt_gc_timeout >> 1);
> -out:
> - val = atomic_read(&net->ipv6.ip6_rt_gc_expire);
> - atomic_set(&net->ipv6.ip6_rt_gc_expire, val - (val >> rt_elasticity));
> -}
> -
...
next prev parent reply other threads:[~2023-05-17 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 4:27 [RFC PATCH net-next 0/2] Mitigate the Issue of Expired Routes in Linux IPv6 Routing Tables Kui-Feng Lee
2023-05-17 4:27 ` [RFC PATCH net-next 1/2] net: Remove expired routes with separated timers Kui-Feng Lee
2023-05-17 15:26 ` Jakub Kicinski
2023-05-17 4:27 ` [RFC PATCH net-next 2/2] net: Remove unused code and variables Kui-Feng Lee
2023-05-17 14:56 ` Simon Horman [this message]
[not found] ` <CAFVMQ6SX=CES2EpovCbB5eSZjZuSbxAmoACbNdLCGWdU8kf=PQ@mail.gmail.com>
2023-05-17 17:34 ` Fwd: " Kui-Feng Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGTrOCcP9ITrKLlw@corigine.com \
--to=simon.horman@corigine.com \
--cc=ast@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuifeng@meta.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=thinker.li@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).