qcacmn: Update PPDU drop counter

Update PPDU drop counter from monitor ring

CRs-Fixed: 3341905
Change-Id: I63f5b4d6a3e1e0155cf0558bea18704df073e2a9
这个提交包含在:
Amir Patel
2022-11-21 12:23:32 +05:30
提交者 Madan Koyyalamudi
父节点 2a525d7545
当前提交 af0472aa08
修改 4 个文件,包含 91 行新增1 行删除

查看文件

@@ -413,6 +413,10 @@ enum cdp_mon_phyrx_abort_reason_code {
* @total_ppdu_info_drop: Number of PPDUs dropped * @total_ppdu_info_drop: Number of PPDUs dropped
* @total_ppdu_info_alloc: Number of PPDU info allocated * @total_ppdu_info_alloc: Number of PPDU info allocated
* @total_ppdu_info_free: Number of PPDU info freed * @total_ppdu_info_free: Number of PPDU info freed
* @ppdu_drop_cnt: Total PPDU drop count
* @mpdu_drop_cnt: Total MPDU drop count
* @end_of_ppdu_drop_cnt: Total end of ppdu drop count
* @tlv_drop_cnt: TLV drop count
*/ */
struct cdp_pdev_mon_stats { struct cdp_pdev_mon_stats {
#ifndef REMOVE_MON_DBG_STATS #ifndef REMOVE_MON_DBG_STATS
@@ -468,6 +472,10 @@ struct cdp_pdev_mon_stats {
uint32_t total_ppdu_info_drop; uint32_t total_ppdu_info_drop;
uint32_t total_ppdu_info_alloc; uint32_t total_ppdu_info_alloc;
uint32_t total_ppdu_info_free; uint32_t total_ppdu_info_free;
uint32_t ppdu_drop_cnt;
uint32_t mpdu_drop_cnt;
uint32_t end_of_ppdu_drop_cnt;
uint32_t tlv_drop_cnt;
}; };
#ifdef QCA_SUPPORT_LITE_MONITOR #ifdef QCA_SUPPORT_LITE_MONITOR

查看文件

@@ -60,6 +60,29 @@ void dp_rx_mon_print_tag_buf(uint8_t *buf, uint16_t room)
#endif #endif
/**
* dp_rx_mon_update_drop_cnt() - Update drop statistics
*
* @mon_pdev: monitor pdev
* @hal_mon_rx_desc: HAL monitor desc
*
* Return: void
*/
static inline void
dp_rx_mon_update_drop_cnt(struct dp_mon_pdev *mon_pdev,
struct hal_mon_desc *hal_mon_rx_desc)
{
mon_pdev->rx_mon_stats.empty_desc_ppdu++;
mon_pdev->rx_mon_stats.ppdu_drop_cnt +=
hal_mon_rx_desc->ppdu_drop_count;
mon_pdev->rx_mon_stats.mpdu_drop_cnt +=
hal_mon_rx_desc->mpdu_drop_count;
if (hal_mon_rx_desc->end_of_ppdu_dropped)
mon_pdev->rx_mon_stats.end_of_ppdu_drop_cnt++;
mon_pdev->rx_mon_stats.tlv_drop_cnt +=
hal_mon_rx_desc->tlv_drop_count;
}
static static
void dp_rx_mon_set_zero(qdf_nbuf_t nbuf) void dp_rx_mon_set_zero(qdf_nbuf_t nbuf)
{ {
@@ -1356,6 +1379,18 @@ uint8_t dp_rx_mon_process_tlv_status(struct dp_pdev *pdev,
ppdu_info->rx_hdr_rcvd[user_id] = false; ppdu_info->rx_hdr_rcvd[user_id] = false;
} }
break; break;
case HAL_TLV_STATUS_MON_DROP:
{
mon_pdev->rx_mon_stats.ppdu_drop_cnt +=
ppdu_info->drop_cnt.ppdu_drop_cnt;
mon_pdev->rx_mon_stats.mpdu_drop_cnt +=
ppdu_info->drop_cnt.mpdu_drop_cnt;
mon_pdev->rx_mon_stats.end_of_ppdu_drop_cnt +=
ppdu_info->drop_cnt.end_of_ppdu_drop_cnt;
mon_pdev->rx_mon_stats.tlv_drop_cnt +=
ppdu_info->drop_cnt.tlv_drop_cnt;
}
break;
} }
return num_buf_reaped; return num_buf_reaped;
} }
@@ -1704,7 +1739,7 @@ dp_rx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
mon_pdev); mon_pdev);
rx_mon_dst_ring_desc = rx_mon_dst_ring_desc =
hal_srng_dst_get_next(hal_soc, mon_dst_srng); hal_srng_dst_get_next(hal_soc, mon_dst_srng);
mon_pdev->rx_mon_stats.empty_desc_ppdu++; dp_rx_mon_update_drop_cnt(mon_pdev, &hal_mon_rx_desc);
continue; continue;
} }
mon_desc = (struct dp_mon_desc *)(uintptr_t)(hal_mon_rx_desc.buf_addr); mon_desc = (struct dp_mon_desc *)(uintptr_t)(hal_mon_rx_desc.buf_addr);
@@ -2048,5 +2083,13 @@ void dp_mon_rx_print_advanced_stats_2_0(struct dp_soc *soc,
mon_pdev->rx_mon_stats.mpdu_decap_type_invalid); mon_pdev->rx_mon_stats.mpdu_decap_type_invalid);
DP_PRINT_STATS("total_free_elem= %d", DP_PRINT_STATS("total_free_elem= %d",
mon_pdev_be->total_free_elem); mon_pdev_be->total_free_elem);
DP_PRINT_STATS("ppdu_drop_cnt= %d",
mon_pdev->rx_mon_stats.ppdu_drop_cnt);
DP_PRINT_STATS("mpdu_drop_cnt= %d",
mon_pdev->rx_mon_stats.mpdu_drop_cnt);
DP_PRINT_STATS("end_of_ppdu_drop_cnt= %d",
mon_pdev->rx_mon_stats.end_of_ppdu_drop_cnt);
DP_PRINT_STATS("tlv_drop_cnt= %d",
mon_pdev->rx_mon_stats.tlv_drop_cnt);
} }
#endif #endif

查看文件

@@ -22,6 +22,7 @@
#ifdef QCA_MONITOR_2_0_SUPPORT #ifdef QCA_MONITOR_2_0_SUPPORT
#include <mon_ingress_ring.h> #include <mon_ingress_ring.h>
#include <mon_destination_ring.h> #include <mon_destination_ring.h>
#include <mon_drop.h>
#endif #endif
#include <hal_be_hw_headers.h> #include <hal_be_hw_headers.h>
#include "hal_api_mon.h" #include "hal_api_mon.h"
@@ -1876,6 +1877,18 @@ hal_rx_status_get_mon_buf_addr(uint8_t *rx_tlv,
ppdu_info->packet_info.truncated = addr->truncated; ppdu_info->packet_info.truncated = addr->truncated;
} }
static inline void
hal_rx_update_ppdu_drop_cnt(uint8_t *rx_tlv,
struct hal_rx_ppdu_info *ppdu_info)
{
struct mon_drop *drop_cnt = (struct mon_drop *)rx_tlv;
ppdu_info->drop_cnt.ppdu_drop_cnt = drop_cnt->ppdu_drop_cnt;
ppdu_info->drop_cnt.mpdu_drop_cnt = drop_cnt->mpdu_drop_cnt;
ppdu_info->drop_cnt.end_of_ppdu_drop_cnt = drop_cnt->end_of_ppdu_seen;
ppdu_info->drop_cnt.tlv_drop_cnt = drop_cnt->tlv_drop_cnt;
}
#else #else
static inline void static inline void
hal_rx_status_get_mpdu_retry_cnt(struct hal_rx_ppdu_info *ppdu_info, hal_rx_status_get_mpdu_retry_cnt(struct hal_rx_ppdu_info *ppdu_info,
@@ -1888,6 +1901,12 @@ hal_rx_status_get_mon_buf_addr(uint8_t *rx_tlv,
struct hal_rx_ppdu_info *ppdu_info) struct hal_rx_ppdu_info *ppdu_info)
{ {
} }
static inline void
hal_rx_update_ppdu_drop_cnt(uint8_t *rx_tlv,
struct hal_rx_ppdu_info *ppdu_info)
{
}
#endif #endif
#ifdef WLAN_SUPPORT_CTRL_FRAME_STATS #ifdef WLAN_SUPPORT_CTRL_FRAME_STATS
@@ -3051,6 +3070,9 @@ hal_rx_status_get_tlv_info_generic_be(void *rx_tlv_hdr, void *ppduinfo,
hal_rx_status_get_mon_buf_addr(rx_tlv, ppdu_info); hal_rx_status_get_mon_buf_addr(rx_tlv, ppdu_info);
return HAL_TLV_STATUS_MON_BUF_ADDR; return HAL_TLV_STATUS_MON_BUF_ADDR;
case WIFIMON_DROP_E:
hal_rx_update_ppdu_drop_cnt(rx_tlv, ppdu_info);
return HAL_TLV_STATUS_MON_DROP;
case 0: case 0:
return HAL_TLV_STATUS_PPDU_DONE; return HAL_TLV_STATUS_PPDU_DONE;
case WIFIRX_STATUS_BUFFER_DONE_E: case WIFIRX_STATUS_BUFFER_DONE_E:

查看文件

@@ -80,6 +80,7 @@
#define HAL_TLV_STATUS_MSDU_END 8 #define HAL_TLV_STATUS_MSDU_END 8
#define HAL_TLV_STATUS_MON_BUF_ADDR 9 #define HAL_TLV_STATUS_MON_BUF_ADDR 9
#define HAL_TLV_STATUS_MPDU_START 10 #define HAL_TLV_STATUS_MPDU_START 10
#define HAL_TLV_STATUS_MON_DROP 11
#define HAL_MAX_UL_MU_USERS 37 #define HAL_MAX_UL_MU_USERS 37
@@ -342,6 +343,20 @@ enum {
DP_PPDU_STATUS_DONE, DP_PPDU_STATUS_DONE,
}; };
/**
* struct hal_rx_ppdu_drop_cnt - PPDU drop count
* @ppdu_drop_cnt: PPDU drop count
* @mpdu_drop_cnt: MPDU drop count
* @end_of_ppdu_drop_cnt: End of PPDU drop count
* @tlv_drop_cnt: TLV drop count
*/
struct hal_rx_ppdu_drop_cnt {
uint8_t ppdu_drop_cnt;
uint16_t mpdu_drop_cnt;
uint8_t end_of_ppdu_drop_cnt;
uint16_t tlv_drop_cnt;
};
static inline QDF_STATUS static inline QDF_STATUS
hal_rx_reo_ent_get_src_link_id(hal_soc_handle_t hal_soc_hdl, hal_rx_reo_ent_get_src_link_id(hal_soc_handle_t hal_soc_hdl,
hal_rxdma_desc_t rx_desc, hal_rxdma_desc_t rx_desc,
@@ -1303,6 +1318,8 @@ struct hal_rx_ppdu_info {
uint8_t end_user_stats_cnt; uint8_t end_user_stats_cnt;
/* PPDU start user info count */ /* PPDU start user info count */
uint8_t start_user_info_cnt; uint8_t start_user_info_cnt;
/* PPDU drop cnt */
struct hal_rx_ppdu_drop_cnt drop_cnt;
}; };
static inline uint32_t static inline uint32_t