freebsd-dev/sys/net80211
Adrian Chadd 9764ef21c4 [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
..
_ieee80211.h net80211: allow to configure LDPC support 2017-01-21 14:19:06 +00:00
ieee80211_acl.c These files were getting sys/malloc.h and vm/uma.h with header pollution 2016-02-01 17:41:21 +00:00
ieee80211_action.c [net80211] add placeholders for the VHT action frame handling. 2016-12-31 07:50:14 +00:00
ieee80211_action.h
ieee80211_adhoc.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_adhoc.h
ieee80211_ageq.c These files were getting sys/malloc.h and vm/uma.h with header pollution 2016-02-01 17:41:21 +00:00
ieee80211_ageq.h
ieee80211_alq.c [net80211] extend the net80211 ALQ code to support variable payloads. 2016-11-06 19:18:25 +00:00
ieee80211_alq.h [net80211] extend the net80211 ALQ code to support variable payloads. 2016-11-06 19:18:25 +00:00
ieee80211_amrr.c net80211: ieee80211_ratectl*: switch to reusable KPI 2016-10-02 20:35:55 +00:00
ieee80211_amrr.h
ieee80211_crypto_ccmp.c [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." 2016-11-22 17:36:16 +00:00
ieee80211_crypto_none.c net80211: fix more compiler warnings. 2016-05-19 21:08:33 +00:00
ieee80211_crypto_tkip.c [net80211] handle hardware encryption offload in the receive path 2016-11-19 02:00:24 +00:00
ieee80211_crypto_wep.c [net80211] WEP offload support. 2016-12-22 23:59:53 +00:00
ieee80211_crypto.c [net80211] turn the default TX key configuration (for WEP) into a vap callback. 2016-12-27 06:10:28 +00:00
ieee80211_crypto.h [net80211] turn the default TX key configuration (for WEP) into a vap callback. 2016-12-27 06:10:28 +00:00
ieee80211_ddb.c net80211: fix LOR/deadlock in ieee80211_ff_node_cleanup(). 2016-06-29 17:25:46 +00:00
ieee80211_dfs.c [net80211] migrate the time_* macros to ieee80211_* namespace. 2016-03-30 00:44:10 +00:00
ieee80211_dfs.h
ieee80211_freebsd.c [net80211] Add a variant on ieee80211_get_rx_params() that returns a pointer. 2016-10-23 08:21:35 +00:00
ieee80211_freebsd.h [net80211] add a field for storing a 64 bit TSC. 2016-12-08 07:57:16 +00:00
ieee80211_hostap.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_hostap.h
ieee80211_ht.c [net80211] address seqno allocation for group addressed frames 2017-01-30 01:11:30 +00:00
ieee80211_ht.h [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_hwmp.c net80211: fix more compiler warnings. 2016-05-19 21:08:33 +00:00
ieee80211_input.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_input.h [net80211] address seqno allocation for group addressed frames 2017-01-30 01:11:30 +00:00
ieee80211_ioctl.c net80211: allow to configure LDPC support 2017-01-21 14:19:06 +00:00
ieee80211_ioctl.h [net80211] add VHT ioctl parameters and driver capabilities 2017-01-07 01:59:39 +00:00
ieee80211_mesh.c net80211: fix more compiler warnings. 2016-05-19 21:08:33 +00:00
ieee80211_mesh.h Migrate the 802.11s locks out into ieee80211_freebsd.h, so they can be 2015-05-26 04:25:11 +00:00
ieee80211_monitor.c Begin plumbing ieee80211_rx_stats through the receive path. 2015-05-25 16:37:41 +00:00
ieee80211_monitor.h
ieee80211_node.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_node.h net80211: allow to configure LDPC support 2017-01-21 14:19:06 +00:00
ieee80211_output.c [net80211] address seqno allocation for group addressed frames 2017-01-30 01:11:30 +00:00
ieee80211_phy.c net80211: fix more compiler warnings. 2016-05-19 21:08:33 +00:00
ieee80211_phy.h [net80211] rename 11n rate macros into a useful spot 2016-04-05 22:01:56 +00:00
ieee80211_power.c [net80211] migrate the time_* macros to ieee80211_* namespace. 2016-03-30 00:44:10 +00:00
ieee80211_power.h
ieee80211_proto.c [net80211] add VHT EDCA parameters for WME/QoS mode. 2017-01-10 05:32:02 +00:00
ieee80211_proto.h [net80211] add syncflags methods for the VHT flags configuration. 2017-01-07 07:35:27 +00:00
ieee80211_radiotap.c Remove unused include. 2015-05-25 14:54:10 +00:00
ieee80211_radiotap.h
ieee80211_ratectl_none.c net80211: ieee80211_ratectl*: switch to reusable KPI 2016-10-02 20:35:55 +00:00
ieee80211_ratectl.c [net80211] Begin implementing rate control module stats. 2016-03-16 02:07:04 +00:00
ieee80211_ratectl.h net80211: ieee80211_ratectl*: switch to reusable KPI 2016-10-02 20:35:55 +00:00
ieee80211_regdomain.c ifconfig: set by default FCC regulatory domain for wireless interfaces. 2016-05-26 13:14:08 +00:00
ieee80211_regdomain.h
ieee80211_rssadapt.c net80211: ieee80211_ratectl*: switch to reusable KPI 2016-10-02 20:35:55 +00:00
ieee80211_rssadapt.h
ieee80211_scan_sta.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_scan_sw.c [net80211] don't abort a background scan upon reception of a single packet. 2016-10-28 02:09:45 +00:00
ieee80211_scan_sw.h Break out the current 802.11 software scan methods into an indirect table. 2015-06-08 02:35:43 +00:00
ieee80211_scan.c [net80211] add roaming parameters for 11ac. 2017-01-08 10:13:05 +00:00
ieee80211_scan.h [net80211] add VHT IEs to scan elements. 2017-01-07 01:54:32 +00:00
ieee80211_sta.c [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing. 2017-01-13 07:02:04 +00:00
ieee80211_sta.h
ieee80211_superg.c net80211: remove obsolete comment. 2016-12-07 23:33:59 +00:00
ieee80211_superg.h net80211: fix LOR/deadlock in ieee80211_ff_node_cleanup(). 2016-06-29 17:25:46 +00:00
ieee80211_tdma.c [net80211] Add default parameters for 11ac. 2017-01-10 07:24:29 +00:00
ieee80211_tdma.h Begin plumbing ieee80211_rx_stats through the receive path. 2015-05-25 16:37:41 +00:00
ieee80211_var.h [net80211] prepare configuration checks for VHT, fragment-offload and seqno-offload. 2017-01-27 01:24:24 +00:00
ieee80211_vht.c Fix build without IEEE80211_DEBUG. 2017-01-10 19:28:40 +00:00
ieee80211_vht.h [net80211] create a helper function to calculate the station facing VHT capabilities. 2017-01-10 05:30:15 +00:00
ieee80211_wds.c [net80211] handle hardware encryption offload in the receive path 2016-11-19 02:00:24 +00:00
ieee80211_wds.h
ieee80211_xauth.c These files were getting sys/malloc.h and vm/uma.h with header pollution 2016-02-01 17:41:21 +00:00
ieee80211.c net80211: fix flags setup for HT40 5GHz channels. 2017-01-22 23:45:59 +00:00
ieee80211.h net80211: allow to configure LDPC support 2017-01-21 14:19:06 +00:00