The NetBSD Project

CVS log for src/usr.bin/netstat/vtw.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / netstat

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.9.8.1: download - view: text, markup, annotated - select for diffs
Mon Sep 12 14:29:19 2022 UTC (2 years, 4 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +45 -16 lines
Pull up the following, requested by msaitoh in ticket #1762:

	usr.bin/netstat/atalk.c		1.18,1.20-1.21
	usr.bin/netstat/bpf.c		1.16 via patch
	usr.bin/netstat/fast_ipsec.c	1.24 via patch
	usr.bin/netstat/if.c		1.97-1.99,1.101-1.104 via patch
	usr.bin/netstat/inet.c		1.111,1.115-1.116 via patch
	usr.bin/netstat/inet6.c		1.70,1.74-1.75,1.80-1.81 via patch
	usr.bin/netstat/main.c		1.100,1.102-1.103
	usr.bin/netstat/mbuf.c		1.34-1.35
	usr.bin/netstat/mroute.c	1.26-1.27
	usr.bin/netstat/mroute6.c	1.16
	usr.bin/netstat/netstat.h	1.52-1.53
	usr.bin/netstat/pfkey.c		1.4-1.5 via patch
	usr.bin/netstat/pfsync.c	1.4-1.5 via patch
	usr.bin/netstat/route.c		1.87-1.88
	usr.bin/netstat/unix.c		1.36-1.37
	usr.bin/netstat/vtw.c		1.11,1.13

- Add names of a few more ICMPv6 messages.
  Also make the array be explicitly 256 entries long.
- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- netstat.1: Add various xrefs present in the body to "See Also".
- Limit maximum owner name to appease gcc.
- KNF. Style fixes.

Revision 1.10.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 12 14:23:41 2022 UTC (2 years, 4 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +45 -16 lines
Pull up the following, requested by msaitoh in ticket #1522:

	usr.bin/netstat/atalk.c		1.18,1.20-1.21
	usr.bin/netstat/bpf.c		1.16 via patch
	usr.bin/netstat/fast_ipsec.c	1.24
	usr.bin/netstat/if.c		1.97-1.99,1.101-1.104 via patch
	usr.bin/netstat/inet.c		1.111,1.115-1.116 via patch
	usr.bin/netstat/inet6.c		1.74-1.75,1.80-1.81 via patch
	usr.bin/netstat/main.c		1.100-1.103
	usr.bin/netstat/mbuf.c		1.35
	usr.bin/netstat/mroute.c	1.26-1.27
	usr.bin/netstat/mroute6.c	1.16
	usr.bin/netstat/netstat.h	1.52-1.53
	usr.bin/netstat/pfkey.c		1.4-1.5 via patch
	usr.bin/netstat/pfsync.c	1.4-1.5 via patch
	usr.bin/netstat/route.c		1.86-1.88
	usr.bin/netstat/unix.c		1.36-1.37
	usr.bin/netstat/vtw.c		1.11,1.13

- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Fix netstat -rs to print it correctly.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- Remove Network ATM soft intr queue reporting, we don't have that
  in the kernel anymore.
- netstat.1: Add various xrefs present in the body to "See Also".
- KNF. Style fixes.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Sep 1 10:10:20 2022 UTC (2 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +15 -18 lines
KNF. No functional change.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Oct 30 11:23:07 2021 UTC (3 years, 2 months ago) by nia
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +29 -20 lines
netstat(1): convert malloc(x * y) and realloc(x * y) to reallocarr

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Mar 2 01:02:12 2021 UTC (3 years, 10 months ago) by simonb
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +34 -2 lines
Don't show any of the completely and utterly undocumented VTW info if
the feature isn't enabled (by checking net.inet.tcp.vtw.enable).

Revision 1.9.14.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:18 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +2 -3 lines
Sync with HEAD

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu May 3 07:13:48 2018 UTC (6 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp
Branch point for: netbsd-9
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -3 lines
Remove now unused tcpip.h includes. Some were already unused before.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Feb 29 18:19:46 2016 UTC (8 years, 10 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -6 lines
PR/50873: David Binderman: use logical or instead of arithmetic

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Jun 16 22:54:10 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3 lines
fix some error handling.

Revision 1.6.10.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:05:01 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +4 -9 lines
Rebase to HEAD as of a few days ago.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:46 2014 UTC (10 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +4 -9 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Oct 18 20:26:45 2013 UTC (11 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -9 lines
- avoid pointer gymnastics
- remove unused variables

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed May 11 15:08:59 2011 UTC (13 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, cherry-xenmp-base, cherry-xenmp, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +15 -2 lines
use getmicrouptime(9) rather than microtime(9) for TIME_WAIT duration
calculation, because this doesn't get confused by system time changes,
and uses less CPU cycles
reviewed by dyoung

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue May 10 04:40:16 2011 UTC (13 years, 8 months ago) by enami
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -4 lines
Use ptrdiff_t to hold pointer difference to avoid coredump on LP64 system.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed May 4 03:43:30 2011 UTC (13 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3 lines
Use %zx for _both_ size_t formats!

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed May 4 01:31:40 2011 UTC (13 years, 8 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
On second thought, make a more conservative change: use %zx instead of
%x for size_t.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 4 01:30:01 2011 UTC (13 years, 8 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
Use %zu format for size_t instead of %x.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 3 18:28:46 2011 UTC (13 years, 8 months ago) by dyoung
Branches: MAIN
Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>