HomeFreeBSD

cxgbe: Compute timestamps via sbintime_t.

Description

cxgbe: Compute timestamps via sbintime_t.

This uses fixed-point math already used elsewhere in the kernel for
sub-second time values. To avoid overflows this does require updating
the calibration once a second rather than once every 30 seconds. Note
that the cxgbe driver already queries multiple registers once a second
for the statistics timers. This version also uses fewer instructions
with no branches (for the math portion) in the per-packet fast path.

Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D36663

(cherry picked from commit 2c74c9dac3a6e74a2c33d519cdcf1de145e7664c)

Details

Provenance
jhbAuthored on Sep 26 2022, 9:57 PM
Reviewer
np
Differential Revision
D36663: cxgbe: Compute timestamps via sbintime_t.
Parents
rG454601155778: cxgbe(4): Fix potential integer overflow in t4_tstmp_to_ns.
Branches
Unknown
Tags
Unknown