Using Hardware Timestamps with PF_RING

Up to some years ago, hardware timestamps were available only on costly FPGA-based NICs. Slowly, NIC manufactures started to consider hw timestamps as an important feature, and they started to introduce them in new cards. As of today Silicom PE2Gi80, Intel 1 Gbit Ethernet Server Adapter i340 (1 Gbit) and Neterion X3110/X3120 (10 Gbit) offer off-the-shelf hardware timestamps. These cards do not feature a GPS connector, but support IEEE 1588 for clock synchronization. The accuracy of the hw timestamps of these cards ranges from 3 to 7 ns.

PF_RING has been enhanced to support hw timestamps, whatever is their source. PF_RING 4.6.1 introduced hw timestamp support in both the PF_RING kernel module, applications (e.g. pfcount), and even libpcap. The user-space pfring library via ioctl()’s call with SIOCSHWTSTAMP, informs the NIC that received packets must be timestamped. The new PF_RING module does the magic by exploiting and passing to userland all the hw timestamps present in packets. Using them is pretty simple

Intel 1Gbit

cd PF_RING

insmod ./drivers/intel/igb/igb-2.4.12/src/igb.ko

Neterion X3110/X3210

cd PF_RING

insmod ./drivers/neterion/vxge.ko pf_ring_en=1 lro=0 func_mode=0

Supposing to access you card as ethX, you can access hw timestamps using pfcount.

Upcoming Events

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies from this website. Privacy PolicyAcceptRead more