1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-24 16:10:11 +00:00
freebsd/sys
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
..
amd64 Print the %rip value for uprintf_signal. 2012-10-14 17:08:46 +00:00
arm Loop reading the RTC registers until the same values are obtained 2012-10-07 20:36:46 +00:00
boot Since the introduction of the new advanced boot menu (r222417), options like 2012-10-14 06:52:49 +00:00
bsm
cam Add explicit check for not set time inside cam_periph_freeze_after_event(). 2012-10-14 08:50:05 +00:00
cddl Revert previous commit... 2012-10-10 08:36:38 +00:00
compat Revert previous commit... 2012-10-10 08:36:38 +00:00
conf Import a FreeBSD port of the FUSE Linux module. 2012-10-13 23:54:26 +00:00
contrib Fix defines in r241245. We actually don't define FreeBSD. 2012-10-14 15:03:06 +00:00
crypto Revert previous commit... 2012-10-10 08:36:38 +00:00
ddb
dev Push the actual TX processing into the ath taskqueue, rather than having 2012-10-14 20:44:08 +00:00
fs Grammar fixes. 2012-10-14 18:13:33 +00:00
gdb
geom NULL-ify last previously used pointer instead of last possible pointer. 2012-10-10 20:41:37 +00:00
gnu/fs Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
i386 MFamd64: add machdep.uprintf_signal. 2012-10-14 17:09:50 +00:00
ia64 Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
isa
kern Add a KPI to allow to reserve some amount of space in the numvnodes 2012-10-14 19:43:37 +00:00
kgssapi
libkern s/ is is / is /g 2012-09-14 22:00:03 +00:00
mips Correct an error in pmap_pv_reclaim(). It can legitimately encounter 2012-10-14 03:40:08 +00:00
modules Import a FreeBSD port of the FUSE Linux module. 2012-10-13 23:54:26 +00:00
net Revert previous commit... 2012-10-10 08:36:38 +00:00
net80211 Revert previous commit... 2012-10-10 08:36:38 +00:00
netatalk
netgraph Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific 2012-10-11 16:15:18 +00:00
netinet Fix a miss from r241344: in ip_mloopback() we need to go to 2012-10-14 15:08:07 +00:00
netinet6 Cleanup documentation: cloning route support has been removed in r186119. 2012-10-13 09:31:01 +00:00
netipsec Add missing break 2012-09-18 08:00:43 +00:00
netipx
netnatm
netncp
netpfil Revert previous commit... 2012-10-10 08:36:38 +00:00
netsmb
nfs Revert previous commit... 2012-10-10 08:36:38 +00:00
nfsclient
nfsserver Revert previous commit... 2012-10-10 08:36:38 +00:00
nlm
ofed The drbr(9) API appeared to be so unclear, that most drivers in 2012-09-28 18:28:27 +00:00
opencrypto Revert previous commit... 2012-10-10 08:36:38 +00:00
pc98 Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
pci
powerpc Eliminate a stale comment. It describes another use case for the pmap in 2012-09-28 05:30:59 +00:00
rpc rpc: convert all uid and gid variables to u_int. 2012-10-04 04:15:18 +00:00
security
sparc64 Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
sys Add a KPI to allow to reserve some amount of space in the numvnodes 2012-10-14 19:43:37 +00:00
teken
tools Revert previous commit... 2012-10-10 08:36:38 +00:00
ufs Fix up kernel sources to be ready for a 64-bit ino_t. 2012-09-27 23:30:49 +00:00
vm Move vm_page_requeue() to the only file that uses it. 2012-10-13 20:19:43 +00:00
x86 Add an unified macro to deny ability from the compiler to reorder 2012-10-09 14:32:30 +00:00
xdr
xen
Makefile