All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath12k@lists.infradead.org>,  <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] wifi: ath12k: Use msdu_end to check MCBC
Date: Fri, 26 May 2023 12:32:00 +0300	[thread overview]
Message-ID: <878rdbl9pr.fsf@kernel.org> (raw)
In-Reply-To: <20230509033638.3228-1-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Tue, 9 May 2023 11:36:38 +0800")

Baochen Qiang <quic_bqiang@quicinc.com> writes:

> We are seeing a very low TCP throughput testing with some specific
> tools. This is because for sub-frames of an AMSDU, MCBC flag in
> mpdu_start may be not valid, and as a result those frames would be
> dropped by kernel.
>
> Add a new helper to get it from msdu_end.
>
> Since original helper is not used for now, add __maybe_unused
> attribute to make GCC happy.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
> ---
> v2:
>  1. add a new helper according to Vasanth's comment.
>  2. change to use __le16_to_cpu instead of __le32_to_cpu
>
>  drivers/net/wireless/ath/ath12k/dp_rx.c | 13 ++++++++++---
>  drivers/net/wireless/ath/ath12k/hal.c   | 14 ++++++++++++++
>  drivers/net/wireless/ath/ath12k/hal.h   |  1 +
>  3 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index 8c8162fbe5c6..972034b7f159 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -193,13 +193,20 @@ static void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab,
>  	ab->hw_params->hal_ops->rx_desc_set_msdu_len(desc, len);
>  }
>  
> -static bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
> -				   struct hal_rx_desc *desc)
> +static __maybe_unused bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
> +						  struct hal_rx_desc *desc)
>  {
>  	return (ath12k_dp_rx_h_first_msdu(ab, desc) &&
>  		ab->hw_params->hal_ops->rx_desc_is_mcbc(desc));
>  }

Using __maybe_unused is usually a bad idea, it should be used only on
very special cases.

But why do you leave struct hal_ops::rx_desc_is_mcbc? Nobody is using it
and we should not have dead code lying around.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath12k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] wifi: ath12k: Use msdu_end to check MCBC
Date: Fri, 26 May 2023 12:32:00 +0300	[thread overview]
Message-ID: <878rdbl9pr.fsf@kernel.org> (raw)
In-Reply-To: <20230509033638.3228-1-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Tue, 9 May 2023 11:36:38 +0800")

Baochen Qiang <quic_bqiang@quicinc.com> writes:

> We are seeing a very low TCP throughput testing with some specific
> tools. This is because for sub-frames of an AMSDU, MCBC flag in
> mpdu_start may be not valid, and as a result those frames would be
> dropped by kernel.
>
> Add a new helper to get it from msdu_end.
>
> Since original helper is not used for now, add __maybe_unused
> attribute to make GCC happy.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
> ---
> v2:
>  1. add a new helper according to Vasanth's comment.
>  2. change to use __le16_to_cpu instead of __le32_to_cpu
>
>  drivers/net/wireless/ath/ath12k/dp_rx.c | 13 ++++++++++---
>  drivers/net/wireless/ath/ath12k/hal.c   | 14 ++++++++++++++
>  drivers/net/wireless/ath/ath12k/hal.h   |  1 +
>  3 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index 8c8162fbe5c6..972034b7f159 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -193,13 +193,20 @@ static void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab,
>  	ab->hw_params->hal_ops->rx_desc_set_msdu_len(desc, len);
>  }
>  
> -static bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
> -				   struct hal_rx_desc *desc)
> +static __maybe_unused bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
> +						  struct hal_rx_desc *desc)
>  {
>  	return (ath12k_dp_rx_h_first_msdu(ab, desc) &&
>  		ab->hw_params->hal_ops->rx_desc_is_mcbc(desc));
>  }

Using __maybe_unused is usually a bad idea, it should be used only on
very special cases.

But why do you leave struct hal_ops::rx_desc_is_mcbc? Nobody is using it
and we should not have dead code lying around.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2023-05-26  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09  3:36 [PATCH v2] wifi: ath12k: Use msdu_end to check MCBC Baochen Qiang
2023-05-09  3:36 ` Baochen Qiang
2023-05-26  9:32 ` Kalle Valo [this message]
2023-05-26  9:32   ` Kalle Valo

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=878rdbl9pr.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_bqiang@quicinc.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.