Introduce DSA Ethernet switch class and Felix driver
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 of 6 patches 0 repliesNew
3 of 6 patches are in this archive. The cover letter announces 6.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 4/6 | drivers: net: add Felix DSA switch driver | +0 | 0 replies | |
| 5/6 | arm: dts: ls1028a: adds Ethernet switch node and its dependencies | +0 | 1 reply | |
| 5/6 | arm: dts: ls1028a: adds Ethernet switch node and its dependencies | +0 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Michael Walle |
|---|---|
| Series | T-b |
| 4/6 | |
| 5/6 | |
| 5/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH 0/6] Introduce DSA Ethernet switch class and Felix driver
Am 2019-11-22 02:36, schrieb Alex Marginean:
Quoted 133 lines
DSA stands for Distributed Switch Architecture and it is a subsystem introduced
in the Linux kernel to support switches that:
- have an Ethernet link up to the CPU
- use some form of tagging to identify the source/destination port for Rx/Tx
- may be cascaded in tree-like structures.DSA is described in depth here:
https://www.kernel.org/doc/Documentation/networking/dsa/dsa.txtFrom the doc:
Summarized, this is basically how DSA looks like from a network device perspective: |--------------------------- | CPU network device (eth0)| ---------------------------- | <tag added by switch | | | | | | tag added by CPU> | |--------------------------------------------| | Switch driver | |--------------------------------------------| || || || |-------| |-------| |-------| | sw0p0 | | sw0p1 | | sw0p2 | |-------| |-------| |-------|This patch set introduces a DSA class in U-Boot to support drivers of such
switches. DSA drivers have to implement the following ops:
- enable/disable of switch ports,
- insert a tag in frames being transmitted, used by the switch to select the
egress port,
- parse a tag in frames being received, used for Rx traffic.DSA class code deals with presentation of switch ports as Ethernet interfaces,
deals with the master Ethernet device for I/O and helps with parsing of the DT
assuming the structure follows the DSA kernel binding.Support for switch cascading is not included yet.
This patch set also introduces a driver for the Ethernet switch integrated into
NXP LS1028A, called Felix. The switch has 4 front panel ports, I/O to/fom it is
done though an ENETC Ethernet interface and meta-data is carried between the
switch and the driver though an additional header pre-pended to the original
frame.
Network commands like tftp can be used on these front panel ports. The ports
are disabled unless used so they do not cause issues on network topologies that
include loops.Felix as seen on LS1028A RDB:
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
......dsa 0 [ + ] felix-switch | |-- felix-switch eth 4 [ + ] dsa-port | | |-- swp0 eth 5 [ + ] dsa-port | | |-- swp1 eth 6 [ + ] dsa-port | | |-- swp2 eth 7 [ + ] dsa-port | | `-- swp3=> mdio list
......
10 - Vitesse VSC8514 <--> swp0 11 - Vitesse VSC8514 <--> swp1 12 - Vitesse VSC8514 <--> swp2 13 - Vitesse VSC8514 <--> swp3=> tftp 80000000 test
Using swp2 device
TFTP from server 192.168.100.1; our IP address is 192.168.100.100 Filename 'test'.
Load address:0x80000000
Loading:
##################################################################################################################################
######################################################## 6.8 MiB/sdone
Bytes transferred = 949880 (e7e78 hex)This patch set replaces this previous submission of the Felix driver:
https://patchwork.ozlabs.org/project/uboot/list/?series=143126&state=*
and depends on:
https://patchwork.ozlabs.org/project/uboot/list/?series=142858
https://patchwork.ozlabs.org/project/uboot/list/?series=142879Alex Marginean (6):
net: introduce DSA class for Ethernet switches
drivers: net: add a DSA sandbox driver
test: dm: add a simple unit test for DSA class
drivers: net: add Felix DSA switch driver
arm: dts: ls1028a: adds Ethernet switch node and its dependencies
configs: ls1028a: enable the Ethernet switch driver in defconfigarch/Kconfig | 1 + arch/arm/dts/fsl-ls1028a-rdb.dts | 36 ++ arch/arm/dts/fsl-ls1028a.dtsi | 41 +- arch/sandbox/dts/test.dts | 49 ++ configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 3 +- configs/ls1028aqds_tfa_defconfig | 3 +- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 3 +- configs/ls1028ardb_tfa_defconfig | 3 +- drivers/net/Kconfig | 21 + drivers/net/Makefile | 1 + drivers/net/dsa_sandbox.c | 272 +++++++++++ drivers/net/fsl_enetc.h | 5 + drivers/net/mscc_eswitch/Kconfig | 8 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/felix_switch.c | 453 +++++++++++++++++++ include/configs/sandbox.h | 4 + include/dm/uclass-id.h | 1 + include/dsa.h | 132 ++++++ net/Makefile | 1 + net/dsa-uclass.c | 369 +++++++++++++++ test/dm/Makefile | 1 +
Quoted 8 lines
test/dm/dsa.c | 58 +++ test/dm/test-fdt.c | 2 +- 23 files changed, 1462 insertions(+), 6 deletions(-) create mode 100644 drivers/net/dsa_sandbox.c create mode 100644 drivers/net/mscc_eswitch/felix_switch.c create mode 100644 include/dsa.h create mode 100644 net/dsa-uclass.c create mode 100644 test/dm/dsa.c
For the patches affecting the real hardware: