HomeFreeBSD

Enable M_TSTMP in Chelsio cxgbe driver by creating a mechanism that can sync…

Description

Enable M_TSTMP in Chelsio cxgbe driver by creating a mechanism that can sync the time.

Chelsio has always been recording a timestamp in the mbuf (rcv_tstmp) but
not setting the M_TSTMP bit in the mbuf flags. This is because the timestamp
was just the free running 60bit clock. This change fixes that so that
we keep a synchronization by periodically (every 30 seconds after startup)
getting the timestamp and the current nanosecond time. We always keep
several sets around and the current one we always keep the current pair
and the previous pair of timestamps. This allows us to setup a ratio
between the two so we can correctly translate the time. Note that
we use special care to split the timestamp into seconds (per the clock tick)
and nanoseconds otherwise 64bit math would overflow.

Reviewed by: np
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D36315

Details

Provenance
rrsAuthored on Sep 20 2022, 7:13 PM
Reviewer
np
Differential Revision
D36315: Enable M_TSTMP in Chelsio cxgbe driver by creating a mechanism that can sync the time.
Parents
rGb77b3099685f: rc.d/var_run: Add needed "shutdown" keyword
Branches
Unknown
Tags
Unknown