diff mbox series

[2/2] wifi: ath12k: improve the rx descriptor error information

Message ID 20240516000807.1704913-3-quic_periyasa@quicinc.com (mailing list archive)
State Accepted
Commit 35864b62fa129196af4641b8bef50ac4226a22ed
Delegated to: Kalle Valo
Headers show
Series wifi: ath12k: Refactor Rx descriptor buffer CMEM | expand

Commit Message

Karthikeyan Periyasamy May 16, 2024, 12:08 a.m. UTC
The ath12k_dp_get_rx_desc() failure log currently contains the same
information across multiple Rx data paths and lacks sufficient detail for
debugging purposes. To address this, change the ath12k_dp_get_rx_desc()
failure log to include cookie information along with Rx path details.
This will provide more specific data for debugging purposes.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/dp_rx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Jeff Johnson May 16, 2024, 1:07 p.m. UTC | #1
On 5/15/2024 5:08 PM, Karthikeyan Periyasamy wrote:
> The ath12k_dp_get_rx_desc() failure log currently contains the same
> information across multiple Rx data paths and lacks sufficient detail for
> debugging purposes. To address this, change the ath12k_dp_get_rx_desc()
> failure log to include cookie information along with Rx path details.
> This will provide more specific data for debugging purposes.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
> 
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Kalle Valo May 23, 2024, 1:16 p.m. UTC | #2
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:

> The ath12k_dp_get_rx_desc() failure log currently contains the same
> information across multiple Rx data paths and lacks sufficient detail for
> debugging purposes. To address this, change the ath12k_dp_get_rx_desc()
> failure log to include cookie information along with Rx path details.
> This will provide more specific data for debugging purposes.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath12k/dp_rx.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index 37205e894afe..85ce6e840efa 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -2625,7 +2625,7 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
>  		if (!desc_info) {
>  			desc_info = ath12k_dp_get_rx_desc(ab, cookie);
>  			if (!desc_info) {
> -				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
> +				ath12k_warn(ab, "Rx, invalid cookie 0x%x\n", cookie);
>  				continue;
>  			}
>  		}
> @@ -3323,7 +3323,7 @@ ath12k_dp_process_rx_err_buf(struct ath12k *ar, struct hal_reo_dest_ring *desc,
>  	if (!desc_info) {
>  		desc_info = ath12k_dp_get_rx_desc(ab, cookie);
>  		if (!desc_info) {
> -			ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
> +			ath12k_warn(ab, "Rx Exception, invalid cookie 0x%x\n", cookie);
>  			return -EINVAL;
>  		}
>  	}
> @@ -3742,7 +3742,8 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
>  		if (!desc_info) {
>  			desc_info = ath12k_dp_get_rx_desc(ab, err_info.cookie);
>  			if (!desc_info) {
> -				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
> +				ath12k_warn(ab, "WBM Rx err, invalid cookie 0x%x\n",
> +					    err_info.cookie);
>  				continue;
>  			}
>  		}

In the error messages please try to use full english sentences to make
them at somehow useful to users. I tried add those now, please check:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=4033754ea78119ede328f09005b8ae1e9dd3f4f2
Karthikeyan Periyasamy May 23, 2024, 1:22 p.m. UTC | #3
On 5/23/2024 6:46 PM, Kalle Valo wrote:
> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> 
>> The ath12k_dp_get_rx_desc() failure log currently contains the same
>> information across multiple Rx data paths and lacks sufficient detail for
>> debugging purposes. To address this, change the ath12k_dp_get_rx_desc()
>> failure log to include cookie information along with Rx path details.
>> This will provide more specific data for debugging purposes.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>> Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>>
>> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath12k/dp_rx.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
>> index 37205e894afe..85ce6e840efa 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
>> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
>> @@ -2625,7 +2625,7 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
>>   		if (!desc_info) {
>>   			desc_info = ath12k_dp_get_rx_desc(ab, cookie);
>>   			if (!desc_info) {
>> -				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
>> +				ath12k_warn(ab, "Rx, invalid cookie 0x%x\n", cookie);
>>   				continue;
>>   			}
>>   		}
>> @@ -3323,7 +3323,7 @@ ath12k_dp_process_rx_err_buf(struct ath12k *ar, struct hal_reo_dest_ring *desc,
>>   	if (!desc_info) {
>>   		desc_info = ath12k_dp_get_rx_desc(ab, cookie);
>>   		if (!desc_info) {
>> -			ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
>> +			ath12k_warn(ab, "Rx Exception, invalid cookie 0x%x\n", cookie);
>>   			return -EINVAL;
>>   		}
>>   	}
>> @@ -3742,7 +3742,8 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
>>   		if (!desc_info) {
>>   			desc_info = ath12k_dp_get_rx_desc(ab, err_info.cookie);
>>   			if (!desc_info) {
>> -				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
>> +				ath12k_warn(ab, "WBM Rx err, invalid cookie 0x%x\n",
>> +					    err_info.cookie);
>>   				continue;
>>   			}
>>   		}
> 
> In the error messages please try to use full english sentences to make
> them at somehow useful to users. I tried add those now, please check:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=4033754ea78119ede328f09005b8ae1e9dd3f4f2
> 

Agree. Looks fine to me.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 37205e894afe..85ce6e840efa 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -2625,7 +2625,7 @@  int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
 		if (!desc_info) {
 			desc_info = ath12k_dp_get_rx_desc(ab, cookie);
 			if (!desc_info) {
-				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
+				ath12k_warn(ab, "Rx, invalid cookie 0x%x\n", cookie);
 				continue;
 			}
 		}
@@ -3323,7 +3323,7 @@  ath12k_dp_process_rx_err_buf(struct ath12k *ar, struct hal_reo_dest_ring *desc,
 	if (!desc_info) {
 		desc_info = ath12k_dp_get_rx_desc(ab, cookie);
 		if (!desc_info) {
-			ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
+			ath12k_warn(ab, "Rx Exception, invalid cookie 0x%x\n", cookie);
 			return -EINVAL;
 		}
 	}
@@ -3742,7 +3742,8 @@  int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
 		if (!desc_info) {
 			desc_info = ath12k_dp_get_rx_desc(ab, err_info.cookie);
 			if (!desc_info) {
-				ath12k_warn(ab, "Invalid cookie in manual desc retrieval");
+				ath12k_warn(ab, "WBM Rx err, invalid cookie 0x%x\n",
+					    err_info.cookie);
 				continue;
 			}
 		}