u-boot-brain/arch
Claudiu Manoil ff98da0667 sandbox: Add a DSA sandbox driver and unit test
The DSA sandbox driver is used for unit testing the DSA class code.
It implements a simple 2 port switch plus 1 CPU port, and uses a
very simple tag to identify the ports.

The DSA sandbox device is connected via CPU port to a regular Ethernet
sandbox device, called 'dsa-test-eth, managed by the existing eth
sandbox driver.  The 'dsa-test-eth' is not intended for testing the
eth class code however, but it is used to emulate traffic through the
'lan0' and 'lan1' front pannel switch ports.  To achieve this the dsa
sandbox driver registers a tx handler for the 'dsa-test-eth' device.
The switch ports, labeled as 'lan0' and 'lan1', are also registered
as eth devices by the dsa class code this time.  So pinging through
these switch ports is as easy as:

=> setenv ethact lan0
=> ping 1.2.3.5

Unit tests for the dsa class code were also added.  The 'dsa_probe'
test exercises most API functions from dsa.h.  The 'dsa' unit test
simply exercises ARP/ICMP traffic through the two switch ports,
including tag injection and extraction, with the help of the dsa
sandbox driver.

I took care to minimize the impact on the existing eth unit tests,
though some adjustments needed to be made with the addition of
extra eth interfaces used by the dsa unit tests. The additional eth
interfaces also require MAC addresses, these have been added to the
sandbox default environment.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Message-Id: <20210216224804.3355044-5-olteanv@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-04-15 14:22:17 +05:30
..
arc reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
arm board/km: add support for seli8 design based on nxp ls102x 2021-04-15 14:22:17 +05:30
m68k Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
microblaze common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mips common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
nds32 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
nios2 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
powerpc ppc: Remove MPC837XEMDS board 2021-04-10 14:33:35 -04:00
riscv riscv: dts: mpfs-icicle-kit: Drop 'clock-frequency' in the uart nodes 2021-04-08 15:37:30 +08:00
sandbox sandbox: Add a DSA sandbox driver and unit test 2021-04-15 14:22:17 +05:30
sh reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
x86 x86: qemu: move QFW to its own uclass 2021-04-12 17:44:55 -04:00
xtensa common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
.gitignore
Kconfig sandbox: Add a DSA sandbox driver and unit test 2021-04-15 14:22:17 +05:30
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00