There is some issue in my ethernet link. I wanted to do a sanity check using MAC loopback and see if the MAC is working well or not. Is there an easy way to do this?
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.
There is some issue in my ethernet link. I wanted to do a sanity check using MAC loopback and see if the MAC is working well or not. Is there an easy way to do this?
Hi,
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
If you see the MAC loopback test passing, then you should next do a phy loopback test.
Please refer this FAQ for more details on how to read statistics for CPSW
Regards,
Tanmay