Re: [RFC 2/3] net: Provide switchdev driver for NXP's More Than IP L2 switch
From: Lukasz Majewski
Date: Mon Jun 28 2021 - 08:05:44 EST
Hi Andrew,
> > I do believe that I can just extend the L2 switch driver (fec_mtip.c
> > file to be precise) to provide full blown L2 switch functionality
> > without touching the legacy FEC more than in this patch set.
> >
> > Would you consider applying this patch series then?
>
> What is most important is the ABI. If something is merged now, we need
> to ensure it does not block later refactoring to a clean new
> driver. The DT binding is considered ABI. So the DT binding needs to
> be like a traditional switchdev driver. Florian already pointed out,
> you can use a binding very similar to DSA. ti,cpsw-switch.yaml is
> another good example.
The best I could get would be:
ð_switch {
compatible = "imx,mtip-l2switch";
reg = <0x800f8000 0x400>, <0x800fC000 0x4000>;
interrupts = <100>;
status = "okay";
ethernet-ports {
port1@1 {
reg = <1>;
label = "eth0";
phys = <&mac0 0>;
};
port2@2 {
reg = <2>;
label = "eth1";
phys = <&mac1 1>;
};
};
};
Which would abuse the "phys" properties usages - as 'mac[01]' are
referring to ethernet controllers.
On TI SoCs (e.g. am33xx-l4.dtsi) phys refer to some separate driver
responsible for PHY management. On NXP this is integrated with FEC
driver itself.
>
> So before considering merging your changes, i would like to see a
> usable binding.
>
> I also don't remember seeing support for STP. Without that, your
> network has broadcast storm problems when there are loops. So i would
> like to see the code needed to put ports into blocking, listening,
> learning, and forwarding states.
>
> Andrew
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@xxxxxxx
Attachment:
pgp5OyNdA4DRR.pgp
Description: OpenPGP digital signature