Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 14/30] wifi: mac80211: put filtered data frames back on TXQs
Date: Fri, 06 Nov 2026 13:23:45 +0100	[thread overview]
Message-ID: <87bj82p2r2.fsf@toke.dk> (raw)
In-Reply-To: <20261102203831.1058362-46-johannes@sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> writes:

> From: Johannes Berg <johannes.berg@intel.com>
>
> When a device filters frames because the station went to
> sleep, we put them back on tx_filtered or pending queues.
> This can mix up ordering between TXQs and filtered frames
> when the station wakes up again later.
>
> Put filtered frames onto the frags queue of the TXQ they
> came from, fixing the order and simplifying the queueing
> structure in mac80211.
>
> Assisted-by: LLM
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/mac80211/ht.c          |  5 ++++
>  net/mac80211/ieee80211_i.h |  5 +++-
>  net/mac80211/sta_info.c    | 52 +++++++++++++++++++++++++++++++++++-
>  net/mac80211/sta_info.h    |  4 ++-
>  net/mac80211/status.c      | 54 +++++++++++++++++++++++++++++++++++++-
>  net/mac80211/tx.c          | 37 ++++++++++++++++++++++++++
>  6 files changed, 153 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
> index c5c2113fa4f7..e26d12659942 100644
> --- a/net/mac80211/ht.c
> +++ b/net/mac80211/ht.c
> @@ -372,6 +372,11 @@ void ieee80211_ba_session_work(struct wiphy *wiphy, struct wiphy_work *work)
>  			/* Allow only frags to be dequeued */
>  			set_bit(IEEE80211_TXQ_STOP, &txqi->flags);
>  
> +			/*
> +			 * Fragments and filtered frames (which already have a
> +			 * sequence number) must be out before aggregation
> +			 * starts, otherwise they'd be sent as part of it.
> +			 */
>  			if (!skb_queue_empty(&txqi->frags)) {
>  				/* Fragmented Tx is ongoing, wait for it to
>  				 * finish. Reschedule worker to retry later.
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index cb947341fee6..4a9b68022250 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -987,7 +987,8 @@ enum txq_info_flags {
>   * @tin: contains packets split into multiple flows
>   * @def_cvars: codel vars for the @tin's default_flow
>   * @cstats: code statistics for this queue
> - * @frags: used to keep fragments created after dequeue
> + * @frags: used to keep fragments created after dequeue, and frames that
> + *	were filtered by the device (queued before the fragments)

Hmm, so rather than splicing these two together in one queue and having
all that logic to insert into the middle, and to walk the queue to check
flags, isn't it simpler to just have two distinct queues as struct
members and check them in order on dequeue?

-Toke

  reply	other threads:[~2026-11-06 12:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 20:22 [PATCH 00/30] wifi: mac80211: unify frame queueing Johannes Berg
2026-11-02 20:22 ` [PATCH 01/30] wifi: mac80211: mesh: clear PS_STA flag when peer wakes up Johannes Berg
2026-11-02 20:22 ` [PATCH 02/30] wifi: mac80211: disable BHs when waking TXQs on PS wakeup Johannes Berg
2026-11-02 20:22 ` [PATCH 03/30] wifi: mt76: correctly set more-data flag on PS release Johannes Berg
2026-11-02 20:22 ` [PATCH 04/30] wifi: mac80211: remove dead aggregation TX code Johannes Berg
2026-11-02 20:22 ` [PATCH 05/30] wifi: mac80211: remove tid_tx->pending Johannes Berg
2026-11-02 20:22 ` [PATCH 06/30] wifi: mac80211: remove aggregation queue stop reason Johannes Berg
2026-11-02 20:22 ` [PATCH 07/30] wifi: mac80211: rename vif->txq_mgmt to vif->txq_nan_dw Johannes Berg
2026-11-02 20:22 ` [PATCH 08/30] wifi: mac80211: use vlan-aware station lookup for pending TX Johannes Berg
2026-11-02 20:22 ` [PATCH 09/30] wifi: mac80211: stop tracking TXQ-buffered TIDs for PS STAs Johannes Berg
2026-11-02 20:23 ` [PATCH 10/30] wifi: mac80211: release frames from TXQs to PS stations Johannes Berg
2026-11-02 20:23 ` [PATCH 11/30] wifi: mac80211: mesh: release frames from TXQs sleeping peers Johannes Berg
2026-11-02 20:23 ` [PATCH 12/30] wifi: mac80211: don't TX from TXQs of sleeping STAs Johannes Berg
2026-11-02 20:23 ` [PATCH 13/30] wifi: mac80211: don't apply CoDel to PS-buffered frames Johannes Berg
2026-11-06 12:22   ` Toke Høiland-Jørgensen
2026-11-02 20:23 ` [PATCH 14/30] wifi: mac80211: put filtered data frames back on TXQs Johannes Berg
2026-11-06 12:23   ` Toke Høiland-Jørgensen [this message]
2026-11-02 20:23 ` [PATCH 15/30] wifi: mac80211: handle the mgmt TXQ of sleeping STAs Johannes Berg
2026-11-02 20:23 ` [PATCH 16/30] wifi: mac80211: hold frames for sleeping STAs on TXQs Johannes Berg
2026-11-02 20:23 ` [PATCH 17/30] wifi: mac80211: move ieee80211_txq_enqueue() up Johannes Berg
2026-11-02 20:23 ` [PATCH 18/30] wifi: mac80211: always use per-STA MMPDU TXQ Johannes Berg
2026-11-02 20:23 ` [PATCH 19/30] wifi: mac80211: use MMPDU TXQ for filtered mgmt frames Johannes Berg
2026-11-02 20:23 ` [PATCH 20/30] wifi: mac80211: avoid reordering PS-release MMPDUs Johannes Berg
2026-11-02 20:23 ` [PATCH 21/30] wifi: mac80211: buffer multicast frames on vif TXQ Johannes Berg
2026-11-02 20:23 ` [PATCH 22/30] wifi: mac80211: always use TXQ for mcast data frames Johannes Berg
2026-11-02 20:23 ` [PATCH 23/30] wifi: mac80211: refactor fast-xmit header encapsulation Johannes Berg
2026-11-02 20:23 ` [PATCH 24/30] wifi: mac80211: encapsulate fast-xmit frames at TXQ dequeue Johannes Berg
2026-11-02 20:23 ` [PATCH 25/30] net/fq_impl: allow pulling packets from the same flow Johannes Berg
2026-11-02 20:23 ` [PATCH 26/30] wifi: mac80211: build A-MSDUs at dequeue Johannes Berg
2026-11-02 20:23 ` [PATCH 27/30] wifi: mac80211: handle 802.11 encap at TXQ dequeue Johannes Berg
2026-11-02 20:23 ` [PATCH 28/30] wifi: mac80211: split some TX code into helpers Johannes Berg
2026-11-02 20:23 ` [PATCH 29/30] wifi: mac80211: queue unicast data frames as ethernet Johannes Berg
2026-11-02 20:23 ` [PATCH 30/30] wifi: mac80211: keep fast-xmit for sleeping STAs Johannes Berg

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=87bj82p2r2.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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