All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	Johannes Berg <johannes.berg@intel.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload
Date: Tue, 27 Apr 2021 10:12:43 +0200	[thread overview]
Message-ID: <YIfHe6d5IskhogTX@lore-desk> (raw)
In-Reply-To: <d5303cd9935a9a2f44b76070d191e753895da516.1619489753.git.ryder.lee@mediatek.com>


[-- Attachment #1.1: Type: text/plain, Size: 1372 bytes --]

> Avoid checking ieee80211_hdr to support encap offload.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  net/mac80211/rc80211_minstrel_ht.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index ecad9b10984f..02a6648aba54 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -1180,20 +1180,19 @@ minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary)
>  static void
>  minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb)
>  {
> -	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
>  	struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
>  	u16 tid;
>  
>  	if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO)
>  		return;
>  
> -	if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
> +	if (unlikely(!pubsta->wme))

I guess we are changing the behaviour here since the check is done per-packet
and non per-sta

Regards,
Lorenzo

>  		return;
>  
>  	if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE)))
>  		return;
>  
> -	tid = ieee80211_get_tid(hdr);
> +	tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
>  	if (likely(sta->ampdu_mlme.tid_tx[tid]))
>  		return;
>  
> -- 
> 2.18.0
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	Johannes Berg <johannes.berg@intel.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload
Date: Tue, 27 Apr 2021 10:12:43 +0200	[thread overview]
Message-ID: <YIfHe6d5IskhogTX@lore-desk> (raw)
In-Reply-To: <d5303cd9935a9a2f44b76070d191e753895da516.1619489753.git.ryder.lee@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

> Avoid checking ieee80211_hdr to support encap offload.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  net/mac80211/rc80211_minstrel_ht.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index ecad9b10984f..02a6648aba54 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -1180,20 +1180,19 @@ minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary)
>  static void
>  minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb)
>  {
> -	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
>  	struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
>  	u16 tid;
>  
>  	if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO)
>  		return;
>  
> -	if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
> +	if (unlikely(!pubsta->wme))

I guess we are changing the behaviour here since the check is done per-packet
and non per-sta

Regards,
Lorenzo

>  		return;
>  
>  	if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE)))
>  		return;
>  
> -	tid = ieee80211_get_tid(hdr);
> +	tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
>  	if (likely(sta->ampdu_mlme.tid_tx[tid]))
>  		return;
>  
> -- 
> 2.18.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2021-04-27  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  2:20 [PATCH] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload Ryder Lee
2021-04-27  2:20 ` Ryder Lee
2021-04-27  8:10 ` Felix Fietkau
2021-04-27  8:10   ` Felix Fietkau
2021-04-27  8:12 ` Lorenzo Bianconi [this message]
2021-04-27  8:12   ` Lorenzo Bianconi

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=YIfHe6d5IskhogTX@lore-desk \
    --to=lorenzo.bianconi@redhat.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=shayne.chen@mediatek.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 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.