freebsd-nq/sys/netinet
Maxim Sobolev 339efd75a4 Add a new socket option SO_TS_CLOCK to pick from several different clock
sources to return timestamps when SO_TIMESTAMP is enabled. Two additional
clock sources are:

o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME);
o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC).

In addition to this, this option provides unified interface to get bintime
(equivalent of using SO_BINTIME), except it also supported with IPv6 where
SO_BINTIME has never been supported. The long term plan is to depreciate
SO_BINTIME and move everything to using SO_TS_CLOCK.

Idea for this enhancement has been briefly discussed on the Net session
during dev summit in Ottawa last June and the general input was positive.

This change is believed to benefit network benchmarks/profiling as well
as other scenarios where precise time of arrival measurement is necessary.

There are two regression test cases as part of this commit: one extends unix
domain test code (unix_cmsg) to test new SCM_XXX types and another one
implementis totally new test case which exchanges UDP packets between two
processes using both conventional methods (i.e. calling clock_gettime(2)
before recv(2) and after send(2)), as well as using setsockopt()+recv() in
receive path. The resulting delays are checked for sanity for all supported
clock types.

Reviewed by:    adrian, gnn
Differential Revision:  https://reviews.freebsd.org/D9171
2017-01-16 17:46:38 +00:00
..
cc Fix a variety of cosmetic typos and misspellings 2017-01-15 18:00:45 +00:00
khelp Remove "long" variables from the TCP stack (not including the modular 2016-10-06 16:28:34 +00:00
libalias
tcp_stacks Followup to mtod removal in main stack (r311225). Continued removal 2017-01-04 04:00:28 +00:00
accf_data.c
accf_dns.c
accf_http.c
icmp6.h
icmp_var.h Use counter_ratecheck() in the ICMP rate limiting. 2016-12-09 17:59:15 +00:00
if_atm.c
if_atm.h
if_ether.c Add GARP retransmit capability 2016-10-02 01:42:45 +00:00
if_ether.h
igmp_var.h
igmp.c
igmp.h
in_cksum.c
in_debug.c
in_fib.c
in_fib.h
in_gif.c
in_jail.c
in_kdtrace.c
in_kdtrace.h
in_mcast.c
in_pcb.c - Revert r300854, r303657 which tried to fix regression from r297225. 2016-10-13 20:15:47 +00:00
in_pcb.h Add spares to struct ifnet and socket for packet pacing and/or general 2016-06-23 21:07:15 +00:00
in_pcbgroup.c
in_prot.c
in_proto.c
in_rmx.c
in_rss.c
in_rss.h
in_systm.h
in_var.h Add GARP retransmit capability 2016-10-02 01:42:45 +00:00
in.c Add GARP retransmit capability 2016-10-02 01:42:45 +00:00
in.h
ip6.h
ip_carp.c Unbreak ip_carp with WITHOUT_INET6 enabled by conditionalizing all IPv6 2016-12-30 21:33:01 +00:00
ip_carp.h
ip_divert.c
ip_divert.h
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_fastfwd.c When we are sending IP fragments, update ip pointers in IP_PROBE() for 2016-12-29 19:57:46 +00:00
ip_fw.h
ip_gre.c
ip_icmp.c Fix build for 32-bit machines. 2016-12-09 20:50:35 +00:00
ip_icmp.h
ip_id.c
ip_input.c Add a new socket option SO_TS_CLOCK to pick from several different clock 2017-01-16 17:46:38 +00:00
ip_ipsec.c
ip_ipsec.h
ip_mroute.c
ip_mroute.h
ip_options.c
ip_options.h
ip_output.c When we are sending IP fragments, update ip pointers in IP_PROBE() for 2016-12-29 19:57:46 +00:00
ip_reass.c
ip_var.h
ip.h
pim_var.h
pim.h
raw_ip.c Ensure that the buffer length and the length provided in the IPv4 2017-01-13 10:55:26 +00:00
sctp_asconf.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_asconf.h Whitespace changes. 2016-12-06 10:21:25 +00:00
sctp_auth.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_auth.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_bsd_addr.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_bsd_addr.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_cc_functions.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_constants.h Cleanup the names of SSN, SID, TSN, FSN, PPID and MID. 2016-12-07 19:30:59 +00:00
sctp_crc32.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_crc32.h Whitespace changes. 2016-12-06 10:21:25 +00:00
sctp_dtrace_declare.h
sctp_dtrace_define.h
sctp_header.h Cleanup the names of SSN, SID, TSN, FSN, PPID and MID. 2016-12-07 19:30:59 +00:00
sctp_indata.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_indata.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_input.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_input.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_lock_bsd.h
sctp_os_bsd.h Whitespace changes. 2016-12-06 10:21:25 +00:00
sctp_os.h
sctp_output.c Consistent handling of errors reported from the lower layer. 2016-12-27 22:14:41 +00:00
sctp_output.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_pcb.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_pcb.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_peeloff.c
sctp_peeloff.h Whitespace changes. 2016-12-06 10:21:25 +00:00
sctp_ss_functions.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_structs.h Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_syscalls.c Use getsock_cap() instead of deprecated fgetsock(). 2017-01-13 16:54:44 +00:00
sctp_sysctl.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_sysctl.h
sctp_timer.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_timer.h
sctp_uio.h Whitespace changes. 2016-12-06 10:21:25 +00:00
sctp_usrreq.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctp_var.h Cleanup the names of SSN, SID, TSN, FSN, PPID and MID. 2016-12-07 19:30:59 +00:00
sctp.h
sctputil.c Whitespace changes. 2016-12-26 11:06:41 +00:00
sctputil.h Whitespace changes. 2016-12-26 11:06:41 +00:00
siftr.c
tcp_debug.c Remove "long" variables from the TCP stack (not including the modular 2016-10-06 16:28:34 +00:00
tcp_debug.h
tcp_fastopen.c
tcp_fastopen.h
tcp_fsm.h
tcp_hostcache.c sysctl net.inet.tcp.hostcache.list in a jail can see connections from other 2017-01-05 17:22:09 +00:00
tcp_hostcache.h Remove "long" variables from the TCP stack (not including the modular 2016-10-06 16:28:34 +00:00
tcp_input.c Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and 2017-01-04 02:19:13 +00:00
tcp_lro.c
tcp_lro.h
tcp_offload.c
tcp_offload.h
tcp_output.c Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and 2017-01-04 02:19:13 +00:00
tcp_pcap.c
tcp_pcap.h
tcp_reass.c
tcp_sack.c Remove a KASSERT which is not always true. 2016-12-25 17:37:18 +00:00
tcp_seq.h Remove "long" variables from the TCP stack (not including the modular 2016-10-06 16:28:34 +00:00
tcp_subr.c Fix DTrace TCP tracepoints to not use mtod() as it is both unnecessary and 2017-01-04 02:19:13 +00:00
tcp_syncache.c Remove assigned only variable. 2016-12-21 22:47:10 +00:00
tcp_syncache.h
tcp_timer.c The code currently resets the keepalive timer each time a packet is 2016-10-14 14:57:43 +00:00
tcp_timer.h
tcp_timewait.c Ensure that TCP state changes to state-closing are reported via dtrace. 2016-11-19 14:45:08 +00:00
tcp_usrreq.c Fix a double-free when an inp transitions to INP_TIMEWAIT state 2016-10-18 07:16:49 +00:00
tcp_var.h Fix slight type mismatch between so_options defined in sys/socketvar.h 2017-01-12 10:14:54 +00:00
tcp.h
tcpip.h
toecore.c
toecore.h
udp_usrreq.c r297225 broke udp_output() for the case where the "addr" argument 2016-10-01 19:39:09 +00:00
udp_var.h
udp.h
udplite.h