lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <41144311-75ef-850f-6b99-2d19a3e7efb3@gmail.com>
Date: Wed, 17 May 2023 10:34:37 -0700
From: Kui-Feng Lee <sinquersw@...il.com>
To: Thinker Li <thinker.li@...il.com>
Cc: netdev@...r.kernel.org, ast@...nel.org, martin.lau@...ux.dev,
 kernel-team@...a.com, Kui-Feng Lee <kuifeng@...a.com>, davem@...emloft.net,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Maciej Żenczykowski
 <maze@...gle.com>, Mahesh Bandewar <maheshb@...gle.com>
Subject: Re: Fwd: [RFC PATCH net-next 2/2] net: Remove unused code and
 variables.

Thank you for comments.

On 5/17/23 10:27, Thinker Li wrote:
> 
> 
> 
> 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@...a.com <mailto:kuifeng@...a.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.

Got it!

> 
> ...
> 
>  > @@ -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.
> 
Got it!

>  > -{
>  > -     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));
>  > -}
>  > -
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ