qcacmn: Track HTT nbuf map and unmap count

Add logs to track nbuf map and unmap count for HTT messages.

Change-Id: Ib2fdcdb03b2a8d5e574f34e3eef30601d3976664
CRs-Fixed: 3184850
This commit is contained in:
Amit Mehta
2022-05-09 23:13:08 -07:00
committed by Madan Koyyalamudi
parent 641d044574
commit 70a8e8a708
3 changed files with 15 additions and 1 deletions

View File

@@ -200,6 +200,9 @@ static void htc_cleanup(HTC_TARGET *target)
qdf_mem_free(pPacket); qdf_mem_free(pPacket);
} }
#endif #endif
HTC_INFO("%s: Non flow ctrl enabled endpoints nbuf map: %d, unamp: %d",
__func__, target->nbuf_nfc_map_count,
target->nbuf_nfc_unmap_count);
htc_flush_endpoint_txlookupQ(target, ENDPOINT_0, true); htc_flush_endpoint_txlookupQ(target, ENDPOINT_0, true);

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -264,6 +265,9 @@ typedef struct _HTC_TARGET {
/* Runtime count for H2T msg with response */ /* Runtime count for H2T msg with response */
qdf_atomic_t htc_runtime_cnt; qdf_atomic_t htc_runtime_cnt;
#endif #endif
/* Non flow ctrl enabled endpoints nbuf map unmap count */
uint32_t nbuf_nfc_map_count;
uint32_t nbuf_nfc_unmap_count;
} HTC_TARGET; } HTC_TARGET;

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -131,6 +132,10 @@ static void send_packet_completion(HTC_TARGET *target, HTC_PACKET *pPacket)
HTC_ENDPOINT *pEndpoint = &target->endpoint[pPacket->Endpoint]; HTC_ENDPOINT *pEndpoint = &target->endpoint[pPacket->Endpoint];
HTC_EP_SEND_PKT_COMPLETE EpTxComplete; HTC_EP_SEND_PKT_COMPLETE EpTxComplete;
if ((pPacket->PktInfo.AsTx.Flags & HTC_TX_PACKET_FLAG_FIXUP_NETBUF) &&
(!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)))
target->nbuf_nfc_unmap_count++;
restore_tx_packet(target, pPacket); restore_tx_packet(target, pPacket);
/* /*
@@ -1933,7 +1938,9 @@ static inline QDF_STATUS __htc_send_pkt(HTC_HANDLE HTCHandle,
status = qdf_nbuf_map(target->osdev, status = qdf_nbuf_map(target->osdev,
GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket), GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
QDF_DMA_TO_DEVICE); QDF_DMA_TO_DEVICE);
if (status != QDF_STATUS_SUCCESS) { if (status == QDF_STATUS_SUCCESS) {
target->nbuf_nfc_map_count++;
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("%s: nbuf map failed, endpoint %pK, seq_no. %d\n", ("%s: nbuf map failed, endpoint %pK, seq_no. %d\n",
__func__, pEndpoint, pEndpoint->SeqNo)); __func__, pEndpoint, pEndpoint->SeqNo));