freebsd-dev/sys/net
Robert Watson d989c7b389 Introduce a netisr to deliver kernel-generated routing, avoiding
recursive entering of the socket code from the routing code:

- Modify rt_dispatch() to bundle up the sockaddr family, if any,
  associated with a pending mbuf to dispatch to routing sockets, in
  an m_tag on the mbuf.

- Allocate NETISR_ROUTE for use by routing sockets.

- Introduce rtsintrq, an ifqueue to be used by the netisr, and
  introduce rts_input(), a function to unbundle the tagged sockaddr
  and inject the mbuf and address into raw_input(), which previously
  occurred in rt_dispatch().

- Introduce rts_init() to initialize rtsintrq, its mutex, and
  register the netisr.  Perform this at the same point in system
  initialization as setup of the domains.

This change introduces asynchrony between the generation of a
pending routing socket message and delivery to sockets for use
by userspace.  It avoids socket->routing->rtsock->socket use and
helps to avoid lock order reversals between the routing code and
socket code (in particular, raw socket control blocks), as route
locks are held over calls to rt_dispatch().

Reviewed by:		"George V.Neville-Neil" <gnn@neville-neil.com>
Conceptual head nod by:	sam
2004-06-09 02:48:23 +00:00
..
bpf_compat.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bpf_filter.c
bpf.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bpf.h Make the comment for DLT_NULL slightly more accurate. 2004-05-30 17:03:48 +00:00
bpfdesc.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bridge.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
bridge.h
bsd_comp.c
ethernet.h Add helper functions to calculate the standard ethernet CRC in 2004-06-02 21:34:14 +00:00
fddi.h
if_arc.h
if_arcsubr.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_arp.h
if_atm.h
if_atmsubr.c This commit does two things: 2004-04-25 09:24:52 +00:00
if_disc.c
if_dl.h
if_ef.c Remove another redundant if_output initialization. 2004-05-24 11:01:45 +00:00
if_ethersubr.c Add helper functions to calculate the standard ethernet CRC in 2004-06-02 21:34:14 +00:00
if_faith.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_fddisubr.c This commit does two things: 2004-04-25 09:24:52 +00:00
if_gif.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_gif.h Properly detect loops by recording the interface pointer in an mtag. 2004-04-05 16:55:15 +00:00
if_gre.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_gre.h Lock down global variables in if_gre: 2004-03-22 16:04:43 +00:00
if_iso88025subr.c This commit does two things: 2004-04-25 09:24:52 +00:00
if_llc.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
if_loop.c
if_media.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_media.h
if_mib.c
if_mib.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
if_ppp.c First pass at softc list locking for if_ppp.c. Many parts of 2004-04-19 01:36:24 +00:00
if_ppp.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
if_pppvar.h Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
if_sl.c Use ldisc_[de]register() instead of frobbing linesw[] directly. 2004-06-07 20:43:37 +00:00
if_slvar.h
if_sppp.h
if_spppsubr.c Keepalive timer should be added if we does not have any sppp consumers before 2004-05-25 21:54:07 +00:00
if_stf.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_stf.h
if_tap.c add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
if_tap.h
if_tapvar.h Add tap_mtx to tap_softc in order to protect per-softc variables 2004-03-17 01:09:59 +00:00
if_tun.c
if_tun.h Implement TUN[GS]IFHEAD ioctls. Passing a non-zero int to TUNSIFHEAD 2000-01-23 01:47:12 +00:00
if_types.h
if_var.h Link state change notification of ethernet media to the routing socket. 2004-05-03 13:48:35 +00:00
if_vlan_var.h A network interface driver can support IFCAP_VLAN_MTU only, 2004-01-18 19:29:04 +00:00
if_vlan.c if_printf() won't emit a newline unless told to. 2004-05-26 11:41:26 +00:00
if.c arpcom untangling: 2004-04-24 22:24:48 +00:00
if.h Link state change notification of ethernet media to the routing socket. 2004-05-03 13:48:35 +00:00
iso88025.h Fix whitespace issues. 2003-03-15 23:55:33 +00:00
net_osdep.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
net_osdep.h - update comments to refrect recent BSDs. 2003-11-04 14:08:31 +00:00
netisr.c o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netisr.h Introduce a netisr to deliver kernel-generated routing, avoiding 2004-06-09 02:48:23 +00:00
pfil.c o update PFIL_HOOKS support to current API used by netbsd 2003-09-23 17:54:04 +00:00
pfil.h
pfkeyv2.h
ppp_comp.h Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-24 09:34:04 +00:00
ppp_deflate.c
ppp_defs.h
ppp_tty.c
radix.c Readability fixes: 2004-04-21 15:27:36 +00:00
radix.h
raw_cb.c
raw_cb.h
raw_usrreq.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
route.c fix one typo and remove one wrong line 2004-04-25 01:39:00 +00:00
route.h document the locking behaviour of the functions that access 2004-04-24 23:34:04 +00:00
rtsock.c Introduce a netisr to deliver kernel-generated routing, avoiding 2004-06-09 02:48:23 +00:00
slcompress.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
slcompress.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
slip.h
zlib.c
zlib.h Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other 2002-05-29 20:24:09 +00:00