linux-kerneltimestampnictimestamping

Hardware timestamp of network interface different between several devices & between the NIC and the system clock


I meet two problem when using recvmsg to get the hardware timestamp.

  1. One device get the realtime type, but the other get the monotonic time
  2. Network interface hw time is 100 second ahead of the time get by clock_gettime, I don't understand.

Can anyone give me the answer or some useful advices?


Solution

  • The first problem is because different NIC dirvers' realization is different.

    The second problem is because the NIC clock hasn't sync with the computer wall time.

    I finally get the answer by myself.