qcacmn: add near full logic for Tx completion ring
Reap mode desc from the Tx completion ring in case the number of available entries are less than the half of the ring entries. Change-Id: I3635b88c3e98cc8a5f30fc58cf5e353f6301d4ad CRs-Fixed: 3325826
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9cb6199f70
commit
26b3d560fe
@@ -5573,9 +5573,12 @@ uint32_t dp_tx_comp_handler(struct dp_intr *int_ctx, struct dp_soc *soc,
|
|||||||
bool force_break = false;
|
bool force_break = false;
|
||||||
struct dp_srng *tx_comp_ring = &soc->tx_comp_ring[ring_id];
|
struct dp_srng *tx_comp_ring = &soc->tx_comp_ring[ring_id];
|
||||||
int max_reap_limit, ring_near_full;
|
int max_reap_limit, ring_near_full;
|
||||||
|
uint32_t num_entries;
|
||||||
|
|
||||||
DP_HIST_INIT();
|
DP_HIST_INIT();
|
||||||
|
|
||||||
|
num_entries = hal_srng_get_num_entries(soc->hal_soc, hal_ring_hdl);
|
||||||
|
|
||||||
more_data:
|
more_data:
|
||||||
|
|
||||||
hal_soc = soc->hal_soc;
|
hal_soc = soc->hal_soc;
|
||||||
@@ -5593,7 +5596,9 @@ more_data:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
num_avail_for_reap = hal_srng_dst_num_valid(hal_soc, hal_ring_hdl, 0);
|
if (!num_avail_for_reap)
|
||||||
|
num_avail_for_reap = hal_srng_dst_num_valid(hal_soc,
|
||||||
|
hal_ring_hdl, 0);
|
||||||
|
|
||||||
if (num_avail_for_reap >= quota)
|
if (num_avail_for_reap >= quota)
|
||||||
num_avail_for_reap = quota;
|
num_avail_for_reap = quota;
|
||||||
@@ -5797,6 +5802,17 @@ next_desc:
|
|||||||
if (!hif_exec_should_yield(soc->hif_handle,
|
if (!hif_exec_should_yield(soc->hif_handle,
|
||||||
int_ctx->dp_intr_id))
|
int_ctx->dp_intr_id))
|
||||||
goto more_data;
|
goto more_data;
|
||||||
|
|
||||||
|
num_avail_for_reap =
|
||||||
|
hal_srng_dst_num_valid_locked(soc->hal_soc,
|
||||||
|
hal_ring_hdl,
|
||||||
|
true);
|
||||||
|
if (qdf_unlikely(num_entries &&
|
||||||
|
(num_avail_for_reap >=
|
||||||
|
num_entries >> 1))) {
|
||||||
|
DP_STATS_INC(soc, tx.near_full, 1);
|
||||||
|
goto more_data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DP_TX_HIST_STATS_PER_PDEV();
|
DP_TX_HIST_STATS_PER_PDEV();
|
||||||
|
@@ -1110,6 +1110,8 @@ struct dp_soc_stats {
|
|||||||
uint32_t tx_comp[MAX_TCL_DATA_RINGS];
|
uint32_t tx_comp[MAX_TCL_DATA_RINGS];
|
||||||
/* Number of tx completions force freed */
|
/* Number of tx completions force freed */
|
||||||
uint32_t tx_comp_force_freed;
|
uint32_t tx_comp_force_freed;
|
||||||
|
/* Tx completion ring near full */
|
||||||
|
uint32_t near_full;
|
||||||
} tx;
|
} tx;
|
||||||
|
|
||||||
/* SOC level RX stats */
|
/* SOC level RX stats */
|
||||||
|
Reference in New Issue
Block a user