Network threading stage 1/3: netisrs are already software interrupts,
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 8 Nov 2003 07:57:52 +0000 (07:57 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 8 Nov 2003 07:57:52 +0000 (07:57 +0000)
commitbf82f9b707378adec83bc6fffddb87994374279c
treec2f5b61fab4cf633d83498865d1c4a180bb502de
parent2179a73068cd4b243c7f8ee654860a6e2905018c
Network threading stage 1/3: netisrs are already software interrupts,
which means they alraedy run in their own thread.  This commit creates
multiple supporting threads for netisrs rather then just one and code
has been added to begin routing packets to particular threads based on
their content.  Eventually this will lead to us being able to isolate and
serialize PCBs in particular threads.  The tail end of the ip_input path's
protocol dispatch, the UIPC (user entry) code, and listen socket have not
been covered yet and still need to be serialized.

A new debugging sysctl, net.inet.ip.mthread_enable, has been added.  It
defaults to 1.  If you set this sysctl 0 netisr processing will revert to
the prior single-threaded behavior.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
Additional-work-by: dillon
22 files changed:
sys/bus/usb/usb_ethersubr.c
sys/conf/files
sys/kern/kern_poll.c
sys/net/netisr.c
sys/net/netisr.h
sys/net/ppp/if_ppp.c
sys/netgraph/netgraph/ng_base.c
sys/netinet/if_ether.c
sys/netinet/ip_demux.c [new file with mode: 0644]
sys/netinet/ip_input.c
sys/netinet/ip_var.h
sys/netinet/tcp_subr.c
sys/netinet/tcp_var.h
sys/netinet/udp_usrreq.c
sys/netinet/udp_var.h
sys/netinet6/ip6_input.c
sys/netproto/atalk/ddp_usrreq.c
sys/netproto/atm/atm_subr.c
sys/netproto/ipx/ipx_input.c
sys/netproto/natm/natm.c
sys/netproto/ns/ns_input.c
sys/sys/msgport.h