From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26B67C433E0 for ; Tue, 9 Feb 2021 02:07:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D433C64E77 for ; Tue, 9 Feb 2021 02:07:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230365AbhBICGw (ORCPT ); Mon, 8 Feb 2021 21:06:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbhBICGv (ORCPT ); Mon, 8 Feb 2021 21:06:51 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27A4C061786 for ; Mon, 8 Feb 2021 18:06:10 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id a22so4631706ljp.10 for ; Mon, 08 Feb 2021 18:06:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nfXd2mulWBs1LljfvvnW5kYLVafMCXcQ5E6FUoFwv4A=; b=pTY5szFS18Zm4S8wAuqUNZCahymj7ICHGNNynvuAvCkBCatKuV15Y9jRBcQCHGKAIQ 78w595Rm0faRyQoEHuM6gXfjOO5uGqjeU2ycWX+tk2fnXMvW+3u2j009KqTU89qLYLhA iJGsu0HoGZxMmjKRh9iPKfRb0rj367TLzK3kpAesTKnBZGt+98QyT1pUjr8+uh4jXrUi hbvdw0532O+glo1OMVE2t4QVk8ZpSczmLnPaGUQN2yKdo4zOP+Bi0/8E3LCgt5gLGWvT SChHi68dBy8HTEwN7WzMIks4kw8HXB1PDNHu9BhL+T+wFQvguQgEPMMS23x0CcsTzdQ9 FLhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nfXd2mulWBs1LljfvvnW5kYLVafMCXcQ5E6FUoFwv4A=; b=OaD7TLIlyiGa+2Pf/YN/O6Zpkoane6bjAb29faRnVZWyX9NsZpLepkuY5bWZ6HSFbr GRy1QbCNLVNe/DxfUQocfavngqk6a5xYMdNdGMGf5RYuWDntD5++smsDcJMwjyR6VRux CrpMMKHPqv0UXMdLVXSy9QYkXsQ/ROrpLDryWpYQuxLgQ5/nYFkNNIQ1BuSXsMG7sVTz xULFHm6Ch0S5dVkDvwbfoA/PmplKwO5qd/wUWwQYQMzOtn55YBKmpEjZ/btcVRnphCkw 0KXvp6iADmYxroImGVUMCRlhYaparlVKkB7g+qgsQPpVY1PLHZ7cu119pyBN40GeICf1 CJRg== X-Gm-Message-State: AOAM532DIe6UV83tP6saGr4e0VMKY2hIIuFUq6zh+szdMgJaPvpuQpK8 WHVdIXqvwMt+c3tcwMK9X6KiZ6UXqIZWl1RBQMRqjyltXwM= X-Google-Smtp-Source: ABdhPJxdHF/AuUvN8VZPkIn1OfvCIKsMaaxSuYJLgKjB/RsaEnhFhbGUh2NSg8sJNciJkM50U6BlUSb/lOARSHr477M= X-Received: by 2002:a2e:b803:: with SMTP id u3mr5698994ljo.481.1612836369237; Mon, 08 Feb 2021 18:06:09 -0800 (PST) MIME-Version: 1.0 References: <20210208175820.5690-1-ap420073@gmail.com> <8633a76b-84c1-44c1-f532-ce66c1502b5c@gmail.com> In-Reply-To: <8633a76b-84c1-44c1-f532-ce66c1502b5c@gmail.com> From: Taehee Yoo Date: Tue, 9 Feb 2021 11:05:58 +0900 Message-ID: Subject: Re: [PATCH net-next 7/8] mld: convert ip6_sf_socklist to list macros To: Eric Dumazet Cc: David Miller , Jakub Kicinski , Netdev , dsahern@kernel.org, Cong Wang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 9 Feb 2021 at 03:31, Eric Dumazet wrote: > Hi Eric, Thank you for the review! > > > 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 > > --- > > 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 > > #include > > #include > > +#include > > > > /* 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 ? > Sorry for that, I think I was so hasty. > You replace dense arrays by lists, so the performance will likely be hurt, > as cpu caches will be poorly used. > Thanks, I understand why the arrays have been using. I will send a v2 patch, which contains only the necessary changes. Thanks a lot, Taehee Yoo