freebsd-dev/sys/net80211
Adrian Chadd e81d909274 [net80211] Handle offloaded AMSDU in AMPDU reordering.
In the 11n world, most NICs did A-MPDU receive/transmit offloading but
not A-MSDU offloading.  So, the net80211 A-MPDU receive path would just
receive MPDUs, do the reordering bit, pass it up to the rest of
net80211 for crypto decap and then do A-MSDU decap before throwing ethernet
frames up to the rest of the system.

However 11ac and 11ax NICs are increasingly doing A-MSDU offload (and
newer 11ax stuff does socket offload, but hey I don't want to scare people
JUST yet) - so although A-MPDU reordering may be done in the OS, A-MSDUs
look like a normal MPDU.  This means that all the MSDUs are actually
faked into a set of MPDUs with matching 802.11 header - the sequence number,
QoS header and any encryption verification bits (like IV) are just copied.

This shows up as MASSIVE packet loss in net80211, cause after the first MPDU
we just toss the rest.

(And don't get me started about ethernet decap with A-MPDU host reordering;
we'll have to cross that bridge for later 11ac and 11ax bits too.)

Anyway, this work changes each A-MPDU reorder slot into an mbufq.
The mbufq is treated as a whole set of frames to pass up to the stack
and reordered/de-duped as a group.  The last frame in the reorder list
is checked to see if it's an A-MSDU final frame so any duplicates are
correctly tossed rather than double-received.  Other than that, the
rest of the logic is unchanged.

The previous commit did a small subset of this - if there wasn't any reordering
going on then it'd accept the A-MSDUs.  This is the rest of the needed work.

This is a no-op for 11n NICs doing A-MPDU reordering but needing software
A-MSDU decap - they aren't tagged as A-MSDU and so any subsequent
frames added to the reorder slot are tossed.

Tested:

* QCA9880 (ath10k/athp) - STA/AP mode;
* RT3593 (if_rsu) - 11n STA+DWDS mode (I'm committing through it rn);
* QCA9380 (if_ath) - STA/AP mode.
2020-06-13 23:35:22 +00:00
..
_ieee80211.h [net80211] Add initial A-MSDU in A-MPDU negotation support. 2020-06-05 07:38:10 +00:00
ieee80211_acl.c
ieee80211_action.c
ieee80211_action.h
ieee80211_adhoc.c [net80211] Send a probe request after IBSS node discovery 2020-06-05 00:11:44 +00:00
ieee80211_adhoc.h
ieee80211_ageq.c
ieee80211_ageq.h
ieee80211_alq.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_alq.h
ieee80211_amrr.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_amrr.h
ieee80211_crypto_ccmp.c
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c
ieee80211_crypto_wep.c
ieee80211_crypto.c net80211: drop m_pullup call from ieee80211_crypto_decap. 2019-01-19 16:04:26 +00:00
ieee80211_crypto.h
ieee80211_ddb.c
ieee80211_dfs.c Do not acquire IEEE80211_LOCK twice in cac_timeout(); reuse 2019-02-02 16:21:23 +00:00
ieee80211_dfs.h
ieee80211_freebsd.c Fix !DEBUGNET build after r362138 2020-06-13 03:16:09 +00:00
ieee80211_freebsd.h Fix !DEBUGNET build after r362138 2020-06-13 03:16:09 +00:00
ieee80211_hostap.c net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
ieee80211_hostap.h
ieee80211_ht.c [net80211] Handle offloaded AMSDU in AMPDU reordering. 2020-06-13 23:35:22 +00:00
ieee80211_ht.h [net80211] Handle offloaded AMSDU in AMPDU reordering. 2020-06-13 23:35:22 +00:00
ieee80211_hwmp.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_input.c
ieee80211_input.h
ieee80211_ioctl.c Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead. 2019-10-10 23:55:33 +00:00
ieee80211_ioctl.h
ieee80211_mesh.c Don't indirect user pointers directly in two 802.11s ioctls. 2020-04-24 22:10:02 +00:00
ieee80211_mesh.h
ieee80211_monitor.c
ieee80211_monitor.h
ieee80211_node.c [net80211] separate out node allocation and node initialisation. 2020-06-13 22:20:02 +00:00
ieee80211_node.h
ieee80211_output.c [net80211] Flip on A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options. 2020-06-06 22:25:00 +00:00
ieee80211_phy.c
ieee80211_phy.h [net80211] Migrate short slot time configuration into per-vap and deferred taskqueue updates. 2020-06-05 06:21:23 +00:00
ieee80211_power.c
ieee80211_power.h
ieee80211_proto.c [net80211] Don't call ic_updateslot if it's not set. 2020-06-05 14:17:19 +00:00
ieee80211_proto.h [net80211] Migrate short slot time configuration into per-vap and deferred taskqueue updates. 2020-06-05 06:21:23 +00:00
ieee80211_radiotap.c
ieee80211_radiotap.h
ieee80211_ratectl_none.c
ieee80211_ratectl.c
ieee80211_ratectl.h
ieee80211_regdomain.c
ieee80211_regdomain.h
ieee80211_rssadapt.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_rssadapt.h
ieee80211_scan_sta.c [net80211] Add some more debugging during scanning 2020-06-05 00:16:54 +00:00
ieee80211_scan_sw.c [net80211] Add some more debugging during scanning 2020-06-05 00:16:54 +00:00
ieee80211_scan_sw.h
ieee80211_scan.c net80211(4): do not setup roaming parameters for unsupported modes. 2019-02-03 01:32:02 +00:00
ieee80211_scan.h
ieee80211_sta.c [net80211] print out node A-MSDU state. 2020-06-05 07:38:46 +00:00
ieee80211_sta.h
ieee80211_superg.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
ieee80211_superg.h
ieee80211_tdma.c net80211(4): do not setup Tx parameters for unsupported modes. 2019-02-03 04:31:50 +00:00
ieee80211_tdma.h
ieee80211_var.h [net80211] separate out node allocation and node initialisation. 2020-06-13 22:20:02 +00:00
ieee80211_vht.c
ieee80211_vht.h
ieee80211_wds.c Restructure mbuf send tags to provide stronger guarantees. 2019-05-24 22:30:40 +00:00
ieee80211_wds.h
ieee80211_wps.h [ifconfig] Print more WPS attributes in verbose "list scan" output 2019-01-20 00:45:44 +00:00
ieee80211_xauth.c
ieee80211.c [net80211] Migrate short slot time configuration into per-vap and deferred taskqueue updates. 2020-06-05 06:21:23 +00:00
ieee80211.h [net80211] Add field definition for A-MSDU inside A-MPDU. 2020-06-05 04:04:47 +00:00