All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Markus Theil <markus.theil@tu-ilmenau.de>
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
	Stanislaw Gruszka <stf_xl@wp.pl>,
	kvalo@codeaurora.org
Subject: Re: [PATCH v3] mt76: use AC specific reorder timeout
Date: Fri, 13 Dec 2019 22:57:35 +0100	[thread overview]
Message-ID: <864e68a0-8e67-bf5a-8276-a4e5a546d777@nbd.name> (raw)
In-Reply-To: <20191210122005.7504-1-markus.theil@tu-ilmenau.de>

On 2019-12-10 13:20, Markus Theil wrote:
> Before this patch, mt76 handled rx traffic for all TIDs  equally,
> when released from reorder buffer early. This patch uses an AC specific
> reorder timeout, in order to release partial aggregated frames for voice
> or video ACs earlier. For example, ath10k also uses AC specific reorder
> timeouts (reported by firmware in that case).
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
> v3: fix changelog
> v2: use static const mapping arrays
> 
>  drivers/net/wireless/mediatek/mt76/agg-rx.c | 30 ++++++++++++++++++---
>  drivers/net/wireless/mediatek/mt76/mt76.h   |  2 ++
>  2 files changed, 28 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c
> index 53b5a4b2dcc5..572cf26b0fa1 100644
> --- a/drivers/net/wireless/mediatek/mt76/agg-rx.c
> +++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c
> @@ -4,7 +4,27 @@
>   */
>  #include "mt76.h"
> 
> -#define REORDER_TIMEOUT (HZ / 10)
> +static unsigned long mt76_aggr_tid_to_timeo(u8 tidno)
> +{
> +	static const int ieee802_1d_to_ac[8] = {
> +		IEEE80211_AC_BE,
> +		IEEE80211_AC_BK,
> +		IEEE80211_AC_BK,
> +		IEEE80211_AC_BE,
> +		IEEE80211_AC_VI,
> +		IEEE80211_AC_VI,
> +		IEEE80211_AC_VO,
> +		IEEE80211_AC_VO
> +	};
> +	static const int ac_to_timeout[] = {
> +		[IEEE80211_AC_VO] = HZ / 30,
> +		[IEEE80211_AC_VI] = HZ / 25,
> +		[IEEE80211_AC_BE] = HZ / 10,
> +		[IEEE80211_AC_BK] = HZ / 10
> +	};
> +
> +	return ac_to_timeout[ieee802_1d_to_ac[tidno & 7]];
In the current implementation, voice traffic always runs without
aggregation, so it does not need special timeout handling.

Given that tid values 0-3 are BE/BK and you use the same timeout for
those, you could simplify this function to:
return HZ / (tidno >= 4 ? 25 : 10);

- Felix

      reply	other threads:[~2019-12-13 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 12:20 [PATCH v3] mt76: use AC specific reorder timeout Markus Theil
2019-12-13 21:57 ` Felix Fietkau [this message]

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=864e68a0-8e67-bf5a-8276-a4e5a546d777@nbd.name \
    --to=nbd@nbd.name \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=markus.theil@tu-ilmenau.de \
    --cc=stf_xl@wp.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.