Forum Discussion
Dzar
Occasional Contributor
7 years agoReading HPS EMAC counters not reliable
UPDATE: Seems EMAC1 is looking OK. The problem, there, was understanding what's meant by "good" in some cases. But EMAC0 looks like it's almost not counting anything. It's quite sporadic when I see a...
- 7 years ago
Final answer... Set the PR bit, not the RA bit. One does not need both, but the PR bit is the correct one if one wants counters to work. No documentation on this, sadly, but that's what we've deduced.
Dzar
Occasional Contributor
7 years agoI am able to reproduce the non-working RX counter on uboot:
- Boot my board to uboot prompt (only)
- configure emac0 to add its IP/MAC address
- setenv ethaddr 00:11:22:33:44:55
- setenf ipaddr 10.10.7.90
- md.l 0xff700180 1 (and see the result is a low number... or maybe 0)
- on a PC connected to that port, do iperf -B 10.10.7.88 -c 10.10.7.90 -u -l 1000 -n 10000 (should send ten UDP packets, with the last re-transmitted ten times as there is no server running on my hardware)
- md.l 0xff700180 1 will now show three more frames than before. If I wireteap the line, I see three ARPs sent (no UDP packets).
- On PC, put in a static ARP entry for the hardware
- do iperf -B 10.10.7.88 -c 10.10.7.90 -u -l 1000 -n 10000
- See UDP packets being sent on the wire (and the light flashing on the port)
- md.l 0xff700180 1 and see no change in the counter value
This is uboot, folks. Built from code supplied by Intel. Can you repeat this? Do you have any hardware with EMAC0 connected to an RJ45 you can test?