* [PATCH] wifi: ath12k: Use msdu_end to check MCBC
@ 2023-04-27 1:30 Baochen Qiang
2023-04-27 5:40 ` Vasanthakumar Thiagarajan
2023-04-29 5:13 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Baochen Qiang @ 2023-04-27 1:30 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless
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.
Change to get it from msdu_end.
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>
---
drivers/net/wireless/ath/ath12k/hal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
index 0ec53afe9915..980ec2024b37 100644
--- a/drivers/net/wireless/ath/ath12k/hal.c
+++ b/drivers/net/wireless/ath/ath12k/hal.c
@@ -889,8 +889,8 @@ static u8 *ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
static bool ath12k_hw_wcn7850_rx_desc_is_mcbc(struct hal_rx_desc *desc)
{
- return __le32_to_cpu(desc->u.wcn7850.mpdu_start.info6) &
- RX_MPDU_START_INFO6_MCAST_BCAST;
+ return __le32_to_cpu(desc->u.wcn7850.msdu_end.info5) &
+ RX_MSDU_END_INFO5_DA_IS_MCBC;
}
static void ath12k_hw_wcn7850_rx_desc_get_dot11_hdr(struct hal_rx_desc *desc,
base-commit: d276b90ff7f9c51e1f2f8826b7cbb3dff20a4b66
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] wifi: ath12k: Use msdu_end to check MCBC
2023-04-27 1:30 [PATCH] wifi: ath12k: Use msdu_end to check MCBC Baochen Qiang
@ 2023-04-27 5:40 ` Vasanthakumar Thiagarajan
2023-04-29 5:13 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2023-04-27 5:40 UTC (permalink / raw)
To: Baochen Qiang, ath12k; +Cc: linux-wireless
On 4/27/2023 7:00 AM, Baochen Qiang wrote:
> 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.
>
> Change to get it from msdu_end.
>
> 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>
> ---
> drivers/net/wireless/ath/ath12k/hal.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
> index 0ec53afe9915..980ec2024b37 100644
> --- a/drivers/net/wireless/ath/ath12k/hal.c
> +++ b/drivers/net/wireless/ath/ath12k/hal.c
> @@ -889,8 +889,8 @@ static u8 *ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
>
> static bool ath12k_hw_wcn7850_rx_desc_is_mcbc(struct hal_rx_desc *desc)
> {
> - return __le32_to_cpu(desc->u.wcn7850.mpdu_start.info6) &
> - RX_MPDU_START_INFO6_MCAST_BCAST;
> + return __le32_to_cpu(desc->u.wcn7850.msdu_end.info5) &
> + RX_MSDU_END_INFO5_DA_IS_MCBC;
Please note that RX_MSDU_END_INFO5_DA_IS_MCBC is to notify if the DA
address is mc/bc while RX_MPDU_START_INFO6_MCAST_BCAST is to inform
if the RA (addr1) is mc/bc. Both may not be used interchangeably, for
example if we want to enable PN replay check for mc/bc frames we need
to use RX_MPDU_START_INFO6_MCAST_BCAST. You can probably define a new
call back for da_mc_bc check instead of modifying the same callback.
Vasanth
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] wifi: ath12k: Use msdu_end to check MCBC
2023-04-27 1:30 [PATCH] wifi: ath12k: Use msdu_end to check MCBC Baochen Qiang
2023-04-27 5:40 ` Vasanthakumar Thiagarajan
@ 2023-04-29 5:13 ` Kalle Valo
2023-05-09 3:42 ` Baochen Qiang
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2023-04-29 5:13 UTC (permalink / raw)
To: Baochen Qiang; +Cc: ath12k, linux-wireless
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.
>
> Change to get it from msdu_end.
>
> 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>
> ---
> drivers/net/wireless/ath/ath12k/hal.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/hal.c
> b/drivers/net/wireless/ath/ath12k/hal.c
> index 0ec53afe9915..980ec2024b37 100644
> --- a/drivers/net/wireless/ath/ath12k/hal.c
> +++ b/drivers/net/wireless/ath/ath12k/hal.c
> @@ -889,8 +889,8 @@ static u8
> *ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
>
> static bool ath12k_hw_wcn7850_rx_desc_is_mcbc(struct hal_rx_desc *desc)
> {
> - return __le32_to_cpu(desc->u.wcn7850.mpdu_start.info6) &
> - RX_MPDU_START_INFO6_MCAST_BCAST;
> + return __le32_to_cpu(desc->u.wcn7850.msdu_end.info5) &
> + RX_MSDU_END_INFO5_DA_IS_MCBC;
New warnings:
drivers/net/wireless/ath/ath12k/hal.c:892:16: warning: cast to restricted __le32
drivers/net/wireless/ath/ath12k/hal.c:892:16: warning: cast from restricted __le16
Please remember always run ath12k-check (with sparse installed).
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] wifi: ath12k: Use msdu_end to check MCBC
2023-04-29 5:13 ` Kalle Valo
@ 2023-05-09 3:42 ` Baochen Qiang
2023-05-09 5:30 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Baochen Qiang @ 2023-05-09 3:42 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath12k, linux-wireless
On 4/29/2023 1:13 PM, Kalle Valo wrote:
> 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.
>>
>> Change to get it from msdu_end.
>>
>> 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>
>> ---
>> drivers/net/wireless/ath/ath12k/hal.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/hal.c
>> b/drivers/net/wireless/ath/ath12k/hal.c
>> index 0ec53afe9915..980ec2024b37 100644
>> --- a/drivers/net/wireless/ath/ath12k/hal.c
>> +++ b/drivers/net/wireless/ath/ath12k/hal.c
>> @@ -889,8 +889,8 @@ static u8
>> *ath12k_hw_wcn7850_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
>>
>> static bool ath12k_hw_wcn7850_rx_desc_is_mcbc(struct hal_rx_desc *desc)
>> {
>> - return __le32_to_cpu(desc->u.wcn7850.mpdu_start.info6) &
>> - RX_MPDU_START_INFO6_MCAST_BCAST;
>> + return __le32_to_cpu(desc->u.wcn7850.msdu_end.info5) &
>> + RX_MSDU_END_INFO5_DA_IS_MCBC;
> New warnings:
>
> drivers/net/wireless/ath/ath12k/hal.c:892:16: warning: cast to restricted __le32
> drivers/net/wireless/ath/ath12k/hal.c:892:16: warning: cast from restricted __le16
>
> Please remember always run ath12k-check (with sparse installed).
Hi Kalle,
I have sent v2 where I change __le32_to_cpu to __le16_to_cpu which
should fix this warning.
But I can not find ath12k-check, where is this tool? Could you help
point out?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-09 5:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27 1:30 [PATCH] wifi: ath12k: Use msdu_end to check MCBC Baochen Qiang
2023-04-27 5:40 ` Vasanthakumar Thiagarajan
2023-04-29 5:13 ` Kalle Valo
2023-05-09 3:42 ` Baochen Qiang
2023-05-09 5:30 ` Kalle Valo
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).