←back to thread

221 points mfiguiere | 2 comments | | HN request time: 0s | source
1. jeffbee ◴[] No.33696560[source]
Great article, but I have to quibble about the casual ease with which they wave away the complexity of accessing these timestamps. The Linux APIs for accessing them is totally absurd. See for example the gRPC code that associates hardware (possibly) timestamps with messages, for tracing and other reasons. You have to re-arm the timestamp option before every send. And the whole concept of a timestamp for an ethernet frame maps poorly to stream sockets.

https://github.com/grpc/grpc/blob/master/src/core/lib/iomgr/...

replies(1): >>33698032 #
2. gpderetta ◴[] No.33698032[source]
I don't see the code rearming it at every send nor it matches my experience. The code sets the sock option lazily, and only once . The option is needed to configure the driver and possibly the card. Then the timestamp option need to be passed to the send/recvmsg call to phisically retieve the send/recv timestamp.

Far for being absurd it seems a very straightforward extension of BSD socket API.