summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/mbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* Change the "in use" percentage metric to actually display a realbmilekic2000-10-151-9/+14
| | | | "in use" percentage. In other words, show how much of mb_map is in use.
* Replace the mbuf external reference counting code with somethingdwmalone2000-08-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
* Make mbstat.m_mtypes seperate and viewable via sysctl, alsoalfred2000-07-151-25/+49
| | | | | | | expand the size from short to ulong Submitted by: Ian Dowse <iedowse@maths.tcd.ie> PR: kern/19809
* Add display of maximum allowed mbuf count to match mbuf cluster count.msmith1999-12-281-3/+11
| | | | Submitted by: Bosko Milekic <bmilekic@dsuper.net>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix "make world" breakage because MT_RTABLE was still referenced here.roberto1999-01-181-1/+3
|
* Quick hack to allow netstat to compile once more: ifdef out MT_SOOPTSgpalmer1998-08-231-1/+3
|
* Change a variable from int to size_t.jb1998-08-181-3/+3
|
* Fixed printf format errors.bde1998-07-061-4/+5
|
* mbuf, inet, and unix modules no longer read kvm.wollman1998-05-151-3/+2
|
* Output mbuf clusters as current/peak/max. Requires new kern.ipc.nmbclustersdg1998-04-241-5/+11
| | | | sysctl variable (previously committed).
* Add (unsigned) cast to prevent overflow in %ache1997-11-101-2/+2
| | | | Submitted by: "Alex G. Bulushev" <bag@demos.su>
* Bandaid to make this compile.. These old mbuf types should probably bepeter1997-08-171-1/+13
| | | | ripped out.
* Remove prog, unused variables.charnier1997-07-291-0/+5
| | | | Cosmetic in usage string.
* Use the new sysctl(3) interface to mbuf statistics rather thanwollman1997-02-241-7/+19
| | | | groveling about in kmem.
* When the mbuf code was changed to use a private allocator instead ofwollman1997-02-121-3/+4
| | | | | | | the kernel malloc, netstat was never updated to reflect the fact that there are once again allocated-but-free mbufs, just as there are clusters, and so the information presented about how much memory was allocated to the network was bogus. Fixed.
* Code cleanup: remove unused variables, use correct *printf formatalex1996-06-021-4/+4
| | | | | | specifiers (some unsigned values were printed as signed, some longs were printed as ints), and place parentheses around assignments in if statements.
* Changed "mapped pages in use" to "mbuf clusters in use".dg1995-02-231-1/+1
|
* Don't print protocol-cloned routes by default (enabled by -a flag).wollman1995-01-231-3/+2
| | | | | Print non-zero expiration timers. Use err(3) for error reporting.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+122
OpenPOWER on IntegriCloud