工具与软件:
我们正在使用 ti-processor-sdk-linux-rt-am335x-evm-09.01.00.001-Linux-x86-Install.bin 中提供的最近订购的运行 Linux 的 TMDSICE3359、未进行任何修改。
我们的目标是测试 cpsw 的开关功能、这是我们应用所需的。 我们的测试设置如下所示:
Host 1 <-> eth0 of TMDSICE3359 , eth1 of TMDSICE3359 <-> Host 2
主机1连接到 TMDSICE3359的以太网0端口 、主机2连接到 TMDSICE3359的以太网1端口。
cpsw 配置为交换机模式、并使用内核文档(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 runtimeip link add name br0 type bridgeip link set dev eth0 master br0ip link set dev eth1 master br0ip link set eth0 down;ip link set eth1 downip link set eth0 up;ip link set eth1 upip 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