freebsd-skq/sys
adrian 6898bbc5c8 Implement frame (data) transmission using if_transmit(), rather than
if_start().

This removes the overlapping data path TX from occuring, which
solves quite a number of the potential TX queue races in ath(4).
It doesn't fix the net80211 layer TX queue races and it doesn't
fix the raw TX path yet, but it's an important step towards this.

This hasn't dropped the TX performance in my testing; primarily
because now the TX path can quickly queue frames and continue
along processing.

This involves a few rather deep changes:

* Use the ath_buf as a queue placeholder for now, as we need to be
  able to support queuing a list of mbufs (ie, when transmitting
  fragments) and m_nextpkt can't be used here (because it's what is
  joining the fragments together)

* if_transmit() now simply allocates the ath_buf and queues it to
  a driver TX staging queue.

* TX is now moved into a taskqueue function.

* The TX taskqueue function now dequeues and transmits frames.

* Fragments are handled correctly here - as the current API passes
  the fragment list as one mbuf list (joined with m_nextpkt) through
  to the driver if_transmit().

* For the couple of places where ath_start() may be called (mostly
  from net80211 when starting the VAP up again), just reimplement
  it using the new enqueue and taskqueue methods.

What I don't like (about this work and the TX code in general):

* I'm using the same lock for the staging TX queue management and the
  actual TX.  This isn't required; I'm just being slack.

* I haven't yet moved TX to a separate taskqueue (but the taskqueue is
  created); it's easy enough to do this later if necessary.  I just need
  to make sure it's a higher priority queue, so TX has the same
  behaviour as it used to (where it would preempt existing RX..)

* I need to re-review the TX path a little more and make sure that
  ieee80211_node_*() functions aren't called within the TX lock.
  When queueing, I should just push failed frames into a queue and
  when I'm wrapping up the TX code, unlock the TX lock and
  call ieee80211_node_free() on each.

* It would be nice if I could hold the TX lock for the entire
  TX and TX completion, rather than this release/re-acquire behaviour.
  But that requires that I shuffle around the TX completion code
  to handle actual ath_buf free and net80211 callback/free outside
  of the TX lock.  That's one of my next projects.

* the ic_raw_xmit() path doesn't use this yet - so it still has
  sequencing problems with parallel, overlapping calls to the
  data path.  I'll fix this later.

Tested:

* Hostap - AR9280, AR9220
* STA - AR5212, AR9280, AR5416
2013-01-15 18:01:23 +00:00
..
amd64 Add VirtIO to the i386 and amd64 GENERIC kernels 2013-01-13 07:14:16 +00:00
arm Add mistakenly removed third clause to license 2013-01-15 09:56:20 +00:00
boot Initial support for Allwinner A10 SoC (Cubieboard) 2013-01-15 08:26:16 +00:00
bsm Merge OpenBSM 1.2-alpha2 changes from contrib/openbsm to 2012-12-01 13:46:37 +00:00
cam - Add missig xpt_schedule() call for cases when requested immediate CCB 2013-01-11 19:11:56 +00:00
cddl For zfs vnodes, use the standard inode number based hash algorithm. 2013-01-14 05:45:33 +00:00
compat Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
conf Partially merge Perforce changeset 219942 to head: 2013-01-13 16:51:57 +00:00
contrib Use the right USB clock type on the EdgeRouter Lite. This fixes USB. 2013-01-02 23:29:54 +00:00
crypto
ddb
dev Implement frame (data) transmission using if_transmit(), rather than 2013-01-15 18:01:23 +00:00
fs The current default size of the nullfs hash table used to lookup the 2013-01-14 05:44:47 +00:00
gdb
geom Allow to insert new component to geom_raid3 without specifying number. 2013-01-15 10:06:35 +00:00
gnu/fs r16312 is not any longer real since many years (likely since when VFS 2012-11-19 22:43:45 +00:00
i386 Add VirtIO to the i386 and amd64 GENERIC kernels 2013-01-13 07:14:16 +00:00
ia64 Remove firewire devices missed in r244992. 2013-01-04 15:29:50 +00:00
isa
kern - Detect when we are in KVM. 2013-01-15 14:05:59 +00:00
kgssapi Piete.Brooks at cl.cam.ac.uk reported via email a crash which was 2012-12-18 00:25:48 +00:00
libkern
mips Partially merge Perforce changeset 219938 to head: 2013-01-13 16:27:56 +00:00
modules cxgbe(4): Updates to the hardware L2 table management code. 2013-01-14 20:36:22 +00:00
net - Add dashes before copyright notices. 2013-01-07 19:36:11 +00:00
net80211 Remove the use of the ifnet send queue and if_start() in the power 2013-01-15 17:50:07 +00:00
netatalk Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netgraph Use DEVMETHOD_END, as suggested by hselasky@. 2012-12-26 19:14:21 +00:00
netinet Don't drop options from the third retransmitted SYN by default. If the 2013-01-09 20:27:06 +00:00
netinet6 Simplify in6_setscope() function to get better performance. 2013-01-10 00:10:24 +00:00
netipsec Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netipx Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netnatm Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netncp Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
netpfil In netpfil/pf: 2012-12-28 09:19:49 +00:00
netsmb Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nfs Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nfsclient Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsserver Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nlm
ofed Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
opencrypto
pc98 MFi386: Make similar changes that were made to atkbdc in r245315. 2013-01-11 23:42:24 +00:00
pci Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
powerpc Enable the UFS quotas for big-iron GENERIC kernels. 2013-01-03 19:03:41 +00:00
rpc Add support for backchannels to the kernel RPC. Backchannels 2012-12-08 00:29:16 +00:00
security Four .c files from OpenBSM are used, in modified form, by the kernel to 2012-12-15 15:21:09 +00:00
sparc64 Revert bogus part of r241740. 2013-01-03 23:12:08 +00:00
sys Rearrange the struct bufobj and struct vnode layouts to reduce 2013-01-14 05:46:49 +00:00
teken
tools Fix build on ARM (and probably other platforms) 2012-12-28 06:52:53 +00:00
ufs Add flags argument to vfs_write_resume() and remove 2013-01-11 06:08:32 +00:00
vm - Get rid of unused function vmspace_wired_count(). 2013-01-14 12:12:56 +00:00
x86 Add macros required to enable VMX operation on Intel processors. 2013-01-05 04:20:14 +00:00
xdr
xen
Makefile Run cscope with the -v parameter to make it more user-friendly. 2012-12-02 20:51:24 +00:00