qcacmn: Handle enhanced stats from Rx monitor path in Waikiki
Update enhanced stats from Rx monitor path in Waikiki. Populate mpdu_retry_cnt, sw_peer_id, mpdu_ok_byte_cnt and mdpu_err_byte_cnt from PPDU_END_USER_STATS TLV. Fix KW issue. Change-Id: I055ff84f6304ba71b09a9a75b8420183ab6e9d8a CRs-Fixed: 3134900
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9e4a8f0f21
commit
7148dfedf8
@@ -288,9 +288,8 @@ dp_rx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
||||
uint32_t mac_id, uint32_t quota)
|
||||
{
|
||||
struct dp_pdev *pdev = dp_get_pdev_for_lmac_id(soc, mac_id);
|
||||
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||
struct dp_mon_pdev_be *mon_pdev_be =
|
||||
dp_get_be_mon_pdev_from_dp_mon_pdev(mon_pdev);
|
||||
struct dp_mon_pdev *mon_pdev;
|
||||
struct dp_mon_pdev_be *mon_pdev_be;
|
||||
struct dp_mon_soc *mon_soc = soc->monitor_soc;
|
||||
struct dp_mon_soc_be *mon_soc_be = dp_get_be_mon_soc_from_dp_mon_soc(mon_soc);
|
||||
struct dp_mon_desc_pool *rx_mon_desc_pool = &mon_soc_be->rx_desc_mon;
|
||||
@@ -307,6 +306,8 @@ dp_rx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
||||
return work_done;
|
||||
}
|
||||
|
||||
mon_pdev = pdev->monitor_pdev;
|
||||
mon_pdev_be = dp_get_be_mon_pdev_from_dp_mon_pdev(mon_pdev);
|
||||
mon_dst_srng = soc->rxdma_mon_dst_ring[mac_id].hal_srng;
|
||||
|
||||
if (!mon_dst_srng || !hal_srng_initialized(mon_dst_srng)) {
|
||||
@@ -353,18 +354,21 @@ dp_rx_mon_srng_process_2_0(struct dp_soc *soc, struct dp_intr *int_ctx,
|
||||
mon_pdev_be->status[desc_idx++] = mon_desc;
|
||||
|
||||
rx_mon_dst_ring_desc = hal_srng_dst_get_next(hal_soc, mon_dst_srng);
|
||||
mon_pdev->rx_mon_stats.status_ppdu_done++;
|
||||
|
||||
if (hal_mon_rx_desc.end_reason == HAL_MON_STATUS_BUFFER_FULL)
|
||||
continue;
|
||||
|
||||
status = dp_rx_process_pktlog_be(soc, pdev, ppdu_info,
|
||||
mon_desc->buf_addr,
|
||||
hal_mon_rx_desc.end_offset);
|
||||
|
||||
if (hal_mon_rx_desc.end_reason == HAL_MON_STATUS_BUFFER_FULL)
|
||||
continue;
|
||||
|
||||
mon_pdev->rx_mon_stats.status_ppdu_done++;
|
||||
|
||||
ppdu_info = dp_rx_mon_process_status_tlv(pdev, desc_idx);
|
||||
|
||||
/* Call enhanced stats update API */
|
||||
if (mon_pdev->enhanced_stats_en && ppdu_info)
|
||||
dp_rx_handle_ppdu_stats(soc, pdev, ppdu_info);
|
||||
|
||||
/* Call API to add PPDU info workqueue */
|
||||
|
||||
|
@@ -49,7 +49,7 @@ dp_rx_process_pktlog_be(struct dp_soc *soc, struct dp_pdev *pdev,
|
||||
end_offset,
|
||||
RX_MON_MIN_HEAD_ROOM, true);
|
||||
|
||||
if (mon_pdev->dp_peer_based_pktlog) {
|
||||
if (mon_pdev->dp_peer_based_pktlog && ppdu_info) {
|
||||
dp_rx_process_peer_based_pktlog(soc, ppdu_info,
|
||||
nbuf, pdev->pdev_id);
|
||||
} else {
|
||||
|
@@ -450,6 +450,13 @@ hal_rx_handle_mu_ul_info(void *rx_tlv,
|
||||
HAL_RX_GET_64(rx_tlv, RX_PPDU_END_USER_STATS,
|
||||
SW_RESPONSE_REFERENCE_PTR_EXT);
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
hal_rx_handle_mu_ul_info(void *rx_tlv,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
hal_rx_populate_byte_count(void *rx_tlv, void *ppduinfo,
|
||||
@@ -468,25 +475,6 @@ hal_rx_populate_byte_count(void *rx_tlv, void *ppduinfo,
|
||||
mon_rx_user_status->mpdu_ok_byte_count = mpdu_ok_byte_count;
|
||||
mon_rx_user_status->mpdu_err_byte_count = mpdu_err_byte_count;
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
hal_rx_handle_mu_ul_info(void *rx_tlv,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
hal_rx_populate_byte_count(void *rx_tlv, void *ppduinfo,
|
||||
struct mon_rx_user_status *mon_rx_user_status)
|
||||
{
|
||||
struct hal_rx_ppdu_info *ppdu_info =
|
||||
(struct hal_rx_ppdu_info *)ppduinfo;
|
||||
|
||||
/* HKV1: doesn't support mpdu byte count */
|
||||
mon_rx_user_status->mpdu_ok_byte_count = ppdu_info->rx_status.ppdu_len;
|
||||
mon_rx_user_status->mpdu_err_byte_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
hal_rx_populate_mu_user_info(void *rx_tlv, void *ppduinfo, uint32_t user_id,
|
||||
@@ -533,7 +521,8 @@ hal_rx_populate_mu_user_info(void *rx_tlv, void *ppduinfo, uint32_t user_id,
|
||||
&ppdu_info->com_info.mpdu_fcs_ok_bitmap,
|
||||
HAL_RX_NUM_WORDS_PER_PPDU_BITMAP *
|
||||
sizeof(ppdu_info->com_info.mpdu_fcs_ok_bitmap[0]));
|
||||
|
||||
mon_rx_user_status->retry_mpdu =
|
||||
ppdu_info->rx_status.mpdu_retry_cnt;
|
||||
hal_rx_populate_byte_count(rx_tlv, ppdu_info, mon_rx_user_status);
|
||||
}
|
||||
|
||||
@@ -1592,6 +1581,24 @@ hal_rx_parse_receive_user_info(struct hal_soc *hal_soc, uint8_t *tlv,
|
||||
return HAL_TLV_STATUS_PPDU_NOT_DONE;
|
||||
}
|
||||
|
||||
#ifdef QCA_MONITOR_2_0_SUPPORT
|
||||
static inline void
|
||||
hal_rx_status_get_mpdu_retry_cnt(struct hal_rx_ppdu_info *ppdu_info,
|
||||
void *rx_tlv)
|
||||
{
|
||||
ppdu_info->rx_status.mpdu_retry_cnt =
|
||||
HAL_RX_GET_64(rx_tlv, RX_PPDU_END_USER_STATS,
|
||||
RETRIED_MPDU_COUNT);
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
hal_rx_status_get_mpdu_retry_cnt(struct hal_rx_ppdu_info *ppdu_info,
|
||||
void *rx_tlv)
|
||||
{
|
||||
ppdu_info->rx_status.mpdu_retry_cnt = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hal_rx_status_get_tlv_info() - process receive info TLV
|
||||
* @rx_tlv_hdr: pointer to TLV header
|
||||
@@ -1730,6 +1737,7 @@ hal_rx_status_get_tlv_info_generic_be(void *rx_tlv_hdr, void *ppduinfo,
|
||||
ppdu_info->rx_status.other_msdu_count =
|
||||
HAL_RX_GET_64(rx_tlv, RX_PPDU_END_USER_STATS,
|
||||
OTHER_MSDU_COUNT);
|
||||
hal_rx_status_get_mpdu_retry_cnt(ppdu_info, rx_tlv);
|
||||
|
||||
if (ppdu_info->sw_frame_group_id
|
||||
!= HAL_MPDU_SW_FRAME_GROUP_NULL_DATA) {
|
||||
|
Reference in New Issue
Block a user