qcacmn: Counters to track when wifi firmware drops in Tx path
Incremented an counter when wifi FW drops the packet in DS mode with reason as FW2WBM_TX_STATUS_DROP and we can dump it via 260 output Change-Id: Ieb52b0af6dca66732f34cc7f1cfba5c467e9507f CRs-Fixed: 3383509
This commit is contained in:

committed by
Madan Koyyalamudi

parent
97524335e8
commit
d30d545aee
@@ -1914,6 +1914,7 @@ struct cdp_tx_ingress_stats {
|
|||||||
uint32_t drop_ingress;
|
uint32_t drop_ingress;
|
||||||
uint32_t invalid_peer_id_in_exc_path;
|
uint32_t invalid_peer_id_in_exc_path;
|
||||||
uint32_t tx_mcast_drop;
|
uint32_t tx_mcast_drop;
|
||||||
|
uint32_t fw2wbm_tx_drop;
|
||||||
} dropped;
|
} dropped;
|
||||||
|
|
||||||
/* Mesh packets info */
|
/* Mesh packets info */
|
||||||
|
@@ -954,6 +954,34 @@ QDF_STATUS dp_sawf_tx_enqueue_fail_peer_stats(struct dp_soc *soc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_SUPPORT_PPEDS
|
#ifdef WLAN_SUPPORT_PPEDS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dp_ppeds_stats() - Accounting fw2wbm_tx_drop drops in Tx path
|
||||||
|
* @soc: Handle to DP Soc structure
|
||||||
|
* @peer_id: Peer ID in the descriptor
|
||||||
|
*
|
||||||
|
* Return: NONE
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void dp_ppeds_stats(struct dp_soc *soc, uint16_t peer_id)
|
||||||
|
{
|
||||||
|
struct dp_vdev *vdev = NULL;
|
||||||
|
struct dp_txrx_peer *txrx_peer = NULL;
|
||||||
|
dp_txrx_ref_handle txrx_ref_handle = NULL;
|
||||||
|
|
||||||
|
DP_STATS_INC(soc, tx.fw2wbm_tx_drop, 1);
|
||||||
|
txrx_peer = dp_txrx_peer_get_ref_by_id(soc,
|
||||||
|
peer_id,
|
||||||
|
&txrx_ref_handle,
|
||||||
|
DP_MOD_ID_TX_COMP);
|
||||||
|
if (txrx_peer) {
|
||||||
|
vdev = txrx_peer->vdev;
|
||||||
|
DP_STATS_INC(vdev, tx_i.dropped.fw2wbm_tx_drop, 1);
|
||||||
|
dp_txrx_peer_unref_delete(txrx_ref_handle, DP_MOD_ID_TX_COMP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_ppeds_tx_comp_handler()- Handle tx completions for ppe2tcl ring
|
* dp_ppeds_tx_comp_handler()- Handle tx completions for ppe2tcl ring
|
||||||
* @soc: Handle to DP Soc structure
|
* @soc: Handle to DP Soc structure
|
||||||
@@ -965,7 +993,7 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|||||||
{
|
{
|
||||||
uint32_t num_avail_for_reap = 0;
|
uint32_t num_avail_for_reap = 0;
|
||||||
void *tx_comp_hal_desc;
|
void *tx_comp_hal_desc;
|
||||||
uint8_t buf_src;
|
uint8_t buf_src, status = 0;
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
struct dp_tx_desc_s *tx_desc = NULL;
|
struct dp_tx_desc_s *tx_desc = NULL;
|
||||||
struct dp_tx_desc_s *head_desc = NULL;
|
struct dp_tx_desc_s *head_desc = NULL;
|
||||||
@@ -1026,6 +1054,10 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|||||||
tx_desc->buffer_src = buf_src;
|
tx_desc->buffer_src = buf_src;
|
||||||
|
|
||||||
if (qdf_unlikely(buf_src == HAL_TX_COMP_RELEASE_SOURCE_FW)) {
|
if (qdf_unlikely(buf_src == HAL_TX_COMP_RELEASE_SOURCE_FW)) {
|
||||||
|
status = hal_tx_comp_get_tx_status(tx_comp_hal_desc);
|
||||||
|
if (status != HTT_TX_FW2WBM_TX_STATUS_OK)
|
||||||
|
dp_ppeds_stats(soc, tx_desc->peer_id);
|
||||||
|
|
||||||
qdf_nbuf_free(tx_desc->nbuf);
|
qdf_nbuf_free(tx_desc->nbuf);
|
||||||
dp_ppeds_tx_desc_free(soc, tx_desc);
|
dp_ppeds_tx_desc_free(soc, tx_desc);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -227,6 +227,18 @@ void dp_tx_desc_pool_deinit_be(struct dp_soc *soc,
|
|||||||
* Return: Number of tx completions processed
|
* Return: Number of tx completions processed
|
||||||
*/
|
*/
|
||||||
int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota);
|
int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dp_ppeds_stats() - Accounting fw2wbm_tx_drop drops in Tx path
|
||||||
|
* @soc: Handle to DP Soc structure
|
||||||
|
* @peer_id: Peer ID in the descriptor
|
||||||
|
*
|
||||||
|
* Return: NONE
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void dp_ppeds_stats(struct dp_soc *soc, uint16_t peer_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_FEATURE_11BE_MLO
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
/**
|
/**
|
||||||
|
@@ -7476,6 +7476,8 @@ dp_print_pdev_tx_stats(struct dp_pdev *pdev)
|
|||||||
pdev->stats.tx_i.dropped.invalid_peer_id_in_exc_path);
|
pdev->stats.tx_i.dropped.invalid_peer_id_in_exc_path);
|
||||||
DP_PRINT_STATS(" Tx Mcast Drop = %u",
|
DP_PRINT_STATS(" Tx Mcast Drop = %u",
|
||||||
pdev->stats.tx_i.dropped.tx_mcast_drop);
|
pdev->stats.tx_i.dropped.tx_mcast_drop);
|
||||||
|
DP_PRINT_STATS(" PPE-DS FW2WBM Tx Drop = %u",
|
||||||
|
pdev->stats.tx_i.dropped.fw2wbm_tx_drop);
|
||||||
DP_PRINT_STATS("Tx failed = %u",
|
DP_PRINT_STATS("Tx failed = %u",
|
||||||
pdev->stats.tx.tx_failed);
|
pdev->stats.tx.tx_failed);
|
||||||
DP_PRINT_STATS(" FW removed Pkts = %u",
|
DP_PRINT_STATS(" FW removed Pkts = %u",
|
||||||
@@ -7726,6 +7728,9 @@ void dp_print_tx_ppeds_stats(struct dp_soc *soc)
|
|||||||
{
|
{
|
||||||
if (soc->arch_ops.dp_tx_ppeds_inuse_desc)
|
if (soc->arch_ops.dp_tx_ppeds_inuse_desc)
|
||||||
soc->arch_ops.dp_tx_ppeds_inuse_desc(soc);
|
soc->arch_ops.dp_tx_ppeds_inuse_desc(soc);
|
||||||
|
|
||||||
|
DP_PRINT_STATS("PPE-DS Tx desc fw2wbm_tx_drop %u",
|
||||||
|
soc->stats.tx.fw2wbm_tx_drop);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void dp_print_tx_ppeds_stats(struct dp_soc *soc)
|
void dp_print_tx_ppeds_stats(struct dp_soc *soc)
|
||||||
@@ -8838,7 +8843,8 @@ void dp_update_vdev_ingress_stats(struct dp_vdev *tgtobj)
|
|||||||
tgtobj->stats.tx_i.dropped.drop_ingress +
|
tgtobj->stats.tx_i.dropped.drop_ingress +
|
||||||
tgtobj->stats.tx_i.dropped.headroom_insufficient +
|
tgtobj->stats.tx_i.dropped.headroom_insufficient +
|
||||||
tgtobj->stats.tx_i.dropped.invalid_peer_id_in_exc_path +
|
tgtobj->stats.tx_i.dropped.invalid_peer_id_in_exc_path +
|
||||||
tgtobj->stats.tx_i.dropped.tx_mcast_drop;
|
tgtobj->stats.tx_i.dropped.tx_mcast_drop +
|
||||||
|
tgtobj->stats.tx_i.dropped.fw2wbm_tx_drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_update_vdev_rate_stats(struct cdp_vdev_stats *tgtobj,
|
void dp_update_vdev_rate_stats(struct cdp_vdev_stats *tgtobj,
|
||||||
@@ -8891,6 +8897,7 @@ void dp_update_pdev_ingress_stats(struct dp_pdev *tgtobj,
|
|||||||
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.headroom_insufficient);
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.headroom_insufficient);
|
||||||
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.invalid_peer_id_in_exc_path);
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.invalid_peer_id_in_exc_path);
|
||||||
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.tx_mcast_drop);
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.tx_mcast_drop);
|
||||||
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.dropped.fw2wbm_tx_drop);
|
||||||
DP_STATS_AGGR(tgtobj, srcobj, tx_i.cce_classified);
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.cce_classified);
|
||||||
DP_STATS_AGGR(tgtobj, srcobj, tx_i.cce_classified_raw);
|
DP_STATS_AGGR(tgtobj, srcobj, tx_i.cce_classified_raw);
|
||||||
DP_STATS_AGGR_PKT(tgtobj, srcobj, tx_i.sniffer_rcvd);
|
DP_STATS_AGGR_PKT(tgtobj, srcobj, tx_i.sniffer_rcvd);
|
||||||
|
@@ -1196,6 +1196,8 @@ struct dp_soc_stats {
|
|||||||
uint32_t tx_comp_force_freed;
|
uint32_t tx_comp_force_freed;
|
||||||
/* Tx completion ring near full */
|
/* Tx completion ring near full */
|
||||||
uint32_t near_full;
|
uint32_t near_full;
|
||||||
|
/* Tx drops with buffer src as HAL_TX_COMP_RELEASE_SOURCE_FW */
|
||||||
|
uint32_t fw2wbm_tx_drop;
|
||||||
} tx;
|
} tx;
|
||||||
|
|
||||||
/* SOC level RX stats */
|
/* SOC level RX stats */
|
||||||
|
Reference in New Issue
Block a user