I'm having problems measuring RTTs with 82574L cards. In a simple experiment, I have two servers with 82574L directly connected with a cable. Server A sends a probe packet to server B and measures TX hardware timestamp tx_a. Server B replies an echo packet after receiving the probe packet, and notes down the RX hardware timestamp of the probe packet and the TX hardware timestamp of the echo packet as rx_b and tx_b. Finally server A notes down the RX hardware timestamp of the echo packet as rx_a. The RTT is computed as (rx_a - tx_a) - (tx_b - rx_b).
Since the NICs are connected back to back, I was expecting the RTTs measured to be very consistent. However this is not the case. The resulting RTTs varies from 1.4us to 100us.
Could anyone here shed some light on this problem?
My source files attached.
problem solved. It's because HWSTAMP_FILTER_ALL doesn't lock the rx timestamp registers.