Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3355487pxj; Tue, 11 May 2021 02:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWPzCz5Gpid2gyv++qKXjn++7nQGYS2kmrzpkyfjPqTWpSFcgPbl3IIgR5vM4nxZAWD393 X-Received: by 2002:a17:907:75d5:: with SMTP id jl21mr30840472ejc.280.1620725688251; Tue, 11 May 2021 02:34:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620725688; cv=pass; d=google.com; s=arc-20160816; b=HPpGQPGdmwOm3Huo1hce1J+wXZ7dcjFa7DrOUxGpKyIsH3GvYRolU+4J+e79nS6gXO vI6MR1g0Qgfk+Gl6ijM5Z9OpoIz37Ki4dkuWjZAwoNeLuOGwyw9yLxQtpIxonhvTgZd8 Q1O0i+Nei6HnZ8t5N5Gpo7cUelbD3m+7b1UZx22KC0nX8XT8+ofmc1HoqjygpOfmHEVR iyFFnBxqTtGlSF+xXP++syf1XHny2gzexJkwBfDN2G+hYdVyUMM1N2wSU76Hm0bqhdax W1t74YlmpspeEf/ZtCM1rT6hOo4g05XbfRQ6J5R1K2zaqXJSpygJzbDki+BQoMof/d+x 7GIQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:references :cc:to:from:subject:dkim-signature; bh=tp9c8bteA9/QpO3pIOG/3bTEwmbE25ZhMXj+4SiAIvs=; b=kUHs6UdCRiA90ZbgnhHuJma1ac3PwzG33vgzTTKz0AU+bd/ozFWurZ69BaHwtfh8eI gIRwiOs8tnw5X/NYSuozpqrxBirXUuaZm6RxZ9KNKiqXD0e7/7M9/VnFqmzFM8qBUU9U fJLl/uCzPahptjjEjgPq8lr/+kSP5O2PoOs8ZCOaId307ljKn2KQUwrO7PihDhw/Jd8w YtdVIpMWQyEfRQid6PcAA65kJz3/dkhdtlLlV+Bu0GFr/IKCb6FuaqqF160Pb1kOJJ0T ye/63U5Bl6a25JVEAdboU7JAel4eExcbcFzH8F74dPcqsiL7A7FLEeKAQ0tvu/sKluvx xnqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=hMVTC5Lw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si10688337edk.546.2021.05.11.02.34.24; Tue, 11 May 2021 02:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=hMVTC5Lw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231377AbhEKJeZ (ORCPT + 99 others); Tue, 11 May 2021 05:34:25 -0400 Received: from mail-co1nam11on2089.outbound.protection.outlook.com ([40.107.220.89]:20128 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231321AbhEKJeW (ORCPT ); Tue, 11 May 2021 05:34:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GsNVygaDpoyCjfxcHnOdL4XnNgfLLsW2qO4XYHO9Wa2MpY4sYkZhQLd/HH67o9jgtywNZ+XyxTLPlvlfe3bvpQcRXK7JL4oYi0RqQRjZSiohwkev/xnaNTzEReprxbeZszpSTyta2ykGLLVPscx59T92VLR/aYGXZgEzlZyH2HGf0FfX7plR7KSrug1WBOdeqr2pTEnD7XWro+F2JiaJYKoFp8CZEOmTWiCaUpR1AZtFg61rHR62Q1gpmUu28GzOYrDJCijVtfScEYMiR+lIDfwcM7AR1aKmnpbZ+XyOBzYZwg3HOSzepbGgfmgH25GfYMAxYnXBaTPjHrEIsaYxCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tp9c8bteA9/QpO3pIOG/3bTEwmbE25ZhMXj+4SiAIvs=; b=ibQS1lej9TP8UKwjhEpL4MICtLQhMBrKdfy3IEzfp5e8zR496DOXc0kNMgrrESjA5UaOhFyBYJQ1XcBXV5IMOC28oq7jOf32wH7Qh+/OpB6sGxBlpSTT6H7IEi3EBwXnYjjwEy9eyDZmhOsV4vQPyKA80a1PPG44KuEBLI4J/4WKgZqXek9s23WPB3COFUrCF6iQZo37WOSblrSkWf53dSfJ6KjfVCumsx60PfwdBS9S/b0QWESRmCBT29A8Bj7GrgHgUrAXf5k5DgMrOgfMAmVRPMkTSas35ZVCFKHSb759e2xvYxTRJJCXa5UpnHm99KxxLQ5GQvmsmVLwf1a9xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tp9c8bteA9/QpO3pIOG/3bTEwmbE25ZhMXj+4SiAIvs=; b=hMVTC5Lw/aeMrtkMVlgms07lFnQqVXaDQyIbpT591k8ZodbYobUtxqrbpb0HyEAfeqz2YnnGysFnVrG9jDlI1gXAnauf9vT3FjQxFFq1AmfJMEtFlclZBCEL9JtVz4Iv5BD7ErG5YMyk5Z/RjV830/WYTn/y+4msufXRn5ZJnztfUnEPv7EsyJyAovGj3W6OO2jPbqSW/Yzbux8Rk+H+c/GgES3EjH9D4UjLKFDbyMTdQr+HMdQvfLGm2VMM2ubFhdxCmJoKCe8AEjhl1aFN+OTX6udcv6Bl2QhGcrAxnws4NpC6k3+0YKnD+Sstb+21UvK062nkzceLCBFpeRIl+g== Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=nvidia.com; Received: from DM4PR12MB5278.namprd12.prod.outlook.com (2603:10b6:5:39e::17) by DM4PR12MB5167.namprd12.prod.outlook.com (2603:10b6:5:396::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Tue, 11 May 2021 09:33:15 +0000 Received: from DM4PR12MB5278.namprd12.prod.outlook.com ([fe80::d556:5155:7243:5f0f]) by DM4PR12MB5278.namprd12.prod.outlook.com ([fe80::d556:5155:7243:5f0f%6]) with mapi id 15.20.4108.031; Tue, 11 May 2021 09:33:15 +0000 Subject: Re: [net-next v2 09/11] net: bridge: mcast: split multicast router state for IPv4 and IPv6 From: Nikolay Aleksandrov To: =?UTF-8?Q?Linus_L=c3=bcssing?= , netdev@vger.kernel.org Cc: Roopa Prabhu , Jakub Kicinski , "David S . Miller" , bridge@lists.linux-foundation.org, b.a.t.m.a.n@lists.open-mesh.org, linux-kernel@vger.kernel.org References: <20210509194509.10849-1-linus.luessing@c0d3.blue> <20210509194509.10849-10-linus.luessing@c0d3.blue> Message-ID: Date: Tue, 11 May 2021 12:33:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [213.179.129.39] X-ClientProxiedBy: ZR0P278CA0024.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::11) To DM4PR12MB5278.namprd12.prod.outlook.com (2603:10b6:5:39e::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.21.241.170] (213.179.129.39) by ZR0P278CA0024.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 11 May 2021 09:33:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1befe44d-62f7-4b48-da23-08d9145fcda2 X-MS-TrafficTypeDiagnostic: DM4PR12MB5167: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: naMnUleR5s8QGTzyvTFTtPwZqrdbxj4CVXO6BHrLCXsssrcC/T89WfCnu6IuH+xYzKzonF++M7IvUX6+rW0NATg8TF6LRm+elp7r2veZyNNe3OoKqdmsCQ7yyTwjiKHkqRiRkrHr/5lm7cyKUmxGesegqsNeUISJL+suKKNPHNCQwu/LpMo0DSn4FeM67IonNL5li94jsiD4tyXN56sEC69Fu1S30SHzSYcRn74mNILfm4tRLfm/WXxBqRqCKQxGwGRpGlLQT8rtGcRPmO7tmOK8JOm3qPJPorYfvm5PpLxNFYwF2NngVP8OGVql3BJ32quNw/Php5svyL+k1pOUE/KtSGD734TQ06vT6aP6hu+Wmt8fuhMzcywHKVVxaGbWXncE+Ez1ck4ZpOY/g0cFOIPWPQI/Rd3nkezuI7bz1KaffvPr/I/xDoea1IaDsuI7GZCPGFaIbWwTEYxekr67ybdsnC4rDmTRb70YtWrWSjO7lPKXd34GqcB7+9h712n6xwb0ZYYu2bTkpoMi5juH1IuAGipyRZrTIZnZVHDmvKr19M6TVEqtfHAyzW4xLqXm5y81wGd+52j4AnUKOg9HBgJ7I5ZSU+ly+JYnuYjdtxYvejfoMsMJXa63nt1yNUvRvldG5Wn/6pUcL4d0796eWL/ZESQcEHBTtZF8KfPvr0sLEhhEP8QqDgQqNGwvd0ol X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5278.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(39860400002)(376002)(136003)(346002)(31696002)(36756003)(86362001)(66574015)(38100700002)(83380400001)(6666004)(66476007)(66946007)(66556008)(2616005)(2906002)(4326008)(478600001)(316002)(16576012)(54906003)(6486002)(8676002)(956004)(16526019)(186003)(26005)(8936002)(53546011)(5660300002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?ZndLRkhFcHVZVk1YbjQ2cmFmMXlodVVCQncrbVd1Ym1TcXJnVXFYUnMzT3dP?= =?utf-8?B?c0RKdUN4RVJLMTRMMERIc3d2NUxwbmxOWGFmbGNoTnczT2c2SnN2c3JBcmVz?= =?utf-8?B?eCttalFvdDA0eEx5UjdnN0trWjlPMDhjQ3FmdmZYOTM3UGgzMFc0Unk1azcw?= =?utf-8?B?aTZTdTI5MnYwakNJdWZDTUM3a2M1dk1tUndMTkJtYUF2TUNIRE9xK1dRcEN6?= =?utf-8?B?Y3JzMHNTRkFGZHVlL3JPSEFldExuQXpISGZ3VVVEWHdHYmVrcnR6cm40a2ZK?= =?utf-8?B?Mnp2L2dVTEUyNkVKUFFpdHVha0VjOFBJcDJFL1hHNU1EN2Rac1NCR01uQ1Bl?= =?utf-8?B?MmNGaTFNMEZhc2dPKzhNU0VkVU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UMyb2pmZW5HWUprTk1nWld5elYrQ1hJU1ZkMzdvbnI1OW01bWNq?= =?utf-8?B?bGgrVmJiTWNCZVF1aVFDM00zMzVXUmtpRFd4ZzB5RVo2QzVHVXh5Q2U2Y3lC?= =?utf-8?B?dldId2JOTXYxY05RSmloYno5VTNuY014bjlBTjJVUzlRTXNrdzBqKyt0MmE1?= =?utf-8?B?T2xwcUNpY3pTclcwTWVaK2Z5K1dNMFByZmJuYmhtS0xzeDhsY29KOUIyMG45?= =?utf-8?B?eEttVkZOZ1NaL0tSMFN4bkJIZmFOMkg2cE9CUHJaRXBYMFR4OTFwVU1mVXJI?= =?utf-8?B?NmFSTjlzc28vais0NkJIYmhVaExHZitMMlVRbVV2S0pvZ0pIdlcwY0h2V3ZD?= =?utf-8?B?Rld0TTNham9odzRlMUU5OUp6cTNYUGV1NGpRajlkM3RkcTZEU3Z0YlZidEFL?= =?utf-8?B?VXFhclRoWEUyZURpUGZ3M2Zabk1EMGoyZHY0SWpIcEdCbEZndUEvazFjdmdG?= =?utf-8?Q?UQOjT153knFHixhC4qTjB497Jt6DcFzIDRSfBim?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1befe44d-62f7-4b48-da23-08d9145fcda2 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5278.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 09:33:15.4763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3V4aBjaH25n6WsCJnl45CMx/pomzTFQDNfgrwAyWQH/jNuJ7ZFHgEepTbZzRTmQ7MLvYZnWuUJmqUUL9acr3Ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5167 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/05/2021 12:29, Nikolay Aleksandrov wrote: > On 09/05/2021 22:45, Linus Lüssing wrote: >> A multicast router for IPv4 does not imply that the same host also is a >> multicast router for IPv6 and vice versa. >> >> To reduce multicast traffic when a host is only a multicast router for >> one of these two protocol families, keep router state for IPv4 and IPv6 >> separately. Similar to how querier state is kept separately. >> >> For backwards compatibility for netlink and switchdev notifications >> these two will still only notify if a port switched from either no >> IPv4/IPv6 multicast router to any IPv4/IPv6 multicast router or the >> other way round. However a full netlink MDB router dump will now also >> include a multicast router timeout for both IPv4 and IPv6. >> >> Signed-off-by: Linus Lüssing >> --- >> net/bridge/br_forward.c | 8 ++ >> net/bridge/br_mdb.c | 10 ++ >> net/bridge/br_multicast.c | 197 ++++++++++++++++++++++++++++++++++---- >> net/bridge/br_private.h | 6 +- >> 4 files changed, 201 insertions(+), 20 deletions(-) [snip] >> +#else >> +static inline void br_ip6_multicast_add_router(struct net_bridge *br, >> + struct net_bridge_port *port) >> +{ >> +} > > Actually that goes for multicast_add_router, too. > err, my bad - multicast_add_router is fine as is, sorry about that > I'm saying all this because soon I'll be adding per-vlan multicast router support > and these will be reusable there without any modification if they can take any list. > Also it'll be easier to maintain one set of functions instead of multiple identical ones. >