From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: Pardeep Kaur <pardeep.kaur@oss.qualcomm.com>, ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH ath-next v4 0/8] wifi: ath12k: extend device DP stats for TX and RX observability
Date: Wed, 23 Sep 2026 18:19:56 +0530 [thread overview]
Message-ID: <5f26c2ef-ace1-4afa-b5a9-0468d692367e@oss.qualcomm.com> (raw)
In-Reply-To: <20260819053247.1420393-1-pardeep.kaur@oss.qualcomm.com>
On 8/19/2026 11:02 AM, Pardeep Kaur wrote:
> From: Pardeep Kaur <pardeep.kaur@oss.qualcomm.com>
>
> Extend ath12k device DP stats for TX and RX path observability.
>
> Patch 1 fixes out-of-bounds array access on TX stats arrays
> fw_tx_status[], tx_wbm_rel_source[] and tqm_rel_reason[] by adding
> likely() bounds checks before each increment. The default: case of the
> switch statement that follows already handles unknown values with
> ath12k_warn(), so no WARN_ON_ONCE is added for fw_tx_status to avoid
> double-warning on an out-of-range htt_status value.
>
> Patch 2 renames the local variable wbm_status to htt_status in
> ath12k_dp_tx_process_htt_tx_complete() to accurately reflect the field
> origin, and simplifies ts.acked to use true directly.
>
> Patch 3 adds a per-pool TX descriptor allocation failure counter
> txbuf_na[] indexed by pool_id to track which traffic class ran out of
> TX descriptors, and exposes it in device_dp_stats debugfs.
>
> Patch 4 adds a write handler to device_dp_stats debugfs so that writing
> 'reset' clears all device DP stats counters without reloading the driver.
> Uses simple_write_to_buffer() to correctly handle partial writes and
> non-zero ppos, consistent with ath12k_write_simulate_fw_crash().
>
> Patch 5 introduces a new dp_stats.h header with the
> ath12k_wbm_err_drop_reason enum, adds per-drop-reason counters in the
> WBM RX error path, and exposes them in device_dp_stats debugfs.
>
> Patch 6 adds a 2D sent_to_stack[ring_id][device_id] counter to track
> successful MSDU deliveries to the network stack, attributed to the ring
> owner's dp so it is directly comparable with reo_rx[] in the same
> debugfs file in MLO configurations.
>
> Patch 7 fixes the REO Rx Received debugfs output to use 0-based ring
> indexing and lowercase "ring%d:" consistent with other ring counters.
>
> Patch 8 adds a dedicated sw_desc_fallback counter to track how often the
> WBM RX error path falls back to SW descriptor retrieval when HW CC is
> not done, distinct from actual packet drops.
>
> v4 changes:
> - Rename WBM_ERR_GET_SW_DESC -> WBM_ERR_DROP_GET_SW_DESC and
> WBM_ERR_DESC_PARSE -> WBM_ERR_DROP_DESC_PARSE for naming consistency
> with all other enum values in the same enum (patch 5).
> - Remove extra space before = in wbm_rx_drop[] array initializer (patch 5).
> - Drop ath12k_warn() on unsupported command in the stats reset handler;
> -EINVAL is the correct user-facing mechanism, consistent with all other
> .write() handlers in the same file (patch 4).
> - Fix missing colon in "REO sent to stack" section header; all other
> section headers in the same function use ":\n" (patch 6).
>
> v3 changes:
> - Remove WARN_ON_ONCE for fw_tx_status out-of-range: the default: branch
> of the switch already calls ath12k_warn() for unknown htt_status values
> so adding WARN_ON_ONCE would double-warn (patch 1).
> - Replace copy_from_user() with simple_write_to_buffer() in the stats
> reset handler to correctly handle split writes and non-zero ppos (patch 4).
> - Drop Fixes: tag from patch 7; cosmetic debugfs fix not needing backport.
>
> v2 changes:
> - Fix txbuf_na[] indexing: use pool_id instead of ring_id so the counter
> tracks TX descriptor pool exhaustion per traffic class (patch 3).
> - Fix sent_to_stack[] to use a 2D array [ring_id][device_id] attributed
> to the ring owner's dp, making it directly comparable with reo_rx[] in
> the same debugfs file in MLO configurations (patch 6).
> - Fix double-counting of WBM_ERR_DROP_RXDMA_GENERIC: move the increment
> inside rxdma_err()'s default: branch (patch 5).
> - Remove WBM_ERR_INV_PEER_ID, WBM_ERR_DROP_INV_COOKIE and
> WBM_ERR_DROP_INV_PUSH_RSN from the drop reason enum; no increment
> sites in the datapath (patch 5).
> - Remove leading space from "WBM Rx Drop Count" section header (patch 5).
> - Add likely()/WARN_ON_ONCE() bounds check on ring_id for sent_to_stack[]
> (patch 6).
> - Update commit messages for patches 3 and 6 to reflect corrected
> semantics.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6.r1-00402-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Pardeep Kaur <pardeep.kaur@oss.qualcomm.com>
> ---
>
> Aniruddha Mishra (2):
> wifi: ath12k: add WBM RX error drop statistics
> wifi: ath12k: add WBM SW desc fallback counter
>
> Hariharan Ramanathan (4):
> wifi: ath12k: rename wbm_status to htt_status in HTT TX completion
> wifi: ath12k: add TCL ring TX buffer allocation failure counter
> wifi: ath12k: add device DP stats reset support via debugfs
> wifi: ath12k: track per-ring RX sent-to-stack count
>
> Pardeep Kaur (2):
> wifi: ath12k: fix out-of-bounds access on TX stats arrays
> wifi: ath12k: fix 1-based ring index in REO Rx Received debugfs output
>
> drivers/net/wireless/ath/ath12k/debugfs.c | 78 ++++++++++++++++++-
> drivers/net/wireless/ath/ath12k/dp.h | 14 +++-
> drivers/net/wireless/ath/ath12k/dp_stats.h | 25 ++++++
> drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c | 52 ++++++++++---
> drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c | 27 ++++---
> .../net/wireless/ath/ath12k/wifi7/hal_rx.c | 5 +-
> 6 files changed, 175 insertions(+), 26 deletions(-)
> create mode 100644 drivers/net/wireless/ath/ath12k/dp_stats.h
>
> base-commit: e07447e654476262558bee570f4cf456e2b32565
> --
> 2.34.1
>
>
Apart from Jeff's comment on commit text of 4/8
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
next prev parent reply other threads:[~2026-09-23 12:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 5:32 [PATCH ath-next v4 0/8] wifi: ath12k: extend device DP stats for TX and RX observability Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 1/8] wifi: ath12k: fix out-of-bounds access on TX stats arrays Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 2/8] wifi: ath12k: rename wbm_status to htt_status in HTT TX completion Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 3/8] wifi: ath12k: add TCL ring TX buffer allocation failure counter Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 4/8] wifi: ath12k: add device DP stats reset support via debugfs Pardeep Kaur
2026-09-23 0:12 ` Jeff Johnson
2026-09-24 7:55 ` Pardeep Kaur
2026-09-24 15:30 ` Jeff Johnson
2026-08-19 5:32 ` [PATCH ath-next v4 5/8] wifi: ath12k: add WBM RX error drop statistics Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 6/8] wifi: ath12k: track per-ring RX sent-to-stack count Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 7/8] wifi: ath12k: fix 1-based ring index in REO Rx Received debugfs output Pardeep Kaur
2026-08-19 5:32 ` [PATCH ath-next v4 8/8] wifi: ath12k: add WBM SW desc fallback counter Pardeep Kaur
2026-09-23 8:47 ` [PATCH ath-next v4 0/8] wifi: ath12k: extend device DP stats for TX and RX observability Baochen Qiang
2026-09-23 12:49 ` Rameshkumar Sundaram [this message]
2026-09-25 15:26 ` Jeff Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f26c2ef-ace1-4afa-b5a9-0468d692367e@oss.qualcomm.com \
--to=rameshkumar.sundaram@oss.qualcomm.com \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pardeep.kaur@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox