freebsd-dev/sbin/ifconfig
Konstantin Belousov 3cf8254f1e Add a place for a driver to report rx timestamps in nanoseconds from
boot for the received packets.

The rcv_tstmp field overlaps the place of Ln header length indicators,
not used by received packets.  The basic pkthdr rearrangement change
in sys/mbuf.h was provided by gallatin.

There are two accompanying M_ flags: M_TSTMP means that there is the
timestamp (and it was generated by hardware).

Another flag M_TSTMP_HPREC indicates that the timestamp is
high-precision.  Practically M_TSTMP_HPREC means that hardware
provided additional precision comparing with the stamps when the flag
is not set.  E.g., for ConnectX all packets are stamped by hardware
when PCIe transaction to write out the completion descriptor is
performed, but PTP packet are stamped on port.  For Intel cards, when
PTP assist is enabled, only PTP packets are stamped in the limited
number of registers, so if Intel cards ever start support this
mechanism, they would always set M_TSTMP | M_TSTMP_HPREC if hardware
timestamp is present for the given packet.

Add IFCAP_HWRXTSTMP interface capability to indicate the support for
hardware rx timestamping, and ifconfig(8) command to toggle it.

Based on the patch by:	gallatin
Reviewed by:	gallatin (previous version), hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks (? mbuf KBI issue)
X-Differential revision:	https://reviews.freebsd.org/D12638
2017-11-07 09:29:14 +00:00
..
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
af_inet6.c Various Coverity fixes in ifconfig(8) 2017-05-03 17:21:01 +00:00
af_inet.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
af_link.c Selectively print "hwaddr" from ifconfig(8). 2017-08-04 21:06:47 +00:00
af_nd6.c ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP" 2017-05-03 01:46:39 +00:00
carp.c Replace N #defines with nitems to simplify ifconfig code slightly 2015-09-27 07:51:18 +00:00
ifbridge.c [ifconfig] fix a memory leak! 2017-02-20 03:12:46 +00:00
ifclone.c Various Coverity fixes in ifconfig(8) 2017-05-03 17:21:01 +00:00
ifconfig.8 Document in ifconfig(8) that gre(4) accepts tunnel commands 2017-04-29 15:35:30 +00:00
ifconfig.c Add a place for a driver to report rx timestamps in nanoseconds from 2017-11-07 09:29:14 +00:00
ifconfig.h ifconfig(8): can't use 'name' or 'description' when creating interface with auto numbering 2016-02-20 11:36:35 +00:00
iffib.c Use strlcpy() instead of strncpy() when copying ifname to ensure 2016-05-16 00:25:24 +00:00
ifgif.c - Remove GIF_{SEND,ACCEPT}_REVETHIP. 2015-09-10 05:59:39 +00:00
ifgre.c Use strlcpy() instead of strncpy() when copying ifname to ensure 2016-05-16 00:25:24 +00:00
ifgroup.c Replace N #defines with nitems to simplify ifconfig code slightly 2015-09-27 07:51:18 +00:00
ifieee80211.c [ifconfig] add some comments around missing net80211 VHT configuration. 2017-03-31 22:05:10 +00:00
ifipsec.c Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
iflagg.c Various Coverity fixes in ifconfig(8) 2017-05-03 17:21:01 +00:00
ifmac.c Use strlcpy() instead of strncpy() when copying ifname to ensure 2016-05-16 00:25:24 +00:00
ifmedia.c Fix a comment that's been wrong ever since this file was imported in 1997 2017-05-01 01:42:26 +00:00
ifpfsync.c Various Coverity fixes in ifconfig(8) 2017-05-03 17:21:01 +00:00
ifvlan.c Add support to priority code point (PCP) that is an 3-bit field 2016-06-06 09:51:58 +00:00
ifvxlan.c Replace N #defines with nitems to simplify ifconfig code slightly 2015-09-27 07:51:18 +00:00
Makefile Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sfp.c Use macro MIN() from sys/param.h. 2016-04-27 02:02:44 +00:00