freebsd-skq/sys
Robert Watson 292ee7be1c Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,
and move both flags from ifnet.if_flags to ifnet.if_drv_flags, making
and documenting the locking of these flags the responsibility of the
device driver, not the network stack.  The flags for these two fields
will be mutually exclusive so that they can be exposed to user space as
though they were stored in the same variable.

Provide #defines to provide the old names #ifndef _KERNEL, so that user
applications (such as ifconfig) can use the old flag names.  Using the
old names in a device driver will result in a compile error in order to
help device driver writers adopt the new model.

When exposing the interface flags to user space, via interface ioctls
or routing sockets, or the two fields together.  Since the driver flags
cannot currently be set for user space, no new logic is currently
required to handle this case.

Add some assertions that general purpose network stack routines, such
as if_setflags(), are not improperly used on driver-owned flags.

With this change, a large number of very minor network stack races are
closed, subject to correct device driver locking.  Most were likely
never triggered.

Driver sweep to follow; many thanks to pjd and bz for the line-by-line
review they gave this patch.

Reviewed by:	pjd, bz
MFC after:	7 days
2005-08-09 10:16:17 +00:00
..
alpha Add hints for uart(4). These are the same as for sio(4) and make it 2005-08-06 19:24:22 +00:00
amd64 When support for 2MB/4MB pages was added in revision 1.148 an error was 2005-08-07 22:00:47 +00:00
arm - Add support for saving stack traces and displaying them via printf(9) 2005-08-03 04:27:40 +00:00
boot Add if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load, 2005-08-07 09:41:53 +00:00
bsm For consistency with more system include files, add a trailing '_' to 2005-05-29 16:11:34 +00:00
cam Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
coda Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
compat Add missing dependencies on the SYSVIPC modules. 2005-07-29 19:41:04 +00:00
conf Add strcasecmp() and strncasecmp() to libkern and connect to the build. 2005-08-08 18:31:13 +00:00
contrib Prevent a race condition. As pf_send_tcp() - called for expired synproxy 2005-07-20 18:58:27 +00:00
crypto gbde(8) is also rejndael user. 2005-03-11 22:07:04 +00:00
ddb Implement functions calls from within DDB on ia64. On ia64 a function 2005-07-02 23:52:37 +00:00
dev - Use callout_init_mtx() to close a small race between callout_stop() and 2005-08-08 21:03:54 +00:00
doc
fs Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
gdb check return value of gdb_rx_varhex 2005-03-28 18:31:18 +00:00
geom Be case-insensitive when dealing with algorithm names. 2005-08-08 19:40:38 +00:00
gnu Repair this: 2005-07-09 18:30:31 +00:00
i4b Fix some long standing bugs in writing to the BPF device attached to 2005-06-26 18:11:11 +00:00
i386 When support for 2MB/4MB pages was added in revision 1.148 an error was 2005-08-07 22:00:47 +00:00
ia64 Improve SMP support: 2005-08-06 20:28:19 +00:00
isa Add pnp and location info for the ISA bus. The pnp info is the 2005-08-01 07:03:10 +00:00
isofs/cd9660 - Change all filesystems and vfs_cache to relock the dvp once the child is 2005-04-13 10:59:09 +00:00
kern Drop in a WITNESS_WARN into SYSCTL_IN to make sure that we are 2005-08-08 21:06:42 +00:00
libkern Ha! This is a very interesting bug. 2005-08-08 19:38:00 +00:00
modules Connect GEOM_ELI class to the build. 2005-07-27 21:47:55 +00:00
net Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE, 2005-08-09 10:16:17 +00:00
net80211 Split crypto tx+rx key indices and add a key index -> node mapping table: 2005-08-08 18:46:36 +00:00
netatalk Eliminate MAC entry point mac_create_mbuf_from_mbuf(), which is 2005-07-05 23:39:51 +00:00
netatm Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netgraph reorder a couple of cases of void __inline to __inline void 2005-08-08 20:08:44 +00:00
netinet In preparation for fixing races in ARP (and probably in other 2005-08-09 08:39:56 +00:00
netinet6 In preparation for fixing races in ARP (and probably in other 2005-08-09 08:39:56 +00:00
netipsec Correct typo in a comment describing vshiftl(). 2005-06-02 23:56:10 +00:00
netipx Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netkey fix build without option INET6. 2005-07-30 20:10:31 +00:00
netnatm Remove FreeBSD 2.2 protocol usrreq compatibility code. 2005-07-19 13:36:39 +00:00
netncp Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
netsmb Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
nfs Fixes for NFS crashes on architectures that require strict alignment. 2005-07-14 20:08:27 +00:00
nfs4client - We want if (mrep != NULL) not if (m_freem != NULL). m_freem will never 2005-04-25 05:11:19 +00:00
nfsclient FIx for a bug in the change that made nfs_timer() MPSAFE. We need to 2005-07-27 15:06:26 +00:00
nfsserver NFS write gathering defers execution of NFS server write requests to wait 2005-04-17 16:25:36 +00:00
opencrypto malloc.h relies on param.h for a definition of MAXCPU. I guess that there is 2005-05-30 05:01:44 +00:00
pc98 MFi386: revision 1.1204. 2005-07-21 11:13:12 +00:00
pccard Change a directory layout for pc98. 2005-05-10 12:02:18 +00:00
pci Fix up the locking in pcn(4) and mark it MPSAFE. 2005-08-05 16:03:16 +00:00
posix4 Introduce MAC Framework and MAC Policy entry points to label and control 2005-05-04 10:39:15 +00:00
powerpc - Add support for saving stack traces and displaying them via printf(9) 2005-08-03 04:27:40 +00:00
rpc - Don't call rpcclnt_realign() if we don't have any mbufs to realign. 2005-03-19 01:16:25 +00:00
security Insert a series of place-holder function pointers in mac_policy.h for 2005-08-08 16:09:33 +00:00
sparc64 The system tick _compare_ register of USIII CPUs and up is ASR25, not 2005-08-07 13:21:00 +00:00
sys Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
tools Allow EVFILT_VNODE events to work on every filesystem type, not just 2005-06-09 20:20:31 +00:00
ufs Delay freeing disk space for file system blocks until all dirty buffers 2005-07-31 20:24:14 +00:00
vm Use atomic operations on runningbufspace. 2005-08-08 22:44:10 +00:00
Makefile When building cscopnamefile, default architecture to ${MACHINE}, not i386. 2005-03-08 00:09:41 +00:00