freebsd-dev/sys/netinet
Cheng Cui d090464ecd
Change the unit of srtt and rto to usec, inspired by these in struct "tcp_info". Therefore, no need hz and tcp_rtt_scale in the headline of the log. Update the man page as well.
Summary: Simplify srtt and rto values in siftr log.

Test Plan:
Tested in Emulab testbed:
cc@s1:~ % sudo sysctl net.inet.siftr
net.inet.siftr.port_filter: 0
net.inet.siftr.genhashes: 0
net.inet.siftr.ppl: 1
net.inet.siftr.logfile: /var/log/siftr.log
net.inet.siftr.enabled: 0
cc@s1:~ % sudo sysctl net.inet.siftr.port_filter=5001
net.inet.siftr.port_filter: 0 -> 5001
cc@s1:~ % sudo sysctl net.inet.siftr.enabled=1
net.inet.siftr.enabled: 0 -> 1
cc@s1:~ %
cc@s1:~ % iperf -c r1 -n 1M
------------------------------------------------------------
Client connecting to r1, TCP port 5001
TCP window size: 32.0 KByte (default)
------------------------------------------------------------
[  1] local 10.1.1.2 port 33817 connected with 10.1.1.3 port 5001
[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-0.91 sec  1.00 MBytes  9.22 Mbits/sec
cc@s1:~ % sudo sysctl net.inet.siftr.enabled=0
net.inet.siftr.enabled: 1 -> 0

cc@s1:~ % ll /var/log/siftr.log
-rw-r--r--  1 root  wheel    91K Apr 25 09:38 /var/log/siftr.log
cc@s1:~ % cat /var/log/siftr.log
enable_time_secs=1682437111	enable_time_usecs=121115	siftrver=1.3.0	sysname=FreeBSD	sysver=1400088	ipmode=4
o,0x00000000,1682437125.907343,10.1.1.2,33817,10.1.1.3,5001,1073725440,1073725440,2,0,0,0,0,2,536,0,1,672,1000000,32768,0,65536,0,0,0,0,0
i,0x00000000,1682437126.106759,10.1.1.2,33817,10.1.1.3,5001,1073725440,1073725440,2,0,0,0,0,2,536,0,1,672,1000000,32768,0,65536,0,1,0,0,0
o,0x00000000,1682437126.106767,10.1.1.2,33817,10.1.1.3,5001,1073725440,14480,2,65535,65700,9,9,4,1460,201000,1,16778209,803000,33580,0,65700,0,0,0,0,0
o,0x00000000,1682437126.107141,10.1.1.2,33817,10.1.1.3,5001,1073725440,14480,2,65535,65700,9,9,4,1460,201000,1,16778208,803000,33580,60,65700,0,0,0,0,0
...
i,0x00000000,1682437127.016754,10.1.1.2,33817,10.1.1.3,5001,1073725440,606109,1030,748544,66048,9,9,9,1460,100812,1,1008,303000,475948,0,65700,0,0,0,0,0
o,0x00000000,1682437127.016759,10.1.1.2,33817,10.1.1.3,5001,1073725440,606109,1030,748544,66048,9,9,10,1460,100812,1,1011,303000,475948,0,65700,0,0,0,0,0
disable_time_secs=1682437131	disable_time_usecs=767582	num_inbound_tcp_pkts=371	num_outbound_tcp_pkts=186	total_tcp_pkts=557	num_inbound_skipped_pkts_malloc=0	num_outbound_skipped_pkts_malloc=0	num_inbound_skipped_pkts_tcpcb=0	num_outbound_skipped_pkts_tcpcb=0	num_inbound_skipped_pkts_inpcb=0	num_outbound_skipped_pkts_inpcb=0	total_skipped_tcp_pkts=0	flow_list=10.1.1.2;33817-10.1.1.3;5001,

Reviewers: rscheff, tuexen
Approved by: rscheff, tuexen
Subscribers: imp, melifaro, glebius
Differential Revision: https://reviews.freebsd.org/D39803
2023-04-25 13:26:39 -04:00
..
cc Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities. 2023-03-16 11:43:16 -04:00
khelp tcp: provide macros to access inpcb and socket from a tcpcb 2022-11-08 10:24:40 -08:00
libalias libalias: Mark set but unused variables as unused. 2023-04-10 10:35:29 -07:00
netdump IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
tcp_stacks tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
accf_data.c
accf_dns.c
accf_http.c
dccp.h
icmp6.h pf: apply the network stack's ICMP rate limiting to ICMP errors sent by pf 2022-10-14 10:36:16 +02:00
icmp_var.h
if_ether.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
if_ether.h
igmp_var.h igmp: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
igmp.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
igmp.h
in_cksum.c
in_debug.c
in_fib_algo.c
in_fib_dxr.c
in_fib.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
in_fib.h
in_gif.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
in_jail.c jail: convert several functions from int to bool 2023-03-14 21:05:33 -06:00
in_kdtrace.c
in_kdtrace.h tcp: retire TCPDEBUG 2022-12-14 09:54:06 -08:00
in_mcast.c in_mcat.c: change multicast not member condition 2023-03-03 22:25:17 -07:00
in_pcb_var.h inpcb: Avoid inp_cred dereferences in SMR-protected lookup 2023-04-20 12:13:06 -04:00
in_pcb.c tcp_hpts: move HPTS related fields from inpcb to tcpcb 2023-04-25 12:18:33 -07:00
in_pcb.h tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
in_prot.c
in_proto.c netinet*: add back necessary headers 2022-10-26 08:16:44 -07:00
in_rmx.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
in_rss.c
in_rss.h
in_systm.h
in_var.h inet: Simplify if_multiaddrs iteration. 2022-10-08 13:10:07 -04:00
in.c lltable: properly set expire time to 0 for static IPv4 entries. 2023-04-25 10:59:50 +00:00
in.h netinet: Remove the IP(V6)_RSS_LISTEN_BUCKET socket option 2023-02-28 15:57:21 -05:00
ip6.h tcp: use IPV6_FLOWLABEL_LEN 2023-04-11 18:53:51 +02:00
ip_carp_nl.h carp: allow commands to use interface name rather than index 2023-03-31 11:29:58 +02:00
ip_carp.c carp: allow commands to use interface name rather than index 2023-03-31 11:29:58 +02:00
ip_carp.h protosw: separate pr_input and pr_ctlinput out of protosw 2022-08-17 11:50:31 -07:00
ip_divert.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ip_divert.h divert(4): provide statistics 2022-08-30 15:09:21 -07:00
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_fastfwd.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ip_fw.h ipfw: add [fw]mark implementation for ipfw 2023-04-25 12:40:23 +00:00
ip_gre.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ip_icmp.c netinet: Disallow unspecified addresses in ICMP-embedded packets 2023-03-13 10:45:56 -04:00
ip_icmp.h netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
ip_id.c
ip_input.c netinet: Tighten checks for unspecified source addresses 2023-03-06 15:06:00 -05:00
ip_mroute.c ip_mroute: Delete unreachable code 2023-04-23 12:47:57 +08:00
ip_mroute.h
ip_options.c
ip_options.h
ip_output.c netinet: Remove the IP(V6)_RSS_LISTEN_BUCKET socket option 2023-02-28 15:57:21 -05:00
ip_reass.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ip_var.h ipfw: add [fw]mark implementation for ipfw 2023-04-25 12:40:23 +00:00
ip.h ip_reass: retire ipreass_slowtimo() in favor of per-slot callout 2022-09-08 13:49:58 -07:00
pim_var.h
pim.h
raw_ip.c inpcb: Split PCB hash tables 2023-04-20 12:13:06 -04:00
sctp_asconf.c
sctp_asconf.h
sctp_auth.c
sctp_auth.h
sctp_bsd_addr.c
sctp_bsd_addr.h
sctp_cc_functions.c
sctp_constants.h sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_crc32.c
sctp_crc32.h
sctp_header.h sctp: improve negotiation of zero checksum feature 2023-03-15 22:29:52 +01:00
sctp_indata.c
sctp_indata.h
sctp_input.c sctp: enforce Kahn's rule during the handshake 2023-03-16 17:40:40 +01:00
sctp_input.h
sctp_kdtrace.c
sctp_kdtrace.h
sctp_lock_bsd.h
sctp_module.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
sctp_os_bsd.h IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
sctp_os.h
sctp_output.c sctp: fix typo in assignment 2023-03-18 23:58:50 +01:00
sctp_output.h
sctp_pcb.c sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_pcb.h sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_peeloff.c
sctp_peeloff.h
sctp_ss_functions.c sctp: use constants from RFC 8260 to improve compliance 2023-04-23 17:48:05 +02:00
sctp_structs.h sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_syscalls.c sctp: ansify 2023-02-13 18:17:10 +00:00
sctp_sysctl.c sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_sysctl.h sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_timer.c
sctp_timer.h
sctp_uio.h sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctp_usrreq.c sctp: use constants from RFC 8260 to improve compliance 2023-04-23 17:48:05 +02:00
sctp_var.h sctp: minor changes due to upstreaming of Glebs recent changes 2022-11-06 23:06:40 +01:00
sctp.h sctp: use constants from RFC 8260 to improve compliance 2023-04-23 17:48:05 +02:00
sctputil.c sctp: initial implementation of draft-tuexen-tsvwg-sctp-zero-checksum 2023-03-10 01:45:46 +01:00
sctputil.h
siftr.c Change the unit of srtt and rto to usec, inspired by these in struct "tcp_info". Therefore, no need hz and tcp_rtt_scale in the headline of the log. Update the man page as well. 2023-04-25 13:26:39 -04:00
tcp_accounting.h Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities. 2023-03-16 11:43:16 -04:00
tcp_ecn.c tcp: retire TCPDEBUG 2022-12-14 09:54:06 -08:00
tcp_ecn.h tcp: add conservative d.cep accounting algorithm 2022-11-06 12:05:22 +01:00
tcp_fastopen.c tcp: provide macros to access inpcb and socket from a tcpcb 2022-11-08 10:24:40 -08:00
tcp_fastopen.h
tcp_fsm.h tcp: remove a 4.4BSD relic 2022-12-13 20:21:45 -08:00
tcp_hostcache.c
tcp_hpts.c tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
tcp_hpts.h tcp_hpts: move HPTS related fields from inpcb to tcpcb 2023-04-25 12:18:33 -07:00
tcp_input.c tcp: reduce argument list to functions that pass a segment 2023-04-07 12:18:06 -07:00
tcp_log_buf.c We have a TCP_LOG_CONNEND log that should come out at the very last log of every connection. This 2023-04-19 12:54:25 -04:00
tcp_log_buf.h tcp: misc cleanup of options for rack as well as socket option logging. 2023-04-07 10:15:29 -04:00
tcp_lro.c tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
tcp_lro.h tcp_lro: Fix for undefined behaviour. 2023-01-13 11:18:19 +01:00
tcp_offload.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
tcp_offload.h
tcp_output.c tcp: use IPV6_FLOWLABEL_LEN 2023-04-11 18:53:51 +02:00
tcp_pcap.c tcp: embed inpcb into tcpcb 2022-12-07 09:00:48 -08:00
tcp_pcap.h
tcp_ratelimit.c Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities. 2023-03-16 11:43:16 -04:00
tcp_ratelimit.h rack and bbr not loading if TCP_RATELIMIT is not configured. 2023-01-05 11:59:52 -05:00
tcp_reass.c tcp: retire TCPDEBUG 2022-12-14 09:54:06 -08:00
tcp_sack.c tcp: send SACK rescue retransmission also mid-stream 2023-03-28 04:47:01 +02:00
tcp_seq.h
tcp_stats.c tcp: add missing void keyword to tcp_stats_init 2023-02-13 18:38:04 +00:00
tcp_subr.c tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
tcp_syncache.c tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
tcp_syncache.h
tcp_timer.c Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities. 2023-03-16 11:43:16 -04:00
tcp_timer.h tcp: rearrange enum and remove unused variable 2023-02-21 18:26:49 +01:00
tcp_timewait.c tcp_hpts: move HPTS related fields from inpcb to tcpcb 2023-04-25 12:18:33 -07:00
tcp_usrreq.c tcp_hpts: move HPTS related fields from inpcb to tcpcb 2023-04-25 12:18:33 -07:00
tcp_var.h tcp: move HPTS/LRO flags out of inpcb to tcpcb 2023-04-25 12:19:48 -07:00
tcp.h tcp: misc cleanup of options for rack as well as socket option logging. 2023-04-07 10:15:29 -04:00
tcpip.h
toecore.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
toecore.h
udp_usrreq.c inpcb: use family specific sockaddr argument for bind functions 2023-02-15 10:30:16 -08:00
udp_var.h udp: add protocol method declarations to udp_var.h 2022-12-07 11:51:49 -08:00
udp.h
udplite.h