summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthick S <skarthic@qti.qualcomm.com>2015-07-25 12:11:53 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-07-27 15:58:57 +0530
commit978f8971e01a867178c970dfedcfc7e78f2e7935 (patch)
treedd2e3ab1a194500ae9f67f4ea90f3391e12abb5c
parentaa6c60fbcc83e4e8c1d83319db6660be82169728 (diff)
qcacld-2.0: debug info for full reorder offload
Log last 1K physical addresses and corresponding virtual addresses of the Rx buffers. Change-Id: Ieec086888837613f99361799b766ac20188a5a28 CRs-Fixed: 864569
-rw-r--r--CORE/CLD_TXRX/HTT/htt_rx.c13
-rw-r--r--CORE/CLD_TXRX/HTT/htt_types.h12
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h4
3 files changed, 29 insertions, 0 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c
index 267f79370676..8a90453e06ca 100644
--- a/CORE/CLD_TXRX/HTT/htt_rx.c
+++ b/CORE/CLD_TXRX/HTT/htt_rx.c
@@ -296,6 +296,12 @@ htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
adf_nbuf_free(rx_netbuf);
goto fail;
}
+ pdev->debug_Rx_buff_list[pdev->debug_rx_buff_index].paddr = paddr;
+ pdev->debug_Rx_buff_list[pdev->debug_rx_buff_index].in_use = true;
+ pdev->debug_Rx_buff_list[pdev->debug_rx_buff_index].vaddr = rx_netbuf;
+ NBUF_MAP_ID(rx_netbuf) = pdev->debug_rx_buff_index;
+ if(++pdev->debug_rx_buff_index == HTT_RX_RING_BUFF_DBG_LIST)
+ pdev->debug_rx_buff_index = 0;
} else {
pdev->rx_ring.buf.netbufs_ring[idx] = rx_netbuf;
}
@@ -2476,6 +2482,7 @@ htt_rx_hash_list_lookup(struct htt_pdev_t *pdev, u_int32_t paddr)
HTT_RX_HASH_COOKIE_CHECK(hash_entry);
if (hash_entry->paddr == paddr) {
+ uint32_t index;
/* Found the entry corresponding to paddr */
netbuf = hash_entry->netbuf;
htt_list_remove(&hash_entry->listnode);
@@ -2488,6 +2495,12 @@ htt_rx_hash_list_lookup(struct htt_pdev_t *pdev, u_int32_t paddr)
else {
adf_os_mem_free(hash_entry);
}
+ index = NBUF_MAP_ID(netbuf);
+ if (index < HTT_RX_RING_BUFF_DBG_LIST) {
+ pdev->debug_Rx_buff_list[index].in_use = false;
+ pdev->debug_Rx_buff_list[index].paddr = 0;
+ pdev->debug_Rx_buff_list[index].vaddr = NULL;
+ }
break;
}
}
diff --git a/CORE/CLD_TXRX/HTT/htt_types.h b/CORE/CLD_TXRX/HTT/htt_types.h
index 59780705fb1c..5d845b3b099a 100644
--- a/CORE/CLD_TXRX/HTT/htt_types.h
+++ b/CORE/CLD_TXRX/HTT/htt_types.h
@@ -61,6 +61,7 @@
#define HTT_TX_EXT_TID_INVALID 31
#define HTT_TX_EXT_TID_NONPAUSE 19
+#define HTT_RX_RING_BUFF_DBG_LIST 1024
/**
* @brief General specification of the tx frame contents
*
@@ -197,6 +198,13 @@ struct htt_tx_credit_t
adf_os_atomic_t target_delta;
};
+struct rx_buf_debug {
+ uint32_t paddr;
+ void * vaddr;
+ bool in_use;
+};
+
+
struct htt_pdev_t {
ol_pdev_handle ctrl_pdev;
ol_txrx_pdev_handle txrx_pdev;
@@ -353,6 +361,10 @@ struct htt_pdev_t {
#endif /* IPA_UC_OFFLOAD */
struct htt_tx_credit_t htt_tx_credit;
+
+ struct rx_buf_debug debug_Rx_buff_list[HTT_RX_RING_BUFF_DBG_LIST];
+ int debug_rx_buff_index;
+
};
#endif /* _HTT_TYPES__H_ */
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
index 542540c7f5e1..fdc3929e84a8 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
@@ -78,6 +78,7 @@ struct cvg_nbuf_cb {
union {
struct sk_buff *parent;
void *ptr;
+ uint32_t map_index;
} txrx_field;
/*
@@ -128,6 +129,9 @@ struct cvg_nbuf_cb {
(((struct cvg_nbuf_cb *)((skb)->cb))->txrx_field.ptr)
#endif
+#define NBUF_MAP_ID(skb) \
+ (((struct cvg_nbuf_cb *)((skb)->cb))->txrx_field.map_index)
+
#ifdef QCA_MDM_DEVICE
#define NBUF_OWNER_ID(skb) \
(((struct cvg_nbuf_cb *)((skb)->cb))->owner_id)