From: Mh_chen <mh_chen@realtek.com>
To: Lucid Duck <lucid_duck@justthetip.ca>,
Bitterblue Smith <rtl8821cerfe2@gmail.com>,
Isaiah <isaiah@realtek.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Ping-Ke Shih" <pkshih@realtek.com>
Subject: RE: [PATCH] wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs
Date: Thu, 29 Jan 2026 13:12:04 +0000 [thread overview]
Message-ID: <04842866166144debe97f7d32decd819@realtek.com> (raw)
In-Reply-To: <202601291256.60TCusZS3018440@rtits1.realtek.com.tw>
+Isaiah,
-----Original Message-----
From: Lucid Duck <lucid_duck@justthetip.ca>
Sent: Wednesday, January 28, 2026 4:01 AM
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Mh_chen <mh_chen@realtek.com>
Subject: Re: [PATCH] wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs
External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.
On Mon, 26 Jan 2026, Bitterblue Smith wrote:
> The CH12 checks in the completion handler are unnecessary since there
> is one in the resource checking function.
You're right. I'll remove the redundant check in v2.
> Is there a reason to add a new counter instead of just using the
> length of each tx_queue?
Good question. The tx_queue length tracks SKBs queued for submission, but doesn't account for URBs that have been submitted to USB core and are in-flight (between submit and completion callback). An SKB is dequeued before usb_submit_urb(), so skb_queue_len() would undercount actual resource usage.
The atomic counter tracks the full lifecycle: incremented at submit, decremented at completion. This gives mac80211 accurate backpressure even when URBs are pending in the USB subsystem.
Happy to hear if I'm missing something that would make skb_queue_len() work here.
--
Lucid Duck
next prev parent reply other threads:[~2026-01-29 13:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 22:19 [PATCH] wifi: rtw89: usb: fix TX flow control by tracking in-flight URBs Lucid Duck
2026-01-26 3:39 ` Ping-Ke Shih
2026-01-26 10:14 ` Mh_chen
2026-01-27 5:00 ` Lucid Duck
2026-01-26 14:09 ` Bitterblue Smith
2026-01-27 20:01 ` Lucid Duck
[not found] ` <202601291256.60TCusZS3018440@rtits1.realtek.com.tw>
2026-01-29 13:12 ` Mh_chen [this message]
2026-03-21 3:37 ` [PATCH v2] " Lucid Duck
2026-03-23 9:31 ` Ping-Ke Shih
2026-03-23 23:33 ` Lucid Duck
2026-03-24 0:38 ` Ping-Ke Shih
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=04842866166144debe97f7d32decd819@realtek.com \
--to=mh_chen@realtek.com \
--cc=isaiah@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lucid_duck@justthetip.ca \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.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