qcacmn: Do not unmap buffer if MSDU done is not set

Currently if the msdu_done bit is not set in the
rx_pkt_tlvs, the buffer is unmapped and freed.
There was an issue seen where hardware accessed a
buffer address, which probably was delivered to driver
without DMA of data to the buffer (thereby unmapped
and freed before hw attempted second access). This
results in unwanted recovery.

Based on the above hypothesis, add a workaround
to skip the unmap-and-free of any buffer for which
the msdu_done bit was not set in the rx_pkt_tlv.
Also mark the corresponding rx_desc as in_err_state.

The rx_desc corresponding to such aforementioned
msdu_done failure msdus are stored in a rolling
list, where the old entry is force unmapped & freed
when a new entry needs to be added. This force
unmap-and-free of the oldest buffer gives an uncertain
amount of delay between it being reaped from rx ring and
actual unmap-and-free.

Change-Id: Ibf8f3c886118d532af818466cb46218d88146271
CRs-Fixed: 3667674
This commit is contained in:
Rakesh Pillai
2023-11-10 03:01:48 -08:00
committed by Ravindra Konda
parent 3ed7625c2a
commit d149d2a2e8
5 changed files with 161 additions and 6 deletions

View File

@@ -138,6 +138,8 @@ struct dp_rx_desc_dbg_info {
* @in_err_state: Nbuf sanity failed for this descriptor.
* @has_reuse_nbuf: the nbuf associated with this desc is also saved in
* reuse_nbuf field
* @msdu_done_fail: this particular rx_desc was dequeued from REO with
* msdu_done bit not set in data buffer.
*/
struct dp_rx_desc {
qdf_nbuf_t nbuf;
@@ -158,7 +160,8 @@ struct dp_rx_desc {
uint8_t in_use:1,
unmapped:1,
in_err_state:1,
has_reuse_nbuf:1;
has_reuse_nbuf:1,
msdu_done_fail:1;
};
#ifndef QCA_HOST_MODE_WIFI_DISABLED