主要是判定丢包 丢在个哪一个阶段
MAC与PHY 通信的 QSGMII 总线上
PHY 的 utp 端口 MDI 线路上
1、phy utp internel boopback 内部回环模式,验证QSGMII 和 MAC 之间的通信质量
可以通过下面的配置将phy 设置为 utp internel boopback 来验证phy的QSGMII总线上的通信质量
# hard reset
./tools --miiwrite=eth0,0x1e,0xa0c0;./tools --miiwrite=eth0,0x1f,0x8000
sleep 3
#1000M mode, do not rest
./tools --miiwrite=eth0,0x1e,0xa000;./tools --miiwrite=eth0,0x1f,0
./tools --miiwrite=eth2,0x0,0x4140;
./tools --miiwrite=eth3,0x0,0x4140;
#100M
#./tools --miiwrite=eth1,0x0,0x6100;
设置完之后,phy 会自动link up ,可以使用 tcpreplay 打流测试,5.pcap 是我用流量仪抓的纯UDP的包,打流之前,一定要将 包里的 源MAC 目的MAC地址改为调试的网口MAC地址,否则将收不到包。
tcprewrite --enet-dmac=5C:D2:0B:11:67:DA --enet-smac=5C:D2:0B:11:67:DA --infile=4.pcap --