This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我的以太网链路中存在一些问题。 我想使用 MAC 环回进行完整性检查、看看 MAC 是否运行良好。 是否有简单的方法可以做到这一点?
您好!
devmem2 $addr
devmem2 $addr w $value
#!/bin/bash my_ip_addr=192.168.1.46 server_ip_addr=192.168.1.100 mac_addr=0x0C023330 IF_NAME=eth2 echo "======= $IF_NAME stats =======" ethtool -S $IF_NAME | grep good echo "**************************" echo "Setting CPSW in Loopback" echo "**************************" var=$(( 16#$(devmem2 $mac_addr | tail -n1 -c9) )) devmem2 $mac_addr w `expr $var + 2` devmem2 $mac_addr echo "" echo "Running Ping ..." ping -c 5 $server_ip_addr echo "" echo "======= $IF_NAME stats =======" ethtool -S $IF_NAME | grep good echo "**************************" echo "Removing CPSW Loopback" echo "**************************" devmem2 $mac_addr w $var
如果看到 MAC 环回测试通过、则接下来应进行 Phy 环回测试。
有关如何读取 CPSW 统计数据的更多详细信息、请参阅此常见问题解答
此致、
Tanmy.