From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH] mac80211: don't apply flow control on management frames
Date: Sat, 20 Mar 2021 01:13:34 +0100 [thread overview]
Message-ID: <87h7l6adht.fsf@toke.dk> (raw)
In-Reply-To: <20210319232800.0e876c800866.Id2b66eb5a17f3869b776c39b5ca713272ea09d5d@changeid>
Johannes Berg <johannes@sipsolutions.net> writes:
> From: Johannes Berg <johannes.berg@intel.com>
>
> In some cases (depending on the driver, but it's true e.g. for
> iwlwifi) we're using an internal TXQ for management packets,
> mostly to simplify the code and to have a place to queue them.
> However, it appears that in certain cases we can confuse the
> code and management frames are dropped, which is certainly not
> what we want.
>
> Short-circuit the processing of management frames. To keep the
> impact minimal, only put them on the frags queue and check the
> tid == management only for doing that and to skip the airtime
> fairness checks, if applicable.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> net/mac80211/tx.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 5d06de61047a..b2d09acb9fb0 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -5,7 +5,7 @@
> * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
> * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
> * Copyright 2013-2014 Intel Mobile Communications GmbH
> - * Copyright (C) 2018-2020 Intel Corporation
> + * Copyright (C) 2018-2021 Intel Corporation
> *
> * Transmit and frame generation functions.
> */
> @@ -1388,8 +1388,17 @@ static void ieee80211_txq_enqueue(struct ieee80211_local *local,
> ieee80211_set_skb_enqueue_time(skb);
>
> spin_lock_bh(&fq->lock);
> - fq_tin_enqueue(fq, tin, flow_idx, skb,
> - fq_skb_free_func);
> + /*
> + * For management frames, don't really apply codel etc.,
> + * we don't want to apply any shaping or anything we just
> + * want to simplify the driver API by having them on the
> + * txqi.
> + */
> + if (unlikely(txqi->txq.tid == IEEE80211_NUM_TIDS))
> + __skb_queue_tail(&txqi->frags, skb);
> + else
> + fq_tin_enqueue(fq, tin, flow_idx, skb,
> + fq_skb_free_func);
One consequence of this is that we create a strict priority queue for
management frames. With all the possibilities for badness (such as the
ability of starving all other queues) that carries with it. I guess
that's probably fine for management frames, though, right? As in, there
is some other mechanism that prevents abuse of this?
-Toke
next prev parent reply other threads:[~2021-03-20 0:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 22:28 [PATCH] mac80211: don't apply flow control on management frames Johannes Berg
2021-03-20 0:13 ` Toke Høiland-Jørgensen [this message]
2021-03-20 19:58 ` Johannes Berg
2021-03-22 10:37 ` Toke Høiland-Jørgensen
2021-03-22 9:43 ` Maxime Bizon
2021-03-22 9:46 ` 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=87h7l6adht.fsf@toke.dk \
--to=toke@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).