freebsd-src/sys
Konstantin Belousov ef23f141bc Implement hardware mlx5(4) rx timestamps.
Driver support is only provided for ConnectX4/5.

System-time timestamp is calculated based on the free-running counter
timestamp provided by hardware.  Driver periodically samples the
counter to calibrate it against the system clock and uses linear
interpolation to convert.  Stability of the crystal which drives the
clock is +-50 ppm at the operational temperature, which makes the
algorithm good enough.

The calculation is somewhat delicate because all values are 64bit and
overflow the naive formula for linear interpolation.  The calculation
drops the least significant bits in advance, see the PREC shift in
mlx5_mbuf_tstmp().

Hardware stamps can be turned off by 'ifconfig mceN -hwrxtsmp'.  Buggy
firmware might result in small but visible errors in the reported
timestamps, detectable e.g. by nonsensical (negative) RTT values for
LAN pings.

Reviewed by:	gallatin, hselasky
Sponsored by:	Mellanox Technologies
Differential revision:	https://reviews.freebsd.org/D12638
2017-11-29 10:04:11 +00:00
..
amd64 Disable vim syntax highlighting. 2017-11-28 18:23:17 +00:00
arm sys/arm: further adoption of SPDX licensing ID tags. 2017-11-27 15:04:10 +00:00
arm64 Fix the direction we move the instruction to retuirn to after exiting the 2017-11-28 16:26:56 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam sys/cam: further adoption of SPDX licensing ID tags. 2017-11-27 15:12:43 +00:00
cddl Don't use pcpu_find() to determine if a CPU ID is valid. 2017-11-27 18:42:23 +00:00
compat Disable vim syntax highlighting. 2017-11-28 18:23:17 +00:00
conf Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for 2017-11-25 21:45:51 +00:00
contrib Switch the default firmware for npe(4) from the QOS_VLAN one to the 2017-11-24 15:48:17 +00:00
crypto sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ddb Make kdb_reenter() silent when explicitly called from db_error(). 2017-11-28 12:53:55 +00:00
dev Implement hardware mlx5(4) rx timestamps. 2017-11-29 10:04:11 +00:00
dts dts: arm64: allwinner: Remove unused dts for pine64 2017-11-18 21:39:54 +00:00
fs sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom sys/geom: adoption of SPDX licensing ID tags. 2017-11-27 15:17:37 +00:00
gnu Update our copy of DTS from the ones from Linux 4.14 2017-11-18 15:46:48 +00:00
i386 Disable vim syntax highlighting. 2017-11-28 18:23:17 +00:00
isa sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
kern Eliminate kmem_arena and kmem_object in preparation for further NUMA commits. 2017-11-28 23:40:54 +00:00
kgssapi sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
libkern sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
mips sys/mips: further adoption of SPDX licensing ID tags. 2017-11-27 15:07:26 +00:00
modules siba(4): Add support for devices have neither PMU nor PWRCTL support. 2017-11-28 00:42:44 +00:00
net Disallow TUN and TAP character device IOCTLs to modify the network device 2017-11-29 09:40:11 +00:00
net80211 sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netgraph sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netinet sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netinet6 sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netipsec sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netpfil sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netsmb sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfs sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsclient sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ofed sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
opencrypto
powerpc Only check the page tables if within the KVA. 2017-11-29 01:26:07 +00:00
riscv Don't let cpu_set_syscall_retval() clobber exec_setregs(). 2017-11-24 07:35:08 +00:00
rpc sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
security sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
sparc64 sys/sparc64: further adoption of SPDX licensing ID tags. 2017-11-27 15:10:39 +00:00
sys Eliminate kmem_arena and kmem_object in preparation for further NUMA commits. 2017-11-28 23:40:54 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ufs sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
vm Eliminate kmem_arena and kmem_object in preparation for further NUMA commits. 2017-11-28 23:40:54 +00:00
x86 sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00