RE: [PATCH net-next 4/6] arm64: dts: fsl: ls1028a: Add Felix switch port DT node

From: Claudiu Manoil
Date: Fri Jul 05 2019 - 04:37:37 EST


>-----Original Message-----
>From: Andrew Lunn <andrew@xxxxxxx>
>Sent: Friday, July 5, 2019 7:50 AM
>To: Vladimir Oltean <olteanv@xxxxxxxxx>
>Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>; Allan W. Nielsen
><allan.nielsen@xxxxxxxxxxxxx>; Claudiu Manoil <claudiu.manoil@xxxxxxx>;
>David S . Miller <davem@xxxxxxxxxxxxx>; devicetree@xxxxxxxxxxxxxxx;
>netdev@xxxxxxxxxxxxxxx; Alexandru Marginean
><alexandru.marginean@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx;
>UNGLinuxDriver@xxxxxxxxxxxxx; Allan Nielsen
><Allan.Nielsen@xxxxxxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; linux-
>arm-kernel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [PATCH net-next 4/6] arm64: dts: fsl: ls1028a: Add Felix switch port
>DT node
>
>Hi Vladimir
>
>> - DSA is typically used for discrete switches, switchdev is typically
>> used for embedded ones.
>
>Typically DSA is for discrete switches, but not exclusively. The
>b53/SF2 is embedded in a number of Broadcom SoCs. So this is no
>different to Ocelot, except ARM vs MIPS. Also, i would disagree that
>switchdev is used for embedded ones. Mellonex devices are discrete, on
>a PCIe bus. I believe Netronome devices are also discrete PCIe
>devices. In fact, i think ocelot is the only embedded switchdev
>switch.
>
>So embedded vs discrete plays no role here at all.
>
>> - The D in DSA is for cascaded switches. Apart from the absence of
>> such a "Ocelot SoC" driver (which maybe can be written, I don't know),
>> I think the switching core itself has some fundamental limitations
>> that make a DSA implementation questionable:
>
>There is no requirement to implement D in DSA. In fact, only Marvell
>does. None of the other switches do. And you will also find that most
>boards with a Marvell switch use a single device. D in DSA is totally
>optional. In fact, DSA is built from the ground up that nearly
>everything is optional. Take a look at mv88e6060, as an example. It
>implements nearly nothing. It cannot even offload a bridge to the
>switch.
>

Nice discussion, again, but there's a missing point that has not been
brought up yet. We actually intend to support the following hardware
configuration: a single PCI device consisting of the Microsemi's switch core
and our DMA rings.
The hardware supports this configuration into a single PCI function (PF),
with a unique PCI function id (0xe111), so that the same driver has access to
both switch registers and DMA rings connected to the CPU port. This device
would qualify as a switchdev device, and we can simply reuse the existing
ocelot code for the switch core part. The initial patch set was the first step in
supporting the switch core on our platform, we just need to add the support
for the DMA rings part, to make it a complete switchdev solution.

Thanks,
Claudiu