cvs commit: src/sys/netinet in.c in_pcb.c in_pcb.h ip_divert.c raw_ip.c tcp_subr.c udp_usrreq.c src/usr.bin/netstat inet.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Sun Jun 6 19:36:34 PDT 2004
dillon 2004/06/06 19:36:28 PDT
DragonFly src repository
Modified files:
sys/netinet in.c in_pcb.c in_pcb.h ip_divert.c
raw_ip.c tcp_subr.c udp_usrreq.c
usr.bin/netstat inet.c
Log:
Add in_pcbinfo_init() to encapsulate basic structural setup (right now just
the LIST_INIT). Rename inpcbinfo->listhead to inpcbinfo->pcblisthead due
to changes in the API (addition of markers).
Add support for markers in the inpcbinfo->pcblisthead lists of INPCB
structures. Use markers in sysctl output code to iterate through these lists
without losing its place or having to worry about structures being ripped out
from under it. Scrap the original two-pass code.
Redo the sysctl INPCB output code for tcp, udp, and other protocols so we
always output the correct number of structures (as specified in xig_count).
Generate output for all cpus (for TCP). This is accomplished by using
lwkt_setcpu_self() to migrate the kernel thread to each cpu, which allows us
to iterate the list(s) managed by that cpu without having to deal with mutexes
or other forms of locks. Iterations always wind up on the same cpu they began
on.
Redo netstat to properly iterate across as many cpu chunks as the inpcb
sysctl's return, rather then just the first one.
Work-by: Hiten Pandya and Matthew Dillon
Revision Changes Path
1.11 +2 -2 src/sys/netinet/in.c
1.22 +15 -1 src/sys/netinet/in_pcb.c
1.14 +4 -1 src/sys/netinet/in_pcb.h
1.14 +40 -33 src/sys/netinet/ip_divert.c
1.16 +39 -33 src/sys/netinet/raw_ip.c
1.33 +115 -60 src/sys/netinet/tcp_subr.c
1.25 +42 -35 src/sys/netinet/udp_usrreq.c
1.14 +200 -179 src/usr.bin/netstat/inet.c
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/in.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/in_pcb.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/in_pcb.h.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/ip_divert.c.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/raw_ip.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/tcp_subr.c.diff?r1=1.32&r2=1.33&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/udp_usrreq.c.diff?r1=1.24&r2=1.25&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.bin/netstat/inet.c.diff?r1=1.13&r2=1.14&f=u
More information about the Commits
mailing list