Hello, I'm trying to build an accurate capture device based on Mellanox Connect-X5 with following requirements: - capture every incoming packets with hardware timestamps - output: pcap with timestamps in nanoseconds My problem is that the packets forwarded to `dpdk-pdump` carry raw timestamps from NIC clock.
mlx5 part of libibverbs includes a ts-to-ns converter which takes the instantaneous clock info. It's unused in dpdk so far. I've tested it in the device/port init routine and the result looks reliable. Since this approach looks very simple, compared to the time sync mechanism, I'm trying to integrate. The conversion should occur in the primary process (testpmd) I suppose. 1) The needed clock info derives from ethernet device. Is it possible to access that struct from a rx callback? 2) how to attach the nanosecond to mbuf so that `pdump` catches it? (workaround: copy `mbuf->udata64` in forwarded packets.) 3) any other idea? Regards, Patrick