summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirav Shah <nnshah@qti.qualcomm.com>2015-03-26 16:38:14 +0530
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-05-08 15:44:02 +0530
commit2948afce0d868f52c8ba4b002c3d5cf73a620c8c (patch)
tree01472251c9be7be763dd964e08d389fb23b0f8f1
parent056c6be57e2188aa98e110a13be6c90f0c03054c (diff)
qcacld: Add rx forward stats in txrx stats
Add statistics for packets received for intra bss forward as part of txrx stats. CRs-Fixed: 826395 Change-Id: Id5016dc891c67c7823954556c97014271a71de83
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_rx_fwd.c11
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx.c34
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_stats.h14
3 files changed, 36 insertions, 23 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c b/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
index 7a71fe01d92a..f37f302d632e 100644
--- a/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
+++ b/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
@@ -130,7 +130,6 @@ ol_rx_fwd_to_tx(struct ol_txrx_vdev_t *vdev, adf_nbuf_t msdu)
*/
adf_nbuf_map_single(pdev->osdev, msdu, ADF_OS_DMA_TO_DEVICE);
adf_nbuf_set_next(msdu, NULL); /* add NULL terminator */
- TXRX_STATS_MSDU_INCR(vdev->pdev, rx.forwarded, msdu);
/* for HL, point to payload before send to tx again.*/
if (pdev->cfg.is_high_latency) {
@@ -217,13 +216,17 @@ ol_rx_fwd_check(
htt_rx_msdu_desc_free(pdev->htt_pdev, msdu);
ol_rx_fwd_to_tx(tx_vdev, msdu);
msdu = NULL; /* already handled this MSDU */
+ TXRX_STATS_ADD(pdev, pub.rx.intra_bss_fwd.packets_fwd, 1);
} else {
- adf_nbuf_t copy;
- copy = adf_nbuf_copy(msdu);
+ adf_nbuf_t copy;
+ copy = adf_nbuf_copy(msdu);
if (copy) {
- ol_rx_fwd_to_tx(tx_vdev, copy);
+ ol_rx_fwd_to_tx(tx_vdev, copy);
}
+ TXRX_STATS_ADD(pdev, pub.rx.intra_bss_fwd.packets_stack_n_fwd, 1);
}
+ } else {
+ TXRX_STATS_ADD(pdev, pub.rx.intra_bss_fwd.packets_stack, 1);
}
if (msdu) {
/* send this frame to the OS */
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c
index 66ab7a74b926..b92cf8089491 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c
@@ -2156,18 +2156,18 @@ void
ol_txrx_stats_display(ol_txrx_pdev_handle pdev)
{
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR, "TXRX Stats:");
+ adf_os_print("TXRX Stats:\n");
if (TXRX_STATS_LEVEL == TXRX_STATS_LEVEL_BASIC) {
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- " tx: %lld msdus (%lld B) rejected %lld (%lld B)",
+ adf_os_print(
+ " tx: %lld msdus (%lld B) rejected %lld (%lld B) \n",
pdev->stats.pub.tx.delivered.pkts,
pdev->stats.pub.tx.delivered.bytes,
pdev->stats.pub.tx.dropped.host_reject.pkts,
pdev->stats.pub.tx.dropped.host_reject.bytes);
} else { /* full */
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_INFO,
- " tx: sent %lld msdus (%lld B), rejected %lld (%lld B)"
- " dropped %lld (%lld B)\n",
+ adf_os_print(
+ " tx: sent %lld msdus (%lld B), rejected %lld (%lld B)\n"
+ " dropped %lld (%lld B)\n",
pdev->stats.pub.tx.delivered.pkts,
pdev->stats.pub.tx.delivered.bytes,
pdev->stats.pub.tx.dropped.host_reject.pkts,
@@ -2178,7 +2178,7 @@ ol_txrx_stats_display(ol_txrx_pdev_handle pdev)
pdev->stats.pub.tx.dropped.download_fail.bytes
+ pdev->stats.pub.tx.dropped.target_discard.bytes
+ pdev->stats.pub.tx.dropped.no_ack.bytes);
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_INFO,
+ adf_os_print(
" download fail: %lld (%lld B), "
"target discard: %lld (%lld B), "
"no ack: %lld (%lld B)\n",
@@ -2207,19 +2207,19 @@ ol_txrx_stats_display(ol_txrx_pdev_handle pdev)
pdev->stats.pub.tx.comp_histogram.pkts_51_60,
pdev->stats.pub.tx.comp_histogram.pkts_61_plus);
}
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- " rx: %lld ppdus, %lld mpdus, %lld msdus, %lld bytes, %lld errs",
+ adf_os_print(
+ " rx: %lld ppdus, %lld mpdus, %lld msdus, %lld bytes, %lld errs\n",
pdev->stats.priv.rx.normal.ppdus,
pdev->stats.priv.rx.normal.mpdus,
pdev->stats.pub.rx.delivered.pkts,
pdev->stats.pub.rx.delivered.bytes,
pdev->stats.priv.rx.err.mpdu_bad);
- if (TXRX_STATS_LEVEL == TXRX_STATS_LEVEL_FULL) {
- VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_INFO,
- " forwarded %lld msdus, %lld bytes\n",
- pdev->stats.pub.rx.forwarded.pkts,
- pdev->stats.pub.rx.forwarded.bytes);
- }
+
+ adf_os_print(
+ " fwd to stack %d, fwd to fw %d, fwd to stack & fw %d\n",
+ pdev->stats.pub.rx.intra_bss_fwd.packets_stack,
+ pdev->stats.pub.rx.intra_bss_fwd.packets_fwd,
+ pdev->stats.pub.rx.intra_bss_fwd.packets_stack_n_fwd);
}
void
@@ -2230,8 +2230,8 @@ ol_txrx_stats_clear(ol_txrx_pdev_handle pdev)
pdev->stats.pub.tx.delivered.bytes = 0;
pdev->stats.pub.tx.dropped.host_reject.pkts = 0;
pdev->stats.pub.tx.dropped.host_reject.bytes = 0;
- adf_os_mem_zero(&pdev->stats.pub.rx.delivered,
- sizeof(pdev->stats.pub.rx.delivered));
+ adf_os_mem_zero(&pdev->stats.pub.rx,
+ sizeof(pdev->stats.pub.rx));
adf_os_mem_zero(&pdev->stats.priv.rx, sizeof(pdev->stats.priv.rx));
} else { /* Full */
adf_os_mem_zero(&pdev->stats, sizeof(pdev->stats));
diff --git a/CORE/SERVICES/COMMON/ol_txrx_stats.h b/CORE/SERVICES/COMMON/ol_txrx_stats.h
index bd64f5ce921e..afc67d543d7f 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_stats.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_stats.h
@@ -41,7 +41,11 @@
#define TXRX_STATS_LEVEL_FULL 2
#ifndef TXRX_STATS_LEVEL
+#ifdef CONFIG_HL_SUPPORT
#define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC
+#else
+#define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_FULL
+#endif
#endif
typedef struct {
@@ -83,8 +87,14 @@ struct ol_txrx_stats {
struct {
/* MSDUs given to the OS shim */
ol_txrx_stats_elem delivered;
- /* MSDUs forwarded from the rx path to the tx path */
- ol_txrx_stats_elem forwarded;
+ struct {
+ /* MSDUs forwarded to network stack */
+ u_int32_t packets_stack;
+ /* MSDUs forwarded from the rx path to the tx path */
+ u_int32_t packets_fwd;
+ /* MSDUs forwarded to stack and tx path */
+ u_int32_t packets_stack_n_fwd;
+ } intra_bss_fwd;
} rx;
};