Tool/software:
We are using a recently ordered TMDSICE3359 running Linux, as provided in ti-processor-sdk-linux-rt-am335x-evm-09.01.00.001-Linux-x86-Install.bin without any modifications.
Our goal is to test the switching functionality of cpsw which is needed by our application. Our test setup looks like this:
Host 1 <-> eth0 of TMDSICE3359 , eth1 of TMDSICE3359 <-> Host 2
Host 1 is connected to Ethernet 0 port of TMDSICE3359 and Host 2 is connected to Ethernet 1 port of TMDSICE3359.
The cpsw is configured in switch mode and a bridge is created with the following commands found in the kernel documentation (https://docs.kernel.org/networking/device_drivers/ethernet/ti/cpsw_switchdev.html).
devlink dev param set platform/4a100000.switch name switch_mode value 1 cmode runtime
ip link add name br0 type bridge
ip link set dev eth0 master br0
ip link set dev eth1 master br0
ip link set eth0 down;ip link set eth1 down
ip link set eth0 up;ip link set eth1 up
ip link set br0 up
To generate test traffic we constantly ping Host 2 from Host 1 and Host 1 from Host 2. Everything works as expected.
Then we physically swap the cables at the ports of TMDSICE3359. Now, Host 1 is connected with Ethernet 1 port of TMDSICE3359 and Host 2 is connected with Ethernet 0 port of TMDSICE3359.
The setup looks like this:
Host 2 <-> eth0 of TMDSICE3359 , eth1 of TMDSICE3359 <-> Host 1
After the cable swapping the requests from each host reach the other host, but the replies are not forwarded back.
Communication works as expected only if both ports are forced down and up by:
ip link set eth0 down;ip link set eth1 down
ip link set eth0 up;ip link set eth1 up
Why is this necessary? We would expect that the communication recovers without any additional interaction.
Thank you for your help and best regards
Panagiotis