Timestamp synchronization between host and network interface device
Examples described herein relate to a network interface device that includes first circuitry to negotiate supported timestamp parameters and selectively translate a timestamp associated with a packet based on the timestamp parameters and second circuitry to cause transmission of the packet based on the translated timestamp. In some examples, selectively translate a timestamp associated with a packet based on the timestamp parameters includes translates a value of the timestamp in a transmit descriptor associated with the packet.
1 . An apparatus comprising:
a packet processing device comprising:
a direct memory access (DMA) circuitry;
a network interface;
a host interface;
first circuitry to negotiate supported timestamp parameters with an operating system executed by a host system connected to the host interface and selectively translate a timestamp associated with a packet based on negotiated supported timestamp parameters, wherein:
the negotiation of supported timestamp parameters comprises a capabilities exchange between the operating system and the packet processing device,
the timestamp parameters indicate a timestamp granularity of a bit,
the timestamp granularity of the bit comprises a time interval from among multiple different time intervals, and
the timestamp granularity of the bit is set by the negotiation of the supported timestamp parameters with the operating system; and
second circuitry to cause transmission of the packet based on the translated timestamp.
2 . The apparatus of claim 1 , wherein the selectively translate the timestamp associated with the packet based on the timestamp parameters comprises translate a value of the timestamp in a transmit descriptor associated with the packet.
3 . The apparatus of claim 1 , wherein the timestamp parameters comprise: timestamp field location and size, valid timestamp window horizon range, operation when the timestamp is out of a valid range, use of absolute or relative timestamp values, and definition of exception timestamp values.
4 . The apparatus of claim 1 , wherein the second circuitry comprises one or more of: a scheduler, traffic shaper, or egress circuitry.
5 . The apparatus of claim 1 , wherein the timestamp parameters comprise a valid range value and wherein the first circuitry is to drop the packet based on a value of the translated timestamp exceeding the valid range value.
6 . The apparatus of claim 1 , comprising at least one memory device to store the packet prior to transmission to a media.
7 . The apparatus of claim 1 , comprising a host system communicatively coupled to the packet processing device, wherein the host system is to execute a driver that is to negotiate supported timestamp parameters with the first circuitry.
8 . The apparatus of claim 7 , wherein the driver is to perform timestamp translation based on the timestamp parameters on one or more timestamps received from the packet processing device.
9 . The apparatus of claim 7 , comprising a datacenter, wherein the datacenter includes the host system and packet processing device and a second packet processing device that is to receive the packet transmitted from the packet processing device.
10 . The apparatus of claim 1 , wherein the packet processing device comprises one or more of: network interface controller (NIC), a remote direct memory access (RDMA)-enabled NIC, SmartNIC, router, switch, forwarding element, infrastructure processing unit (IPU), or data processing unit (DPU).
11 . At least one non-transitory computer-readable medium comprising instructions stored thereon, that if executed by one or more processors, cause the one or more processors to:
configure a host system to:
negotiate supported timestamp parameters with a device by a capabilities exchange between the host system and a device, wherein:
the timestamp parameters indicate a per-bit timestamp granularity,
the timestamp granularity represented by a bit comprises a time duration from among multiple different time durations, and
the time duration is determined by the negotiation of the timestamp parameters between the host system and the device;
selectively translate a timestamp associated with a packet based on the timestamp parameters; and
provide the translated timestamp for access by the device.
12 . The at least one computer-readable medium of claim 11 , wherein the device comprises a packet processing device or a processor-executed driver.
13 . The at least one computer-readable medium of claim 11 , wherein the selectively translate the timestamp associated with a packet based on the timestamp parameters comprises translate a value of the timestamp in a transmit descriptor associated with the packet.
14 . The at least one computer-readable medium of claim 11 , wherein the timestamp parameters comprise three or more of: timestamp fields location and size, timestamp granularity, valid timestamp window horizon range, operation when the timestamp is out of a valid range, use of absolute or relative timestamp values, or definition of exception timestamp values.
15 . The at least one computer-readable medium of claim 11 , wherein the timestamp parameters comprise a valid range value and comprising instructions stored thereon, that if executed by one or more processors, cause the one or more processors to:
drop the packet based on a value of the translated timestamp exceeding the valid range value.
16 . A method comprising:
negotiating, by a host system, supported timestamp parameters with a device by a capabilities exchange between the host system and the device;
selectively translating, by the host system, a timestamp associated with a packet based on the timestamp parameters, wherein the timestamp parameters indicate a timestamp granularity of a bit, the timestamp granularity of the bit comprises a time interval from among multiple different time intervals, and the timestamp granularity of the bit is set by the negotiation of the timestamp parameters with the device; and
providing, by the host system, the translated timestamp for access by the device.
17 . The method of claim 16 , wherein the device comprises a packet processing device or a processor-executed driver.
18 . The method of claim 16 , wherein the selectively translating the timestamp associated with the packet based on the timestamp parameters comprises translating a value of the timestamp in a transmit descriptor associated with the packet.
19 . The method of claim 16 , wherein the timestamp parameters comprise: timestamp field location and size, timestamp granularity, valid timestamp window horizon range, operation when the timestamp is out of valid range, use of absolute or relative timestamp values, and definition of exception timestamp values.
20 . The method of claim 16 , wherein the timestamp parameters comprise a valid range value and comprising:
dropping, by the host system, the packet based on a value of the translated timestamp exceeding the valid range value.