Configuration

Napatech Link™ Capture Software Features

Platform
Napatech SmartNIC
Content Type
Feature Description
Capture Software Version
Link™ Capture Software 12.5

Transmit on time stamp is configured through the NTAPI configuration stream.

Configuration parameters

Transmit on time stamp is configured per port using the function NT_ConfigWrite() with a NtConfigTransmitOnTimestamp_s structure.

NtConfigTransmitOnTimestamp_s has the following members:
Field Description
portNo

Specifies the port for which to configure transmit on time stamp.

data.timeDelta

Specifies the delta in ns to add to time stamp before comparing to SmartNIC time.

See Frame transmit condition for further explanation.

data.enable
Enables transmit on time stamp.
  • false: Transmits all frames as fast as possible. This is the default setting.
  • true: Transmits a frame on time stamp if the txNow bit in the packet descriptor of the frame is not set.
data.forceTxOnTs

Forces transmit on time stamp, regardless of the txNow bit in the packet descriptor.

To transmit PCAP frames on time stamp, set forceTxOnTs=true.

data.timeDeltaAdjust

Specifies the adjustment in ns to add to data.timeDelta whenever a txSetClock frame is encountered. The txSetClock bit is available in the Napatech standard packet descriptor; the PCAP descriptor does not have a txSetClock bit.

For the PCAP descriptor, which does not have a txNow bit, txNow is considered set.

Time stamp formats

The following time stamp formats are supported:

Descriptor Time stamp format
Standard Native Unix (10 ns)
Native Unix ns (1 ns)
PCAP PCAP-ns
PCAP-μs

Program flow for setting up transmit on time stamp

The general program flow for setting up transmit on time stamp will look like this:

  • Read the time stamp from the first frame and convert the value to ns.
  • Read the SmartNIC time and convert the value to ns.
  • Calculate data.timeDelta: ∆ = SmartNIC time – first frame time stamp + additional offset.
  • Configure transmit on time stamp per port:
    • Use a config stream with NT_CONFIG_PARM_PORT_TRANSMIT_ON_TIMESTAMP parameters.
    • Set calculated data.timeDelta.
    • Set data.enable to enable the port for transmit on time stamp.
    • Set data.forceTxOnTs to ignore the txNow bit in packet descriptor (which is assumed set for PCAP).

This program flow is illustrated in Example.

Program flow for replaying a capture file repeatedly

data.timeDeltaAdjust is useful for replaying a Napatech capture file repeatedly without reconfiguring data.timeDelta at the start of each replay. The program flow will look like this:
  • Read the time stamp from the first and the last frame and convert the values to ns.
  • Read the SmartNIC time and convert the value to ns.
  • Calculate the estimated transmission time for last frame in ns.
  • Calculate data.timeDeltaAdjust = last frame time stamp - first frame time stamp + estimated transmission time for last frame
  • Calculate data.timeDelta: ∆ = SmartNIC time – first frame time + additional offset - data.timeDeltaAdjust.
  • Configure transmit on time stamp per port:
    • Use a config stream with NT_CONFIG_PARM_PORT_TRANSMIT_ON_TIMESTAMP parameters.
    • Set calculated data.timeDelta.
    • Set calculated data.timeDeltaAdjust.
    • Set data.enable to enable the port for transmit on time stamp.
  • At the start of each replay, set txSetClock for the first frame, using the macro NT_NET_SET_PKT_TXSETCLOCK().