HomeFreeBSD

[net80211] First part of A-MSDU offload handling - don't bump A-MPDU reordering…

Description

[net80211] First part of A-MSDU offload handling - don't bump A-MPDU reordering seqno

When doing A-MSDU offload handling the driver is required to mark
A-MSDUs from the same MPDU with the same sequence number.
It then tags them as AMSDU (if it's a decap'ed A-MSDU) and AMSDU_MORE
(saying there's more AMSDUs decapped in the same MSDU.)
This allows encryption and sequence number offload to work right.

In the A-MSDU path the sequence number check looks at the A-MSDU flags
in the frame to see whether it's part of the same seqno and will pass them
(ie, not increment rx_seq until the last A-MSDU is seen from the driver,
or a new seqno shows up.0

However, I did this work in the A-MSDU path but not the A-MSDU in A-MPDU path.
For the non A-MDSU offload case the A-MPDU receive reordering will do its
thing and then pass up the MPDU up for decap - which then will see it's
an A-MSDU and decap each sub-frame. But this isn't done for offloaded
A-MSDU frames.

This requires two parts:

  • Don't bump the RX sequence number, same as above; and
  • If frames go into the reordering buffer, they need to be added into the slot as a set of frames rather than a single frame, so once a new seqno shows up this slot can be marked as "full" and we can move on.

This patch does the first. The latter requires that I find and commit
work to change rxa_m from an mbuf to an mbufq and the nhandle A-MSDU
there. But, the first is enough to allow the normal case (ie, no or not
a lot of A-MPDU RX reordering) to work.

This allows the athp driver (QCA9880) throughput to go from VERY low
(like 5mbit TCP, 1/3-1/4 expected UDP throughput) to ~ 250mbit TCP
and > 300mbit UDP on a VHT/40 channel. TCP sucks because, well, it
shows up as MASSIVE packet loss when all but one frame in a decap'ed
A-MSDU stream is dropped. Le whoops.

Now, where'd I put that laptop with the patch for rxa_m mbufq that
I wrote like in 2017...

Tested:

  • AR9380, STA/AP mode (a big no-op, no A-MSDU hardware decap);
  • if_run (RT3593), STA DWDS mode (A-MPDU / A-MSDU receive, but again no A-MSDU hardware decap);
  • QCA9880, STA/AP mode (which is doing hardware A-MPDU/A-MSDU decap, but no A-MPDU reordering in the firmware.)

Details

Provenance
adrianAuthored on
Parents
rS362083: Tag import of sqlite3-3.32.0 (3320000)
Branches
Unknown
Tags
Unknown