[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8633a76b-84c1-44c1-f532-ce66c1502b5c@gmail.com>
Date: Mon, 8 Feb 2021 19:31:06 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Taehee Yoo <ap420073@...il.com>, davem@...emloft.net,
kuba@...nel.org, netdev@...r.kernel.org, dsahern@...nel.org,
xiyou.wangcong@...il.com
Subject: Re: [PATCH net-next 7/8] mld: convert ip6_sf_socklist to list macros
On 2/8/21 6:58 PM, Taehee Yoo wrote:
> Currently, struct ip6_sf_socklist doesn't use list API so that code
> shape is a little bit different from others.
> So it converts ip6_sf_socklist to use list API so it would
> improve readability.
>
> Signed-off-by: Taehee Yoo <ap420073@...il.com>
> ---
> include/net/if_inet6.h | 19 +-
> include/uapi/linux/in.h | 4 +-
> net/ipv6/mcast.c | 387 +++++++++++++++++++++++++---------------
> 3 files changed, 256 insertions(+), 154 deletions(-)
>
> diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
> index babf19c27b29..6885ab8ec2e9 100644
> --- a/include/net/if_inet6.h
> +++ b/include/net/if_inet6.h
> @@ -13,6 +13,7 @@
> #include <net/snmp.h>
> #include <linux/ipv6.h>
> #include <linux/refcount.h>
> +#include <linux/types.h>
>
> /* inet6_dev.if_flags */
>
> @@ -76,23 +77,19 @@ struct inet6_ifaddr {
> };
>
> struct ip6_sf_socklist {
> - unsigned int sl_max;
> - unsigned int sl_count;
> - struct in6_addr sl_addr[];
> + struct list_head list;
> + struct in6_addr sl_addr;
> + struct rcu_head rcu;
> };
>
I dunno about readability, but :
Your patches adds/delete more than 1000 lines, who is really going to review this ?
You replace dense arrays by lists, so the performance will likely be hurt,
as cpu caches will be poorly used.
Powered by blists - more mailing lists