qcacmn: Support to print AST entries of MLO peer

Add support to print AST entries of MLO peer.
MLO AST table is global across SOC and hence any print AST request
will print the MLO AST table

Change-Id: I07554606617f43a8806e1c7243ca69a0c8ce335e
CRs-Fixed: 3246520
This commit is contained in:
Santosh Anbu
2022-07-14 11:14:31 +05:30
committed by Madan Koyyalamudi
parent 4447eb57d1
commit e852941cea
4 changed files with 66 additions and 2 deletions

View File

@@ -1565,6 +1565,28 @@ dp_mlo_peer_find_hash_add_be(struct dp_soc *soc, struct dp_peer *peer)
hash_list_elem);
qdf_spin_unlock_bh(&mld_hash_obj->mld_peer_hash_lock);
}
void dp_print_mlo_ast_stats_be(struct dp_soc *soc)
{
uint32_t index;
struct dp_peer *peer;
dp_mld_peer_hash_obj_t mld_hash_obj;
mld_hash_obj = dp_mlo_get_peer_hash_obj(soc);
if (!mld_hash_obj)
return;
qdf_spin_lock_bh(&mld_hash_obj->mld_peer_hash_lock);
for (index = 0; index < mld_hash_obj->mld_peer_hash.mask; index++) {
TAILQ_FOREACH(peer, &mld_hash_obj->mld_peer_hash.bins[index],
hash_list_elem) {
dp_print_peer_ast_entries(soc, peer, NULL);
}
}
qdf_spin_unlock_bh(&mld_hash_obj->mld_peer_hash_lock);
}
#endif
#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) && \
@@ -1822,4 +1844,5 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
arch_ops->dp_find_peer_by_destmac = dp_find_peer_by_destmac_be;
dp_init_near_full_arch_ops_be(arch_ops);
arch_ops->get_rx_hash_key = dp_get_rx_hash_key_be;
arch_ops->print_mlo_ast_stats = dp_print_mlo_ast_stats_be;
}

View File

@@ -269,6 +269,10 @@ static uint8_t dp_soc_ring_if_nss_offloaded(struct dp_soc *soc,
enum hal_ring_type ring_type,
int ring_num);
#ifdef FEATURE_AST
void dp_print_mlo_ast_stats(struct dp_soc *soc);
#endif
#define DP_INTR_POLL_TIMER_MS 5
#define MON_VDEV_TIMER_INIT 0x1
@@ -1672,6 +1676,19 @@ configure_msi2:
}
#ifdef FEATURE_AST
/**
* dp_print_mlo_ast_stats() - Print AST stats for MLO peers
*
* @soc : core DP soc context
*
* Return: void
*/
void dp_print_mlo_ast_stats(struct dp_soc *soc)
{
if (soc->arch_ops.print_mlo_ast_stats)
soc->arch_ops.print_mlo_ast_stats(soc);
}
/**
* dp_print_peer_ast_entries() - Dump AST entries of peer
* @soc: Datapath soc handle
@@ -1680,14 +1697,14 @@ configure_msi2:
*
* return void
*/
static void
void
dp_print_peer_ast_entries(struct dp_soc *soc, struct dp_peer *peer, void *arg)
{
struct dp_ast_entry *ase, *tmp_ase;
uint32_t num_entries = 0;
char type[CDP_TXRX_AST_TYPE_MAX][10] = {
"NONE", "STATIC", "SELF", "WDS", "HMWDS", "BSS",
"DA", "HMWDS_SEC"};
"DA", "HMWDS_SEC", "MLD"};
DP_PEER_ITERATE_ASE_LIST(peer, ase, tmp_ase) {
DP_PRINT_STATS("%6d mac_addr = "QDF_MAC_ADDR_FMT
@@ -1740,6 +1757,8 @@ void dp_print_ast_stats(struct dp_soc *soc)
DP_MOD_ID_GENERIC_STATS);
qdf_spin_unlock_bh(&soc->ast_lock);
dp_print_mlo_ast_stats(soc);
}
#else
void dp_print_ast_stats(struct dp_soc *soc)

View File

@@ -1044,7 +1044,15 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
DP_PEER_ITERATE_ASE_LIST(peer, ast_entry, temp_ast_entry)
dp_peer_del_ast(soc, ast_entry);
}
void dp_print_peer_ast_entries(struct dp_soc *soc, struct dp_peer *peer,
void *arg);
#else
static inline void dp_print_peer_ast_entries(struct dp_soc *soc,
struct dp_peer *peer, void *arg)
{
}
static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
struct dp_peer *peer)
{
@@ -1800,6 +1808,15 @@ dp_tgt_txrx_peer_get_ref_by_id(struct dp_soc *soc,
return NULL;
}
/**
* dp_print_mlo_ast_stats_be() - Print AST stats for MLO peers
*
* @soc : core DP soc context
*
* Return: void
*/
void dp_print_mlo_ast_stats_be(struct dp_soc *soc);
#else
#define IS_MLO_DP_MLD_TXRX_PEER(_peer) false
@@ -1948,6 +1965,10 @@ uint16_t dp_get_link_peer_id_by_lmac_id(struct dp_soc *soc, uint16_t peer_id,
{
return peer_id;
}
static inline void dp_print_mlo_ast_stats_be(struct dp_soc *soc)
{
}
#endif /* WLAN_FEATURE_11BE_MLO */
#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)

View File

@@ -1900,6 +1900,7 @@ struct dp_arch_ops {
struct dp_vdev *vdev,
struct hal_tx_completion_status *ts,
uint32_t *delay_us);
void (*print_mlo_ast_stats)(struct dp_soc *soc);
};
/**