qcacmn: Add configurable threshold values
Introduce configurable threshold values to increment MPDU retry count by transmit_cnt / threshold. Change-Id: I1c039ff76854e18bea5a8d99d171936557d1c6bf CRs-Fixed: 3210735
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8969fe6019
commit
1507b1cde3
@@ -7088,6 +7088,12 @@ static QDF_STATUS dp_txrx_peer_attach(struct dp_soc *soc, struct dp_peer *peer)
|
||||
txrx_peer->vdev = peer->vdev;
|
||||
pdev = peer->vdev->pdev;
|
||||
|
||||
/* Initialize MPDU success count with retry update thresholds */
|
||||
txrx_peer->mpdu_retry_threshold_1 =
|
||||
soc->wlan_cfg_ctx->mpdu_retry_threshold_1;
|
||||
txrx_peer->mpdu_retry_threshold_2 =
|
||||
soc->wlan_cfg_ctx->mpdu_retry_threshold_2;
|
||||
|
||||
DP_STATS_INIT(txrx_peer);
|
||||
|
||||
dp_wds_ext_peer_init(txrx_peer);
|
||||
|
@@ -4062,7 +4062,7 @@ static inline void
|
||||
dp_tx_update_peer_extd_stats(struct hal_tx_completion_status *ts,
|
||||
struct dp_txrx_peer *txrx_peer)
|
||||
{
|
||||
uint8_t mcs, pkt_type;
|
||||
uint8_t mcs, pkt_type, retry_threshold;
|
||||
|
||||
mcs = ts->mcs;
|
||||
pkt_type = ts->pkt_type;
|
||||
@@ -4109,9 +4109,23 @@ dp_tx_update_peer_extd_stats(struct hal_tx_completion_status *ts,
|
||||
if (ts->first_msdu) {
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer, tx.retries_mpdu, 1,
|
||||
ts->transmit_cnt > 1);
|
||||
switch (ts->bw) {
|
||||
case 0: /* 20Mhz */
|
||||
case 1: /* 40Mhz */
|
||||
case 2: /* 80Mhz */
|
||||
retry_threshold = txrx_peer->mpdu_retry_threshold_1;
|
||||
break;
|
||||
default: /* 160Mhz */
|
||||
retry_threshold = txrx_peer->mpdu_retry_threshold_2;
|
||||
break;
|
||||
}
|
||||
if (!retry_threshold)
|
||||
return;
|
||||
|
||||
DP_PEER_EXTD_STATS_INCC(txrx_peer, tx.mpdu_success_with_retries,
|
||||
qdf_do_div(ts->transmit_cnt, DP_RETRY_COUNT),
|
||||
ts->transmit_cnt > DP_RETRY_COUNT);
|
||||
qdf_do_div(ts->transmit_cnt,
|
||||
retry_threshold),
|
||||
ts->transmit_cnt > retry_threshold);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@@ -3835,6 +3835,9 @@ struct dp_peer_stats {
|
||||
* @stats: Peer stats
|
||||
* @delay_stats: Peer delay stats
|
||||
* @jitter_stats: Peer jitter stats
|
||||
* @mpdu_retry_threshold_1: MPDU retry threshold 1 to increment tx bad count
|
||||
* @mpdu_retry_threshold_1: MPDU retry threshold 2 to increment tx bad count
|
||||
|
||||
*/
|
||||
struct dp_txrx_peer {
|
||||
/* Core TxRx Peer */
|
||||
@@ -3890,6 +3893,8 @@ struct dp_txrx_peer {
|
||||
#ifdef CONFIG_SAWF
|
||||
struct dp_peer_sawf_stats *sawf_stats;
|
||||
#endif
|
||||
uint8_t mpdu_retry_threshold_1;
|
||||
uint8_t mpdu_retry_threshold_2;
|
||||
};
|
||||
|
||||
/* Peer structure for data path state */
|
||||
|
@@ -459,6 +459,10 @@
|
||||
#define WLAN_CFG_TX_CAPT_MAX_MEM_MAX 512
|
||||
#define WLAN_CFG_TX_CAPT_MAX_MEM_DEFAULT 0
|
||||
|
||||
#define CFG_DP_MPDU_RETRY_THRESHOLD_MIN 0
|
||||
#define CFG_DP_MPDU_RETRY_THRESHOLD_MAX 255
|
||||
#define CFG_DP_MPDU_RETRY_THRESHOLD 0
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* "dp_tx_capt_max_mem_mb"- maximum memory used by Tx capture
|
||||
@@ -1641,6 +1645,48 @@
|
||||
#define CFG_DP_MLO_CONFIG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* dp_mpdu_retry_threshold_1 - threshold to increment mpdu success with retries
|
||||
* @Min: 0
|
||||
* @Max: 255
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini entry is used to set first threshold to increment the value of
|
||||
* mpdu_success_with_retries
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_DP_MPDU_RETRY_THRESHOLD_1 \
|
||||
CFG_INI_UINT("dp_mpdu_retry_threshold_1", \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD_MIN, \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD_MAX, \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP mpdu retry threshold 1")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* dp_mpdu_retry_threshold_2 - threshold to increment mpdu success with retries
|
||||
* @Min: 0
|
||||
* @Max: 255
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini entry is used to set second threshold to increment the value of
|
||||
* mpdu_success_with_retries
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_DP_MPDU_RETRY_THRESHOLD_2 \
|
||||
CFG_INI_UINT("dp_mpdu_retry_threshold_2", \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD_MIN, \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD_MAX, \
|
||||
CFG_DP_MPDU_RETRY_THRESHOLD, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP mpdu retry threshold 2")
|
||||
|
||||
#define CFG_DP \
|
||||
CFG(CFG_DP_HTT_PACKET_TYPE) \
|
||||
CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
|
||||
@@ -1741,6 +1787,8 @@
|
||||
CFG(CFG_DP_DELAY_MON_REPLENISH) \
|
||||
CFG(CFG_DP_TX_MONITOR_BUF_RING) \
|
||||
CFG(CFG_DP_TX_MONITOR_DST_RING) \
|
||||
CFG(CFG_DP_MPDU_RETRY_THRESHOLD_1) \
|
||||
CFG(CFG_DP_MPDU_RETRY_THRESHOLD_2) \
|
||||
CFG_DP_IPA_TX_RING_CFG \
|
||||
CFG_DP_PPE_CONFIG \
|
||||
CFG_DP_IPA_TX_ALT_RING_CFG \
|
||||
|
@@ -2148,6 +2148,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||
wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
|
||||
NUM_RXDMA_RINGS_PER_PDEV;
|
||||
wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
|
||||
wlan_cfg_ctx->mpdu_retry_threshold_1 =
|
||||
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_1);
|
||||
wlan_cfg_ctx->mpdu_retry_threshold_2 =
|
||||
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
|
||||
|
||||
return wlan_cfg_ctx;
|
||||
}
|
||||
|
@@ -252,6 +252,8 @@ struct wlan_srng_cfg {
|
||||
* @vdev_stats_hw_offload_timer: HW vdev stats timer duration
|
||||
* @txmon_hw_support: TxMON HW support
|
||||
* @num_rxdma_status_rings_per_pdev: Num RXDMA status rings
|
||||
* @mpdu_retry_threshold_1: MPDU retry threshold 1 to increment tx bad count
|
||||
* @mpdu_retry_threshold_1: MPDU retry threshold 2 to increment tx bad count
|
||||
*/
|
||||
struct wlan_cfg_dp_soc_ctxt {
|
||||
int num_int_ctxts;
|
||||
@@ -421,6 +423,8 @@ struct wlan_cfg_dp_soc_ctxt {
|
||||
#ifdef CONFIG_SAWF
|
||||
bool sawf_enabled;
|
||||
#endif
|
||||
uint8_t mpdu_retry_threshold_1;
|
||||
uint8_t mpdu_retry_threshold_2;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user