From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D713784012 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5CAD984002 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=UaG0H9YVd45cKQL3/FJQcUe93jcyrOYVfC41nfQax6c=; b=I4m85fuTMSlf1WqWJ69yvcPuwZJorKgLyqA+dIhQgLM9YD5mEtFHW2fATZcuf4a7n8iky9xfIdfo82cVGmUUbkNAiCMboTSC3BEyC8yRMmDjCoh9KmvafU3cZqZJ19luRaxkWBNdejkyh25cnV7sIeDbAVhvGbUbsK+EGC+2bt/10EXBsOv8T+6WmdY3ifS4ZijqBrfi5fvcvg6kC7TgtnkmNjhx9krN3B44KtIvhEKRWU6AkqA6FVj3iN45d0rPrKUVKPq+d3mc9u4pekwTktasCYQL9xvjdxfWy/dfTUnzrJU/tDY705Xba+3Fhd+118+knZV88HiCFt95QGT3ew== Date: Sun, 10 Jul 2022 11:35:36 +0300 From: Ido Schimmel Message-ID: References: <20220707152930.1789437-1-netdev@kapio-technology.com> <20220707152930.1789437-4-netdev@kapio-technology.com> <20220708084904.33otb6x256huddps@skbuf> <20220708091550.2qcu3tyqkhgiudjg@skbuf> <20220708115624.rrjzjtidlhcqczjv@skbuf> <723e2995314b41ff323272536ef27341@kapio-technology.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <723e2995314b41ff323272536ef27341@kapio-technology.com> MIME-Version: 1.0 Subject: Re: [Bridge] [PATCH v4 net-next 3/6] drivers: net: dsa: add locked fdb entry flag to drivers List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: netdev@kapio-technology.com Cc: Ivan Vecera , Andrew Lunn , Florian Fainelli , Jiri Pirko , Daniel Borkmann , netdev@vger.kernel.org, Nikolay Aleksandrov , bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Vivien Didelot , Eric Dumazet , Paolo Abeni , linux-kselftest@vger.kernel.org, Roopa Prabhu , kuba@kernel.org, Vladimir Oltean , Shuah Khan , davem@davemloft.net On Fri, Jul 08, 2022 at 02:34:25PM +0200, netdev@kapio-technology.com wrote: > On 2022-07-08 13:56, Vladimir Oltean wrote: > > On Fri, Jul 08, 2022 at 11:50:33AM +0200, netdev@kapio-technology.com > > wrote: > > > On 2022-07-08 11:15, Vladimir Oltean wrote: > > > > When the possibility for it to be true will exist, _all_ switchdev > > > > drivers will need to be updated to ignore that (mlxsw, cpss, ocelot, > > > > rocker, prestera, etc etc), not just DSA. And you don't need to > > > > propagate the is_locked flag to all individual DSA sub-drivers when none > > > > care about is_locked in the ADD_TO_DEVICE direction, you can just ignore > > > > within DSA until needed otherwise. > > > > > > > > > > Maybe I have it wrong, but I think that Ido requested me to send it > > > to all > > > the drivers, and have them ignore entries with is_locked=true ... > > > > I don't think Ido requested you to ignore is_locked from all DSA > > drivers, but instead from all switchdev drivers maybe. Quite different. > > So without changing the signature on port_fdb_add(). If that is to avoid > changing that signature, which needs to be changed anyhow for any switchcore > driver to act on it, then my next patch set will change the signarure also > as it is needed for creating dynamic ATU entries from userspace, which is > needed to make the whole thing complete. > > As it is already done (with the is_locked to the drivers) and needed for > future application, I would like Ido to comment on it before I take action. It's related to my reply here [1]. AFAICT, we have two classes of device drivers: 1. Drivers like mv88e6xxx that report locked entries to the bridge driver via 'SWITCHDEV_FDB_ADD_TO_BRIDGE'. 2. Drivers like mlxsw that trap packets that incurred an FDB miss to the bridge driver. These packets will cause the bridge driver to emit 'SWITCHDEV_FDB_ADD_TO_DEVICE' notifications with the locked flag. If we can agree that locked entries are only meant to signal to user space that a certain MAC tried to gain authorization and that the bridge should ignore them while forwarding, then there is no point in generating the 'SWITCHDEV_FDB_ADD_TO_DEVICE' notifications. We should teach the bridge driver to suppress these so that there is no need to patch all the device drivers. [1] https://lore.kernel.org/netdev/YsqLyxTRtUjzDj6D@shredder/ > > > > > In any case I'm going to take a look at this patch set more closely and > > run the selftest on my Marvell switch, but I can't do this today > > unfortunately. I'll return with more comments. > > Yes :-)