Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B552CC05027 for ; Fri, 3 Feb 2023 16:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233068AbjBCQ16 (ORCPT ); Fri, 3 Feb 2023 11:27:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbjBCQ14 (ORCPT ); Fri, 3 Feb 2023 11:27:56 -0500 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3066A6BA8; Fri, 3 Feb 2023 08:27:46 -0800 (PST) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id 21D0E188387C; Fri, 3 Feb 2023 16:27:44 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id 0594C250007B; Fri, 3 Feb 2023 16:27:44 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id EA3F591201E4; Fri, 3 Feb 2023 16:27:43 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 MIME-Version: 1.0 Date: Fri, 03 Feb 2023 17:27:43 +0100 From: netdev@kapio-technology.com To: Ido Schimmel Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , "maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" , Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , =?UTF-8?Q?Cl=C3=A9m?= =?UTF-8?Q?ent_L=C3=A9ger?= , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Russell King , Christian Marangi , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" , "moderated list:ETHERNET BRIDGE" Subject: Re: [PATCH net-next 1/5] net: bridge: add dynamic flag to switchdev notifier In-Reply-To: References: <20230130173429.3577450-1-netdev@kapio-technology.com> <20230130173429.3577450-2-netdev@kapio-technology.com> <766efaf94fcb6362c5ceb176ad7955f1@kapio-technology.com> User-Agent: Gigahost Webmail Message-ID: <4188a35c3c260d8ea2b5f8b2ac0ae6b2@kapio-technology.com> X-Sender: netdev@kapio-technology.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-02-03 17:14, Ido Schimmel wrote: > > OK, so can't this hunk: > > ``` > if (fdb_info->is_dyn) > fdb_flags |= DSA_FDB_FLAG_DYNAMIC; > ``` > > Become: > > ``` > if (fdb_info->is_dyn && !fdb_info->added_by_user) > fdb_flags |= DSA_FDB_FLAG_DYNAMIC; > ``` > > ? > > Then there is no need to fold 'added_by_user' into 'is_dyn' in the > bridge driver. I *think* this is the change Vladimir asked you to do. I suppose you mean?: if (fdb_info->is_dyn && fdb_info->added_by_user) fdb_flags |= DSA_FDB_FLAG_DYNAMIC;