Adapter to Host

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: Adapter to Host

Adapter-to-Host Time Synchronization

Overview

Adapter-to-host synchronization synchronizes the system time in the server, i.e., the operating system's clock, to the clock of a Napatech adapter.

The ntservice configuration file provides a single parameter in the system section to enable adapter-to-host synchronization.

[system]
TimeSyncOsTimeReference = adapter-0  # replace with proper number

Up to one adapter clock can control the system time, and the default behavior is not to enable synchronization:

[system]
TimeSyncOsTimeReference = None  # default value

These are select properties of adapter-to-host time synchronization:

  • The feature cannot (should not) be used together with other ways of server time adjustments. For instance, It is not advisable to use NTP when using the adapter-to-host feature.
  • The ntservice process runs with root privileges and is therefore able to control the clock in the server.
  • Adapter-to-host and OS time synchronization cannot be configured for the same adapter at the same time. For instance, if you specify that adapter zero shall control the server time, then it is illegal to specify that adapter zero shall use use OS time synchronization.
  • The time stamp format of the adapter used to control the system time cannot be set to NATIVE.
  • When the server time and adapter time are off by more than 60ms, ntservice jumps the server time to that of the adapter.
  • When the server time and adapter time are off by less than 60ms ntservice slides the server time to that of the adapter.

Server Time Adjustment

There are multiple methods to set or adjust the system time, including:

  • Use the settimeofday(2) system call to set the clock absolutely.
  • Use the adjtime(2) system call to make small adjustments to the system time by advancing or retarding it gradually.
  • (FreeBSD) Use the ntp_adjtime(2) system call to control the server clock frequency.
  • (Linux) Use the adjtimex(2) system call to control the server clock frequency.

The ntp_adjtime and adjtimex system calls are not always available, while settimeofday and adjtime are.

The adapter-to-host implementation uses the settimeofday and adjtime system calls.

Implementation Notes:

  • settimeofday and adjtime used by the implementation to modify the system time do not adjust the frequency of the entity used by the operating system to control the system time.
  • The maximum adjustment possible with adjtime is 500 micro-seconds per second.
  • The adapter time resolution is in nano-seconds but adjtime only supports a resolution of micro-seconds. The synchronization algorithm uses nano-seconds internally.

Monitoring

Monitoring the latest measured OS clock offset and the currently imposed OS clock rate adjustment (in ns/sec) can be done by reading the timesync information using the NTAPI info stream. Furthermore, these values are shown in the monitoring tool, selecting the timesync section and placing the highlight bar on the adapter configured for the adapter-to-host timesync.