Due to a problem in the Intel® 25Gbps Ethernet IP core in Quartus® Prime software version 16.1, statistics counters may report incorrect values when read while data transmission is in process.
To workaround this problem, you must stop packet transfers for the direction you are interested in, read the statistics counters, then re-enable data transfers for that direction. For example, if you wish to read the RX statistics counters, stop all RX packet transfers, read the RX counters, then re-enable RX packet transfers.
This problem is fixed in Intel Quartus Prime software version 17.0.