netdev at kapio-technology.com
2022-Oct-22 07:24 UTC
[Bridge] [PATCH v8 net-next 10/12] net: dsa: mv88e6xxx: mac-auth/MAB implementation
On 2022-10-21 20:14, Vladimir Oltean wrote:> On Fri, Oct 21, 2022 at 07:39:34PM +0200, netdev at kapio-technology.com > wrote: >> Well, with this change, to have MAB working, the bridge would need >> learning on >> of course, but how things work with the bridge according to the flags, >> they >> should also work in the offloaded case if you ask me. There should be >> no >> difference between the two, thus MAB in drivers would have to be with >> learning on. > > Am I proposing for things to work differently in the offload and > software case, and not realizing it? :-/ > > The essence of my proposal was to send a bug fix now which denies > BR_LEARNING to be set together with BR_PORT_LOCKED. The fact that > link-local traffic is learned by the software bridge is something > unintended as far as I understand. > > You tried to fix it here, and as far as I could search in my inbox, > that > didn't go anywhere: > https://lore.kernel.org/netdev/47d8d747-54ef-df52-3b9c-acb9a77fa14a at blackwall.org/T/#u > > I thought only mv88e6xxx offloads BR_PORT_LOCKED, but now, after > searching, I also see prestera has support for it, so let me add > Oleksandr Mazur to the discussion as well. I wonder how they deal with > this? Has somebody come to rely on learning being enabled on a locked > port? > > > MAB in offloading drivers will have to be with learning on (same as in > software). When BR_PORT_LOCKED | BR_LEARNING will be allowed together > back in net-next (to denote the MAB configuration), offloading drivers > (mv88e6xxx and prestera) will be patched to reject them. They will only > accept the two together when they implement MAB support. > > Future drivers after this mess has been cleaned up will have to look at > the BR_PORT_LOCKED and BR_LEARNING flag in combination, to see which > kind of learning is desired on a port (secure, CPU based learning or > autonomous learning). > > Am I not making sense?I will not say that you are not making sense as for the mv88e6xxx, as it needs port association in all cases with BR_PORT_LOCKED, MAB or not, and port association is turned on in the driver with learning turned on. That said, there must be some resolution and agreement overall with this issue to move on. Right now port association is turned on in the mv88e6xxx driver when locking the port, thus setting learning off after locking will break things.
Vladimir Oltean
2022-Oct-22 12:02 UTC
[Bridge] [PATCH v8 net-next 10/12] net: dsa: mv88e6xxx: mac-auth/MAB implementation
On Sat, Oct 22, 2022 at 09:24:56AM +0200, netdev at kapio-technology.com wrote:> I will not say that you are not making sense as for the mv88e6xxx, as it > needs port association in all cases with BR_PORT_LOCKED, MAB or not, and > port association is turned on in the driver with learning turned on. > > That said, there must be some resolution and agreement overall with this > issue to move on. Right now port association is turned on in the mv88e6xxx > driver when locking the port, thus setting learning off after locking will > break things.This already needs to be treated as a bug and fixed on its own. Forget about MAB. You're saying that when BR_LEARNING=on and BR_PORT_LOCKED=on, the mv88e6xxx driver works properly, but the software bridge is broken (learns from link-local multicast). When BR_LEARNING=off and BR_PORT_LOCKED=on, the software bridge is not broken, but the mv88e6xxx driver is, because it requires the PAV configured properly. And you're saying that I'm the one who suggests things should work differently in software mode vs offloaded mode?! Why don't you (a) deny BR_LEARNING + BR_PORT_LOCKED in the bridge layer (b) fix the mv88e6xxx driver to always keep the assoc_vector set properly for the port, if BR_LEARNING *or* BR_PORT_LOCKED is set?