Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM
With phytool I can configure PHY register to enable loopback. but how to confirm if it works?
Test on TDA4VH EVM, on MCU_RGMII ethernet port, The next RGMIII1 port behave same.
From the log, enabled MII loopback from PHY DP83867, ping another IP address, the TX -OK count increase, but the RX count is not changed.
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.85.133.217 netmask 255.255.255.0 broadcast 10.85.133.255
ether 68:e7:4a:08:be:56 txqueuelen 1000 (Ethernet)
RX packets 48 bytes 5217 (5.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 26 bytes 2673 (2.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 7a:19:c1:f4:24:b6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 90 bytes 6824 (6.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 90 bytes 6824 (6.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@j784s4-evm:/opt/edgeai-gst-apps# ping 10.85.133.161
PING 10.85.133.161 (10.85.133.161): 56 data bytes
64 bytes from 10.85.133.161: seq=0 ttl=128 time=1.166 ms
64 bytes from 10.85.133.161: seq=1 ttl=128 time=2.415 ms
64 bytes from 10.85.133.161: seq=2 ttl=128 time=0.977 ms
^C
--- 10.85.133.161 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.977/1.519/2.415 ms
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 56 0 0 0 31 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 90 0 0 0 90 0 0 0 LRU
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps# ping 10.85.133.161
PING 10.85.133.161 (10.85.133.161): 56 data bytes
64 bytes from 10.85.133.161: seq=0 ttl=128 time=0.998 ms
64 bytes from 10.85.133.161: seq=1 ttl=128 time=1.526 ms
64 bytes from 10.85.133.161: seq=2 ttl=128 time=1.875 ms
^C
--- 10.85.133.161 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.998/1.466/1.875 ms
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 64 0 0 0 34 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 90 0 0 0 90 0 0 0 LRU
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps#
root@j784s4-evm:/opt/edgeai-gst-apps# ls
CONTRIBUTING README.md apps_python docker download_test_data.sh optiflow setup_script.sh
LICENSE apps_cpp configs download_models.sh init_script.sh scripts tests
root@j784s4-evm:/opt/edgeai-gst-apps# cd ..
root@j784s4-evm:/opt# cd ..
root@j784s4-evm:/# ls
bin boot dev etc home lib linuxrc lost+found media mnt opt proc root run sbin srv sys tmp usr var
root@j784s4-evm:/# cd root
root@j784s4-evm:/root# ls
LICENSE README.md phytool-build.txt phytool-master phytool-x86
root@j784s4-evm:/root# cd phytool-master/
root@j784s4-evm:/root/phytool-master# ls
LICENSE README.md phytool phytool-x86 phytool.c phytool.o print_mv6.o print_phy.o
Makefile mv6tool.8 phytool-build.txt phytool.8 phytool.h print_mv6.c print_phy.c
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# ./phytool write eth0/0/0 0x4140
root@j784s4-evm:/root/phytool-master# [ 179.937981] am65-cpsw-nuss 46000000.ethernet eth0: Link is Down
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# ethtool -s eth0 speed 1000
root@j784s4-evm:/root/phytool-master# [ 219.680814] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# ethtool -s eth0 autoneg off
root@j784s4-evm:/root/phytool-master# [ 254.335976] am65-cpsw-nuss 46000000.ethernet eth0: Link is Down
root@j784s4-evm:/root/phytool-master# ethtool -s eth0 speed 1000
root@j784s4-evm:/root/phytool-master# ip link set dev eth0 up
root@j784s4-evm:/root/phytool-master# ifconfig eth0
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 68:e7:4a:08:be:56 txqueuelen 1000 (Ethernet)
RX packets 82 bytes 8457 (8.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 42 bytes 5517 (5.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@j784s4-evm:/root/phytool-master# ethtool -s eth0 autoneg on
root@j784s4-evm:/root/phytool-master# [ 430.941435] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 68:e7:4a:08:be:56 txqueuelen 1000 (Ethernet)
RX packets 82 bytes 8457 (8.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 6877 (6.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@j784s4-evm:/root/phytool-master# ifconfig eth0 10.85.133.166 netmask 255.255.255.0
root@j784s4-evm:/root/phytool-master# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.85.133.166 netmask 255.255.255.0 broadcast 10.85.133.255
ether 68:e7:4a:08:be:56 txqueuelen 1000 (Ethernet)
RX packets 82 bytes 8457 (8.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 60 bytes 9023 (8.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@j784s4-evm:/root/phytool-master# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 82 0 0 0 60 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 90 0 0 0 90 0 0 0 LRU
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 82 0 0 0 60 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 90 0 0 0 90 0 0 0 LRU
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# ping 10.85.133.161
PING 10.85.133.161 (10.85.133.161): 56 data bytes
^C
--- 10.85.133.161 ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss
root@j784s4-evm:/root/phytool-master#
root@j784s4-evm:/root/phytool-master# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 82 0 0 0 70 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 101 0 0 0 101 0 0 0 LRU
root@j784s4-evm:/root/phytool-master#
How to know if the TX package send back to RX in Linux?
