All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 1/4] mac80211: check per vif offload_flags in Tx path
Date: Thu, 17 Jun 2021 21:08:33 +0200	[thread overview]
Message-ID: <18027bdb-19d7-f342-af35-ed304f730678@nbd.name> (raw)
In-Reply-To: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com>


On 2021-06-17 20:53, Ryder Lee wrote:
> offload_flags has been introduced to indicate encap status of each interface.
> An interface can encap offload at runtime, or if it has some extra limitations
> it can simply override the flags, so it's more flexible to check offload_flags
> in Tx path.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  net/mac80211/tx.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 0a4bc9e08637..8cb1289c704a 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -3695,7 +3698,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
>  	}
>  
>  	if (skb_has_frag_list(skb) &&
> -	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
> +	    (!ieee80211_hw_check(&local->hw, TX_FRAG_LIST) ||
> +	     vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)) {
>  		if (skb_linearize(skb)) {
>  			ieee80211_free_txskb(&local->hw, skb);
>  			goto begin;
I think this chunk should be dropped.

- Felix

WARNING: multiple messages have this Message-ID (diff)
From: Felix Fietkau <nbd@nbd.name>
To: Ryder Lee <ryder.lee@mediatek.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 1/4] mac80211: check per vif offload_flags in Tx path
Date: Thu, 17 Jun 2021 21:08:33 +0200	[thread overview]
Message-ID: <18027bdb-19d7-f342-af35-ed304f730678@nbd.name> (raw)
In-Reply-To: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com>


On 2021-06-17 20:53, Ryder Lee wrote:
> offload_flags has been introduced to indicate encap status of each interface.
> An interface can encap offload at runtime, or if it has some extra limitations
> it can simply override the flags, so it's more flexible to check offload_flags
> in Tx path.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  net/mac80211/tx.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 0a4bc9e08637..8cb1289c704a 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -3695,7 +3698,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
>  	}
>  
>  	if (skb_has_frag_list(skb) &&
> -	    !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
> +	    (!ieee80211_hw_check(&local->hw, TX_FRAG_LIST) ||
> +	     vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)) {
>  		if (skb_linearize(skb)) {
>  			ieee80211_free_txskb(&local->hw, skb);
>  			goto begin;
I think this chunk should be dropped.

- Felix

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

  parent reply	other threads:[~2021-06-17 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 18:53 [PATCH 1/4] mac80211: check per vif offload_flags in Tx path Ryder Lee
2021-06-17 18:53 ` Ryder Lee
2021-06-17 18:53 ` [PATCH 2/4] mt76: drop MT_DRV_AMSDU_OFFLOAD flag Ryder Lee
2021-06-17 18:53   ` Ryder Lee
2021-06-17 18:53 ` [PATCH 3/4] mt76: connac: explicitly check vif->offload_flags Ryder Lee
2021-06-17 18:53   ` Ryder Lee
2021-06-17 18:53 ` [PATCH 4/4] mt76: mt7615: add 802.11 encap offload support Ryder Lee
2021-06-17 18:53   ` Ryder Lee
2021-06-17 19:08 ` Felix Fietkau [this message]
2021-06-17 19:08   ` [PATCH 1/4] mac80211: check per vif offload_flags in Tx path Felix Fietkau

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=18027bdb-19d7-f342-af35-ed304f730678@nbd.name \
    --to=nbd@nbd.name \
    --cc=evelyn.tsai@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --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.