diff --git a/core/dp/ol/inc/ol_txrx_htt_api.h b/core/dp/ol/inc/ol_txrx_htt_api.h index c6e394ba97ba..9bc38bd10c7c 100644 --- a/core/dp/ol/inc/ol_txrx_htt_api.h +++ b/core/dp/ol/inc/ol_txrx_htt_api.h @@ -117,6 +117,9 @@ enum htt_tx_status { /* no_ack - sent, but no ack */ htt_tx_status_no_ack = HTT_TX_COMPL_IND_STAT_NO_ACK, + /* drop may due to tx descriptor not enough*/ + htt_tx_status_drop = HTT_TX_COMPL_IND_STAT_DROP, + /* download_fail - host could not deliver the tx frame to target */ htt_tx_status_download_fail = HTT_HOST_ONLY_STATUS_CODE_START, }; diff --git a/core/dp/ol/inc/ol_txrx_stats.h b/core/dp/ol/inc/ol_txrx_stats.h index 4c2a073e0209..8d966a51a90d 100644 --- a/core/dp/ol/inc/ol_txrx_stats.h +++ b/core/dp/ol/inc/ol_txrx_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012, 2014-2017, 2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -78,6 +78,12 @@ struct ol_txrx_stats_tx_dropped { */ struct ol_txrx_stats_elem no_ack; + /* + * MSDUs which the target drop + * (lack of tx descriptor) + */ + struct ol_txrx_stats_elem target_drop; + /* MSDU which were dropped for other reasons */ struct ol_txrx_stats_elem others; }; diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index bf412d3a6198..b61a4bfaf265 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -4179,10 +4179,11 @@ void ol_txrx_stats_display(ol_txrx_pdev_handle pdev, pdev->stats.pub.tx.dropped.download_fail.pkts + pdev->stats.pub.tx.dropped.target_discard.pkts + pdev->stats.pub.tx.dropped.no_ack.pkts + + pdev->stats.pub.tx.dropped.target_drop.pkts + pdev->stats.pub.tx.dropped.others.pkts; if (level == QDF_STATS_VERBOSITY_LEVEL_LOW) { - txrx_nofl_dbg("STATS |%u %u|TX: %lld tso %lld ok %lld drops(%u-%lld %u-%lld %u-%lld ?-%lld hR-%lld)|RX: %lld drops(E %lld PI %lld ME %lld) fwd(S %d F %d SF %d)|", + txrx_nofl_dbg("STATS |%u %u|TX: %lld tso %lld ok %lld drops(%u-%lld %u-%lld %u-%lld %u-%lld ?-%lld hR-%lld)|RX: %lld drops(E %lld PI %lld ME %lld) fwd(S %d F %d SF %d)|", pdev->tx_desc.num_free, pdev->tx_desc.pool_size, pdev->stats.pub.tx.from_stack.pkts, @@ -4195,6 +4196,8 @@ void ol_txrx_stats_display(ol_txrx_pdev_handle pdev, target_discard.pkts, htt_tx_status_no_ack, pdev->stats.pub.tx.dropped.no_ack.pkts, + htt_tx_status_drop, + pdev->stats.pub.tx.dropped.target_drop.pkts, pdev->stats.pub.tx.dropped.others.pkts, pdev->stats.pub.tx.dropped.host_reject.pkts, pdev->stats.pub.rx.delivered.pkts, @@ -4219,8 +4222,9 @@ void ol_txrx_stats_display(ol_txrx_pdev_handle pdev, tx_dropped, pdev->stats.pub.tx.dropped.download_fail.bytes + pdev->stats.pub.tx.dropped.target_discard.bytes + + pdev->stats.pub.tx.dropped.target_drop.bytes + pdev->stats.pub.tx.dropped.no_ack.bytes); - txrx_nofl_info("successfully delivered: %lld (%lld B), download fail: %lld (%lld B), target discard: %lld (%lld B), no ack: %lld (%lld B) others: %lld (%lld B)", + txrx_nofl_info("successfully delivered: %lld (%lld B), download fail: %lld (%lld B), target discard: %lld (%lld B), no ack: %lld (%lld B),target drop: %lld (%lld B), others: %lld (%lld B)", pdev->stats.pub.tx.delivered.pkts, pdev->stats.pub.tx.delivered.bytes, pdev->stats.pub.tx.dropped.download_fail.pkts, @@ -4229,6 +4233,8 @@ void ol_txrx_stats_display(ol_txrx_pdev_handle pdev, pdev->stats.pub.tx.dropped.target_discard.bytes, pdev->stats.pub.tx.dropped.no_ack.pkts, pdev->stats.pub.tx.dropped.no_ack.bytes, + pdev->stats.pub.tx.dropped.target_drop.pkts, + pdev->stats.pub.tx.dropped.target_drop.bytes, pdev->stats.pub.tx.dropped.others.pkts, pdev->stats.pub.tx.dropped.others.bytes); txrx_nofl_info("Tx completions per HTT message:\n" diff --git a/core/dp/txrx/ol_txrx_internal.h b/core/dp/txrx/ol_txrx_internal.h index f663fff8baa5..dcd3e42ac56c 100644 --- a/core/dp/txrx/ol_txrx_internal.h +++ b/core/dp/txrx/ol_txrx_internal.h @@ -214,6 +214,9 @@ ol_rx_mpdu_list_next(struct ol_txrx_pdev_t *pdev, netbuf); \ else if (status == htt_tx_status_no_ack) \ TXRX_STATS_MSDU_INCR(pdev, tx.dropped.no_ack, netbuf); \ + else if (status == htt_tx_status_drop) \ + TXRX_STATS_MSDU_INCR(pdev, tx.dropped.target_drop, \ + netbuf); \ else if (status == htt_tx_status_download_fail) \ TXRX_STATS_MSDU_INCR(pdev, tx.dropped.download_fail, \ netbuf); \ @@ -270,6 +273,12 @@ ol_rx_mpdu_list_next(struct ol_txrx_pdev_t *pdev, TXRX_STATS_ADD(_pdev, pub.tx.dropped.no_ack.bytes, \ _b_cntrs); \ break; \ + case htt_tx_status_drop: \ + TXRX_STATS_ADD(_pdev, \ + pub.tx.dropped.target_drop.pkts, _p_cntrs);\ + TXRX_STATS_ADD(_pdev, \ + pub.tx.dropped.target_drop.bytes, _b_cntrs);\ + break; \ case htt_tx_status_download_fail: \ TXRX_STATS_ADD(_pdev, \ pub.tx.dropped.download_fail.pkts, _p_cntrs); \