opnsense-src/sys
Gleb Smirnoff 4092996774 Big polling(4) cleanup.
o Axe poll in trap.

o Axe IFF_POLLING flag from if_flags.

o Rework revision 1.21 (Giant removal), in such a way that
  poll_mtx is not dropped during call to polling handler.
  This fixes problem with idle polling.

o Make registration and deregistration from polling in a
  functional way, insted of next tick/interrupt.

o Obsolete kern.polling.enable. Polling is turned on/off
  with ifconfig.

Detailed kern_poll.c changes:
  - Remove polling handler flags, introduced in 1.21. The are not
    needed now.
  - Forget and do not check if_flags, if_capenable and if_drv_flags.
  - Call all registered polling handlers unconditionally.
  - Do not drop poll_mtx, when entering polling handlers.
  - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx.
  - In netisr_poll() axe the block, where polling code asks drivers
    to unregister.
  - In netisr_poll() and ether_poll() do polling always, if any
    handlers are present.
  - In ether_poll_[de]register() remove a lot of error hiding code. Assert
    that arguments are correct, instead.
  - In ether_poll_[de]register() use standard return values in case of
    error or success.
  - Introduce poll_switch() that is a sysctl handler for kern.polling.enable.
    poll_switch() goes through interface list and enabled/disables polling.
    A message that kern.polling.enable is deprecated is printed.

Detailed driver changes:
  - On attach driver announces IFCAP_POLLING in if_capabilities, but
    not in if_capenable.
  - On detach driver calls ether_poll_deregister() if polling is enabled.
  - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING
    flag. If there is no, then unlocks and returns.
  - In ioctl handler driver checks for IFCAP_POLLING flag requested to
    be set or cleared. Driver first calls ether_poll_[de]register(), then
    obtains driver lock and [dis/en]ables interrupts.
  - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable.
    If present, then returns.This is important to protect from spurious
    interrupts.

Reviewed by:	ru, sam, jhb
2005-10-01 18:56:19 +00:00
..
alpha Remove the hack to clear the owepreempt flag after running a fast 2005-09-29 19:12:44 +00:00
amd64 Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
arm Add a new atomic_fetchadd() primitive that atomically adds a value to a 2005-09-27 17:39:11 +00:00
boot MFi386: revision 1.33. 2005-09-30 13:24:14 +00:00
bsm
cam
coda
compat Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
conf Remove more OLDCARD references. 2005-09-28 06:05:45 +00:00
contrib
crypto
ddb
dev Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
doc
fs The NWFS code in RELENG_6 is broken due to a typo in 2005-09-30 18:21:05 +00:00
gdb
geom Move some devstat collection to below where large IO operations are chopped 2005-09-30 17:32:08 +00:00
gnu Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
i4b
i386 Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
ia64 Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
isa Fix an endianness issue in pnp_eisaformat(). This corrects printing PnP IDs 2005-09-28 15:01:58 +00:00
isofs/cd9660
kern Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
libkern
modules ciphy wasn't included here. 2005-09-30 14:54:17 +00:00
net Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
net80211
netatalk
netatm
netgraph Remove bridge(4) from the tree. if_bridge(4) is a full functional 2005-09-27 18:10:43 +00:00
netinet Remove bridge(4) from the tree. if_bridge(4) is a full functional 2005-09-27 18:10:43 +00:00
netinet6
netipsec
netipx
netkey
netnatm
netncp
netsmb
nfs
nfs4client
nfsclient
nfsserver Use the refcount API to manage the reference count for user credentials 2005-09-27 18:09:42 +00:00
opencrypto
pc98 Use 'PC Card' 2005-09-30 13:17:54 +00:00
pccard
pci Big polling(4) cleanup. 2005-10-01 18:56:19 +00:00
posix4
powerpc Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t 2005-09-28 14:54:07 +00:00
rpc
security Allow the root user to be aware of other credentials by virtue 2005-09-30 23:41:10 +00:00
sparc64 Add a new atomic_fetchadd() primitive that atomically adds a value to a 2005-09-27 17:39:11 +00:00
sys Un-staticize waitrunningbufspace() and call it before returning from 2005-09-30 18:07:41 +00:00
tools
ufs Un-staticize waitrunningbufspace() and call it before returning from 2005-09-30 18:07:41 +00:00
vm Trim a couple of unneeded includes. 2005-09-29 19:13:52 +00:00
Makefile