diff options
| author | Himanshu Agarwal <himanaga@codeaurora.org> | 2017-03-06 17:09:25 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2017-03-09 21:08:36 -0800 |
| commit | 18cb5b19627b08e48e9b9ac741bcddef0332b0b2 (patch) | |
| tree | 5e8e4bce68dc25b36a655e2e5b9ab3acfed112b6 | |
| parent | b8adec3a2773c519faf2c09c7bc69ca5b5fbe723 (diff) | |
qcacld-3.0: Record ol rx indication events
Record ol rx indication events in a global ol rx indication record
buffer to have history of msdus received, no. of buffers replenished,
etc. in rx indication messages.
Change-Id: I96cf27a209c81208c6f6566b5e57116b2cf233e8
CRs-Fixed: 2012485
| -rw-r--r-- | Kbuild | 5 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx.c | 70 |
2 files changed, 74 insertions, 1 deletions
@@ -1578,6 +1578,11 @@ CDEFINES += -DAR900B ifeq ($(CONFIG_64BIT_PADDR),y) CDEFINES += -DHTT_PADDR64 endif + +ifeq ($(CONFIG_SLUB_DEBUG_ON),y) +CDEFINES += -DOL_RX_INDICATION_RECORD +endif + endif endif diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index a8258addc0cf..0aae0cf54eae 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -63,6 +63,68 @@ #include <pld_common.h> + +#define OL_RX_INDICATION_MAX_RECORDS 2048 + +/** + * enum ol_rx_ind_record_type - OL rx indication events + * @OL_RX_INDICATION_POP_START: event recorded before netbuf pop + * @OL_RX_INDICATION_POP_END: event recorded after netbuf pop + * @OL_RX_INDICATION_BUF_REPLENISH: event recorded after buffer replenishment + */ +enum ol_rx_ind_record_type { + OL_RX_INDICATION_POP_START, + OL_RX_INDICATION_POP_END, + OL_RX_INDICATION_BUF_REPLENISH, +}; + +/** + * struct ol_rx_ind_record - structure for detailing ol txrx rx ind. event + * @value: info corresponding to rx indication event + * @type: what the event was + * @time: when it happened + */ +struct ol_rx_ind_record { + uint16_t value; + enum ol_rx_ind_record_type type; + uint64_t time; +}; + +#ifdef OL_RX_INDICATION_RECORD +static uint32_t ol_rx_ind_record_index; +static struct ol_rx_ind_record + ol_rx_indication_record_history[OL_RX_INDICATION_MAX_RECORDS]; + +/** + * ol_rx_ind_record_event() - record ol rx indication events + * @value: contains rx ind. event related info + * @type: ol rx indication message type + * + * This API record the ol rx indiation event in a rx indication + * record buffer. + * + * Return: None + */ +static void ol_rx_ind_record_event(uint32_t value, + enum ol_rx_ind_record_type type) +{ + ol_rx_indication_record_history[ol_rx_ind_record_index].value = value; + ol_rx_indication_record_history[ol_rx_ind_record_index].type = type; + ol_rx_indication_record_history[ol_rx_ind_record_index].time = + qdf_get_log_timestamp(); + + ol_rx_ind_record_index++; + if (ol_rx_ind_record_index >= OL_RX_INDICATION_MAX_RECORDS) + ol_rx_ind_record_index = 0; +} +#else +static inline +void ol_rx_ind_record_event(uint32_t value, enum ol_rx_ind_record_type type) +{ +} + +#endif /* OL_RX_INDICATION_RECORD */ + void ol_rx_data_process(struct ol_txrx_peer_t *peer, qdf_nbuf_t rx_buf_list); @@ -1355,6 +1417,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, #ifdef WDI_EVENT_ENABLE uint8_t pktlog_bit; #endif + uint32_t filled = 0; if (pdev) { if (qdf_unlikely(QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())) @@ -1383,12 +1446,16 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, /* Get the total number of MSDUs */ msdu_count = HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_GET(*(msg_word + 1)); + ol_rx_ind_record_event(msdu_count, OL_RX_INDICATION_POP_START); + /* * Get a linked list of the MSDUs in the rx in order indication. * This also attaches each rx MSDU descriptor to the * corresponding rx MSDU network buffer. */ status = htt_rx_amsdu_pop(htt_pdev, rx_ind_msg, &head_msdu, &tail_msdu); + ol_rx_ind_record_event(status, OL_RX_INDICATION_POP_END); + if (qdf_unlikely(0 == status)) { TXRX_PRINT(TXRX_PRINT_LEVEL_WARN, "%s: Pop status is 0, returning here\n", __func__); @@ -1398,7 +1465,8 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, /* Replenish the rx buffer ring first to provide buffers to the target rather than waiting for the indeterminate time taken by the OS to consume the rx frames */ - htt_rx_msdu_buff_in_order_replenish(htt_pdev, msdu_count); + filled = htt_rx_msdu_buff_in_order_replenish(htt_pdev, msdu_count); + ol_rx_ind_record_event(filled, OL_RX_INDICATION_BUF_REPLENISH); /* Send the chain of MSDUs to the OS */ /* rx_opt_proc takes a NULL-terminated list of msdu netbufs */ |
