freebsd-skq/sys
adrian 2d28368996 [net80211] address seqno allocation for group addressed frames
After some digging and looking at packet traces, it looks like the
sequence number allocation being done by net80211 doesn't meet
802.11-2012.

Specifically, group addressed frames (broadcast, multicast) have
sequence numbers allocated from a separate pool, even if they're
QoS frames.

This patch starts to try and address this, both on transmit and
receive.

* When receiving, don't throw away multicast frames for now.
  It's sub-optimal, but until we correctly track group addressed
  frames via another TID counter, this is the best we can do.

* When doing A-MPDU checks, don't include group addressed frames
  in the sequence number checks.

* When transmitting, don't allocate group frame sequence numbers
  from the TID, instead use the NONQOS TID for allocation.

This may fix iwn(4) 11n because I /think/ this was one of the
handful of places where ni_txseqs[] was being assigned /outside/
of the driver itself.

This however doesn't completely fix things - notably the way that
TID assignment versus WME assignment for driver hardware queues
will mess up multicast ordering. For example, if all multicast
QoS frames come from one sequence number space but they're
expected to obey the QoS value assigned, they'll end up in
different queues in the hardware and go out in different
orders.

I can't fix that right now and indeed fixing it will require some
pretty heavy lifting of both the WME<->TID QoS assignment, as well
as figuring out what the correct way for drivers to behave.

For example, both iwn(4) and ath(4) shouldn't put QoS multicast
traffic into the same output queue as aggregate traffic, because
the sequence numbers are all wrong. So perhaps the correct thing
to do there is ignore the WME/TID for QoS traffic and map it all
to the best effort queue or something, and ensure it doesn't
muck up the TID/blockack window tracking. However, I'm /pretty/
sure that is still going to happen.

.. maybe I should disable multicast QoS frames in general as well,
but I don't know what that'll do for whatever the current state
of 802.11s mesh support is.

Tested:

* STA mode, ath10k NIC
* AP mode, AR9344/AR9580 AP
* iperf tcp/udp tests with concurrent multicast QoS traffic.

Before this, iperfs would fail pretty quickly because the sending
AP would start sending out QoS multicast frames that would be
out of order from the rest of the TID traffic, causing the blockack
window to get way, way out of sync.

This now doesn't occur.

TODO:

* verify which QoS frames SHOULD be tagged as M_AMPDU_MPDU.
  For example, QoS NULL frames shouldn't be tagged!

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D9357
2017-01-30 01:11:30 +00:00
..
amd64 Do not leave stale 4K TLB entries on pde (superpage) removal or 2017-01-29 19:14:48 +00:00
arm Correct the IT instruction in atomic_fcmpset_64(). 2017-01-29 13:31:56 +00:00
arm64 Implement atomic_fcmpset_* for arm and arm64. 2017-01-28 16:24:06 +00:00
boot Remove "-Xassembler -G0" from CFLAGS. 2017-01-29 11:52:36 +00:00
bsm
cam Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
cddl Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
compat Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
conf Remove non-existent ct(4) dependency for scsi_low.c 2017-01-29 00:12:06 +00:00
contrib Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
dev - Remove i8255.h because it's pc98 device. 2017-01-29 03:34:49 +00:00
fs Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
gdb
geom Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
gnu Add Ingenic X1000 DTS files (unofficial). 2016-11-19 15:03:49 +00:00
i386 Do not leave stale 4K TLB entries on pde (superpage) removal or 2017-01-29 19:14:48 +00:00
isa Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
kern Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
kgssapi
libkern Use time_t for intermediate values to avoid overflow in clock_ts_to_ct 2017-01-24 18:05:29 +00:00
mips As with GENERIC on other architectures, include COMPAT_FREEBSD10 and 2017-01-28 11:38:51 +00:00
modules [am335x] Fix DTB name in LINKS variable 2017-01-29 22:06:52 +00:00
net The stf(4) interface name does not conform with the default naming 2017-01-29 18:41:09 +00:00
net80211 [net80211] address seqno allocation for group addressed frames 2017-01-30 01:11:30 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet Add a knob to change default behavior of inheriting listen socket's tcp stack 2017-01-27 23:10:46 +00:00
netinet6 Garbage collect IFT_IEEE80211 (but leave the define for possible reuse) 2017-01-28 17:08:40 +00:00
netipsec Add direction argument to ipsec_setspidx_inpcb() function. 2017-01-08 12:40:07 +00:00
netnatm
netpfil Do not run the pf purge thread while the VNET variables are not 2017-01-29 02:17:52 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 2016-09-30 08:23:06 +00:00
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
powerpc Avoid using non-zero argument for __builtin_frame_address(). 2017-01-23 04:03:12 +00:00
riscv Add RISC-V support for truss(1) 2017-01-24 09:41:44 +00:00
rpc
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Trim a few comments on platforms that did not implement mmap of /dev/kmem. 2017-01-13 21:52:53 +00:00
sys Remove unused kern_sendfile() declaration. 2017-01-29 12:31:24 +00:00
teken
tests
tools Replace using of objdump with elfdump 2017-01-10 18:46:40 +00:00
ufs ffs_vnops: Simplify extattr access 2017-01-19 16:46:05 +00:00
vm hwpmc: partially depessimize munmap handling if the module is not loaded 2017-01-24 22:00:16 +00:00
x86 Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
xdr
xen "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00