freebsd-nq/sys/dev
Adrian Chadd 8e7393944d Push the actual TX processing into the ath taskqueue, rather than having
it run out of multiple concurrent contexts.

Right now the ath(4) TX processing is a bit hairy. Specifically:

* It was running out of ath_start(), which could occur from multiple
  concurrent sending processes (as if_start() can be started from multiple
  sending threads nowdays.. sigh)

* during RX if fast frames are enabled (so not really at the moment, not
  until I fix this particular feature again..)

* during ath_reset() - so anything which calls that

* during ath_tx_proc*() in the ath taskqueue - ie, TX is attempted again
  after TX completion, as there's now hopefully some ath_bufs available.

* Then, the ic_raw_xmit() method can queue raw frames for transmission
  at any time, from any net80211 TX context. Ew.

This has caused packet ordering issues in the past - specifically,
there's absolutely no guarantee that preemption won't occuring _during_
ath_start() by the TX completion processing, which will call ath_start()
again. It's a mess - 802.11 really, really wants things to be in
sequence or things go all kinds of loopy.

So:

* create a new task struct for TX'ing;
* make the if_start method simply queue the task on the ath taskqueue;
* make ath_start() just be called by the new TX task;
* make ath_tx_kick() just schedule the ath TX task, rather than directly
  calling ath_start().

Now yes, this means that I've taken a step backwards in terms of
concurrency - TX -and- RX now occur in the same single-task taskqueue.
But there's nothing stopping me from separating out the TX / TX completion
code into a separate taskqueue which runs in parallel with the RX path,
if that ends up being appropriate for some platforms.

This fixes the CCMP/seqno concurrency issues that creep up when you
transmit large amounts of uni-directional UDP traffic (>200MBit) on a
FreeBSD STA -> AP, as now there's only one TX context no matter what's
going on (TX completion->retry/software queue,
userland->net80211->ath_start(), TX completion -> ath_start());
but it won't fix any concurrency issues between raw transmitted frames
and non-raw transmitted frames (eg EAPOL frames on TID 16 and any other
TID 16 multicast traffic that gets put on the CABQ.)  That is going to
require a bunch more re-architecture before it's feasible to fix.

In any case, this is a big step towards making the majority of the TX
path locking irrelevant, as now almost all TX activity occurs in the
taskqueue.

Phew.
2012-10-14 20:44:08 +00:00
..
aac Some aac(4) adapters will always report that a direct access device is 2012-09-25 19:12:12 +00:00
acpi_support acpi_wmi: move wmi_info_list into sc 2012-10-14 09:31:11 +00:00
acpica acpi_thermal: when _ACx is tripped, all _ALi i>= x should be on 2012-10-14 09:32:38 +00:00
adb Release the ADB keyboard mutex when handling the power button 2012-06-23 13:52:44 +00:00
adlink
advansys Add locking to adv(4) driver and mark it MPSAFE. 2012-10-12 21:31:44 +00:00
ae Fix the build. 2012-06-06 09:07:50 +00:00
age
agp After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason 2012-08-05 14:11:42 +00:00
aha
ahb
ahci Switch some PCI register reads from using magic numbers to using the names 2012-09-19 12:27:23 +00:00
aic
aic7xxx In sys/dev/aic7xxx/aic79xx_osm.c, function ahd_attach(), initialize the 2012-08-06 20:01:32 +00:00
alc Switch some PCI register reads from using magic numbers to using the names 2012-09-19 12:27:23 +00:00
ale Fix typo. Check against number of allocated MSI-X vectors. 2012-10-08 07:01:07 +00:00
altera Correct double "the the" 2012-09-14 21:28:56 +00:00
amdsbwd
amdtemp
amr Further adjust the workaround in r234501. Rounding all small requests up 2012-10-05 15:52:31 +00:00
an
arcmsr Fix typo: s/unknow/unknown 2012-10-09 06:15:16 +00:00
asmc
asr
ata Add checks for ata_sata_scr_read() return statuses. It is mostly to silence 2012-10-10 17:51:23 +00:00
ath Push the actual TX processing into the ath taskqueue, rather than having 2012-10-14 20:44:08 +00:00
atkbdc Fix typo: s/protocl/protocol 2012-09-20 10:07:31 +00:00
auxio
bce Remove a spurious bace which cause build fail in case BCE_DEBUG option 2012-08-06 22:53:24 +00:00
bfe
bge Add APE firmware support and improve firmware handshake procedure. 2012-10-11 06:43:43 +00:00
bktr Revert previous commit... 2012-10-10 08:36:38 +00:00
bm
buslogic Correct double "the the" 2012-09-14 21:28:56 +00:00
bwi Add opt_wlan.h includes, so IEEE80211_* configuration changes are 2012-05-12 15:11:53 +00:00
bwn
bxe The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
cardbus
cas
ce
cesa Add support for Marvell 88F6282. 2012-07-28 21:56:24 +00:00
cfe
cfi
ciss
cm
cmx
coretemp
cp
cpuctl
cpufreq
cs
ct Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
ctau
cx
cxgb Revert previous commit... 2012-10-10 08:36:38 +00:00
cxgbe Temporary fix for kern/172364. 2012-10-12 21:58:21 +00:00
cy
dc - Change the module order of these MAC drivers to be last so they are 2012-05-11 02:40:40 +00:00
dcons
de
digi
dpms
dpt
drm Streamline use of cdevpriv and correct some corner cases. 2012-08-15 16:19:39 +00:00
drm2 Revert previous commit... 2012-10-10 08:36:38 +00:00
e1000 The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
ed
eisa
en
ep
esp - Merge from NetBSD: 2012-08-06 08:58:54 +00:00
et Align the PCI Express #defines with the style used for the PCI-X 2012-09-18 22:04:59 +00:00
etherswitch Fix tiypo. 2012-10-11 21:19:42 +00:00
ex
exca
fatm
fb Piggyback MIPS changes and add ARM syscons support for devices with 2012-08-25 23:59:31 +00:00
fdc
fdt If virtual addresses are not set use one to one mapping. 2012-09-14 09:45:13 +00:00
fe
filemon There's no need to make filemon specific to i386 and amd64. All 2012-07-02 20:36:26 +00:00
firewire Fix an issue that caused the kernel to panic inside CTL when trying 2012-06-26 14:51:35 +00:00
flash Add more SPI flash IDs. 2012-09-25 22:12:07 +00:00
fxp - Change the module order of these MAC drivers to be last so they are 2012-05-11 02:40:40 +00:00
gem
glxiic
glxsb
gpio
gxemul Correct an error in gxemul_disk_write(). It was issuing the command to 2012-09-03 02:32:00 +00:00
hatm
hifn
hme
hpt27xx
hptiop Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices. 2012-08-06 05:27:26 +00:00
hptmv It seems that what the code really meant is that when a write is completed, 2012-09-07 19:00:27 +00:00
hptrr attach_generic causes missing devices in /dev when the driver 2012-06-17 02:46:27 +00:00
hwpmc hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG 2012-09-18 13:33:39 +00:00
ic
ichsmb
ichwd
ida Rework the DMA handling in ida(4) and add locking to make this driver 2012-08-27 17:24:07 +00:00
ie Free result of device_get_children(9). 2012-09-30 09:21:10 +00:00
ieee488
if_ndis
iicbus Remove unused variables. 2012-09-29 16:15:27 +00:00
iir
io
ipmi - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific 2012-09-28 11:59:32 +00:00
ips
ipw
isci Add support for locate LED. 2012-10-10 18:01:56 +00:00
iscsi/initiator Revert previous commit... 2012-10-10 08:36:38 +00:00
isf Add isf(4), a driver for the Intel StrataFlash family of NOR flash parts. 2012-08-25 18:08:20 +00:00
isp Minor correction. 2012-09-17 02:50:16 +00:00
ispfw Switch to using FC-Tape firmware. 2012-07-26 13:58:43 +00:00
iwi
iwn We need to defer passing the DELBA request to the firmware until the aggr 2012-06-27 16:07:01 +00:00
ixgb
ixgbe The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
jme Align the PCI Express #defines with the style used for the PCI-X 2012-09-18 22:04:59 +00:00
joy
kbd
kbdmux
ksyms Streamline use of cdevpriv and correct some corner cases. 2012-08-15 16:19:39 +00:00
le
led
lge
lindev
lmc
malo
mc146818
mca
mcd
md After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason 2012-08-05 14:11:42 +00:00
mem
mfi Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORT 2012-09-26 14:14:06 +00:00
mge Merging of projects/armv6, part 6 2012-08-15 04:07:18 +00:00
mii For 5717C/5719C/5720C and 57765 PHYs, do not perform any special 2012-10-11 06:07:48 +00:00
mk48txx
mlx Remove FreeBSD 4.x compat shims. Verified by md5. 2012-09-26 14:17:14 +00:00
mly Remove bogus break statements. 2012-09-18 02:19:43 +00:00
mmc Remove an unneeded NULL check after M_WAITOK. 2012-09-30 09:26:26 +00:00
mn
mps Add casts to unbreak the i386 PAE build for the mps(4) driver. 2012-10-02 23:04:12 +00:00
mpt Fix an issue that caused the kernel to panic inside CTL when trying 2012-06-26 14:51:35 +00:00
mse
msk
mvs Add support for Marvell 88F6282. 2012-07-28 21:56:24 +00:00
mwl
mxge Revert previous commit... 2012-10-10 08:36:38 +00:00
my
nand Add a driver for the Freescale FCM module in the localbus controller. 2012-07-03 01:00:29 +00:00
ncv Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
netmap Reword comment to try to improve clarity, and fix a typo. 2012-08-13 19:14:45 +00:00
nfe
nge
nmdm
nsp Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
null
nvd Revert previous commit... 2012-10-10 08:36:38 +00:00
nve
nvme Count number of times each queue pair's interrupt handler is invoked. 2012-10-10 23:35:16 +00:00
nvram
nvram2env
nxge
oce The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
ofw - Add OF_hasprop() and ofw_bus_has_prop(). These can be used to check 2012-08-18 11:25:07 +00:00
patm
pbio
pccard Simplify resource activation a bit. 2012-06-28 07:26:44 +00:00
pccbb Restore the PCI bridge configuration upon resume. 2012-07-31 18:47:17 +00:00
pcf
pci Fix zillions of style(9) and spacing bugs introduced by r240981. 2012-09-27 10:46:22 +00:00
pcn
pdq
powermac_nvram "nvram,flash" may not be the first in the compatible list property of the 2012-05-20 02:43:54 +00:00
ppbus
ppc
pst
pty
puc Add support for SIIG Cyber Serial Dual PCI 16C850 2012-08-05 19:37:18 +00:00
qlxgb
quicc
ral Add support for Ralink RT2800/RT3000 chipsets. 2012-05-10 17:41:16 +00:00
random Rename the IVY_RNG option to RDRAND_RNG. 2012-09-13 10:12:16 +00:00
rc
re Switch some PCI register reads from using magic numbers to using the names 2012-09-19 12:27:23 +00:00
rndtest Revert previous commit... 2012-10-10 08:36:38 +00:00
rp
rt
safe
sbni
scc
scd
sdhci Return back double spacing. 2012-07-30 08:56:56 +00:00
sec Recognize version 3.1 of the SEC crypto engine. 2012-05-24 21:24:23 +00:00
sf Remove unused variable mii. 2012-05-11 03:17:32 +00:00
sfxge
sge
si
siba
siis Partially revert r236666: 2012-06-10 11:17:14 +00:00
sio Document some MP assumptions for sio. 2012-06-28 07:28:39 +00:00
sis
sk
smbus
smc
sn
snc
snp
sound Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to 2012-10-09 17:06:31 +00:00
speaker
spibus Fetch the chip select in the bridge driver, like all the other spi 2012-08-23 22:38:37 +00:00
ste
stg Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
stge
streams Revert previous commit... 2012-10-10 08:36:38 +00:00
sym Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user 2012-07-19 14:43:46 +00:00
syscons Piggyback MIPS changes and add ARM syscons support for devices with 2012-08-25 23:59:31 +00:00
tdfx Revert previous commit... 2012-10-10 08:36:38 +00:00
terasic Add terasic_de4led, a led(4) driver for the on-board 8-element LED on the 2012-08-26 09:21:59 +00:00
ti
tl
tpm
trm
tsec Do not reinitialise the interface if it is already running, this prevents the 2012-05-09 00:56:11 +00:00
twa Return CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE instead of CAM_TID_INVALID 2012-06-22 21:46:41 +00:00
twe Remove remaining 4.x compat shims. No resulting changes (verified by 2012-09-07 18:41:19 +00:00
tws Use CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE to report missing targets or 2012-09-24 21:45:41 +00:00
tx
txp
uart Add PrimeCell UART (PL011) driver 2012-08-30 20:31:53 +00:00
ubsec
usb Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, 2012-10-14 19:15:54 +00:00
utopia Revert previous commit... 2012-10-10 08:36:38 +00:00
vge
viawd Fix viawd(4) that was only working as a module. 2012-06-20 09:01:44 +00:00
virtio Fix build with PAE enabled. I doubt any code uses CAM_SCATTER_VALID or 2012-10-12 22:06:06 +00:00
vkbd
vr Convert the if_vr(4) driver model to the interrupt filter model and use 2012-05-12 14:37:25 +00:00
vte
vx
vxge The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
watchdog
wb
wbwd Add device ids for the Winbond 83627DHG-P chip and set the registers to 2012-05-29 16:39:42 +00:00
wds
wi
wl
wpi Add a missing #include, required for IEEE80211_DEBUG. 2012-06-01 06:20:39 +00:00
wtap Don't grab an unreferenced pointer to the VAP bss node. 2012-08-27 23:18:41 +00:00
xe
xen s/ is is / is /g 2012-09-14 22:00:03 +00:00
xl - Change the module order of these MAC drivers to be last so they are 2012-05-11 02:40:40 +00:00