qcacld-3.0: Add BW level PLD_BUS_WIDTH_VERY_HIGH

Add additional bandwidth level for "very high" bandwidth. As per the
default configuration if the total number of tx/rx packets exceeds
bus_bw_very_high_threshold, the bus bandwidth requirement is designated
as PLD_BUS_WIDTH_VERY_HIGH and PLD API is called with this value.

Default value of 7000 is chosen for bus_bw_very_high_threshold, which
amounts to 820Mbps of throughput considering a 1500 byte packet and
100ms bandwidth timer interval.

Change-Id: I3bd904429a02ec4935ba12da7c2cfd37eec738ed
CRs-Fixed: 2489362
This commit is contained in:
Mohit Khanna 2019-07-12 17:23:28 -07:00 • committed by nshrivas
commit 6dbf9c8301
5 changed files with 57 additions and 18 deletions

View file

@ -350,6 +350,29 @@
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
/*
* <ini>
* gBusBandwidthVeryHighThreshold - bus bandwidth very high threshold
*
* @Min: 0
* @Max: 4294967295UL
* @Default: 7000
*
* This ini specifies the bus bandwidth very high threshold
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD \
CFG_INI_UINT( \
"gBusBandwidthVeryHighThreshold", \
0, \
4294967295UL, \
7000, \
CFG_VALUE_OR_DEFAULT, \
"Bus bandwidth very high threshold")
/*
* <ini>
* gBusBandwidthHighThreshold - bus bandwidth high threshold
@ -358,7 +381,7 @@
* @Max: 4294967295UL
* @Default: 2000
*
* This ini specifies thebus bandwidth high threshold
* This ini specifies the bus bandwidth high threshold
*
* Usage: Internal
*
@ -381,7 +404,7 @@
* @Max: 4294967295UL
* @Default: 500
*
* This ini specifies thebus bandwidth medium threshold
* This ini specifies the bus bandwidth medium threshold
*
* Usage: Internal
*
@ -404,7 +427,7 @@
* @Max: 4294967295UL
* @Default: 150
*
* This ini specifies thebus bandwidth low threshold
* This ini specifies the bus bandwidth low threshold
*
* Usage: Internal
*
@ -1178,6 +1201,7 @@
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
#define CFG_HDD_DP_BUS_BANDWIDTH \
CFG(CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_HIGH_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_MEDIUM_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_LOW_THRESHOLD) \

View file

@ -159,8 +159,13 @@ struct hdd_config {
uint32_t rx_hp_oos_update_limit;
uint64_t rx_softirq_max_yield_duration_ns;
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
/* bandwidth threshold for very high bandwidth */
uint32_t bus_bw_very_high_threshold;
/* bandwidth threshold for high bandwidth */
uint32_t bus_bw_high_threshold;
/* bandwidth threshold for medium bandwidth */
uint32_t bus_bw_medium_threshold;
/* bandwidth threshold for low bandwidth */
uint32_t bus_bw_low_threshold;
uint32_t bus_bw_compute_interval;
uint32_t enable_tcp_delack;

View file

@ -7871,6 +7871,12 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
const uint64_t tx_packets,
const uint64_t rx_packets)
{
uint16_t index = 0;
bool vote_level_change = false;
bool rx_level_change = false;
bool tx_level_change = false;
bool rxthread_high_tput_req = false;
bool dptrace_high_tput_req;
u64 total_pkts = tx_packets + rx_packets;
uint64_t temp_tx = 0, avg_rx = 0;
uint64_t no_rx_offload_pkts = 0, avg_no_rx_offload_pkts = 0;
@ -7879,14 +7885,10 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
static enum wlan_tp_level next_rx_level = WLAN_SVC_TP_NONE;
enum wlan_tp_level next_tx_level = WLAN_SVC_TP_NONE;
uint32_t delack_timer_cnt = hdd_ctx->config->tcp_delack_timer_count;
uint16_t index = 0;
bool vote_level_change = false;
bool rx_level_change = false;
bool tx_level_change = false;
bool rxthread_high_tput_req = false;
bool dptrace_high_tput_req;
if (total_pkts > hdd_ctx->config->bus_bw_high_threshold)
if (total_pkts > hdd_ctx->config->bus_bw_very_high_threshold)
next_vote_level = PLD_BUS_WIDTH_VERY_HIGH;
else if (total_pkts > hdd_ctx->config->bus_bw_high_threshold)
next_vote_level = PLD_BUS_WIDTH_HIGH;
else if (total_pkts > hdd_ctx->config->bus_bw_medium_threshold)
next_vote_level = PLD_BUS_WIDTH_MEDIUM;
@ -7899,11 +7901,13 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
next_vote_level > PLD_BUS_WIDTH_IDLE ? true : false;
if (hdd_ctx->cur_vote_level != next_vote_level) {
hdd_debug("trigger level %d, tx_packets: %lld, rx_packets: %lld",
next_vote_level, tx_packets, rx_packets);
hdd_debug("BW Vote level %d, tx_packets: %lld, rx_packets: %lld",
next_vote_level, tx_packets, rx_packets);
hdd_ctx->cur_vote_level = next_vote_level;
vote_level_change = true;
pld_request_bus_bandwidth(hdd_ctx->parent_dev, next_vote_level);
if ((next_vote_level == PLD_BUS_WIDTH_LOW) ||
(next_vote_level == PLD_BUS_WIDTH_IDLE)) {
if (hdd_ctx->hbw_requested) {
@ -7981,8 +7985,6 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
if (hdd_ctx->cur_rx_level != next_rx_level) {
struct wlan_rx_tp_data rx_tp_data = {0};
hdd_debug("TCP DELACK trigger level %d, average_rx: %llu",
next_rx_level, avg_rx);
hdd_ctx->cur_rx_level = next_rx_level;
rx_level_change = true;
/* Send throughput indication only if it is enabled.
@ -7990,8 +7992,11 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
* to default delayed ack. Note that this will disable the
* dynamic delayed ack mechanism across the system
*/
if (hdd_ctx->en_tcp_delack_no_lro)
if (hdd_ctx->en_tcp_delack_no_lro) {
rx_tp_data.rx_tp_flags |= TCP_DEL_ACK_IND;
hdd_debug("TCP DELACK trigger level %d, average_rx: %llu",
next_rx_level, avg_rx);
}
if (hdd_ctx->config->enable_tcp_adv_win_scale)
rx_tp_data.rx_tp_flags |= TCP_ADV_WIN_SCL;
@ -8280,9 +8285,10 @@ void wlan_hdd_display_tx_rx_histogram(struct hdd_context *hdd_ctx)
int i;
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
hdd_nofl_info("BW compute Interval: %dms",
hdd_nofl_info("BW compute Interval: %d ms",
hdd_ctx->config->bus_bw_compute_interval);
hdd_nofl_info("BW High TH: %d BW Med TH: %d BW Low TH: %d",
hdd_nofl_info("BW TH - Very High: %d High: %d Med: %d Low: %d",
hdd_ctx->config->bus_bw_very_high_threshold,
hdd_ctx->config->bus_bw_high_threshold,
hdd_ctx->config->bus_bw_medium_threshold,
hdd_ctx->config->bus_bw_low_threshold);

View file

@ -2915,6 +2915,8 @@ static void hdd_ini_tx_flow_control(struct hdd_config *config,
static void hdd_ini_bus_bandwidth(struct hdd_config *config,
struct wlan_objmgr_psoc *psoc)
{
config->bus_bw_very_high_threshold =
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD);
config->bus_bw_high_threshold =
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_HIGH_THRESHOLD);
config->bus_bw_medium_threshold =

View file

@ -65,13 +65,15 @@ enum pld_bus_type {
* @PLD_BUS_WIDTH_LOW: vote for low bus bandwidth
* @PLD_BUS_WIDTH_MEDIUM: vote for medium bus bandwidth
* @PLD_BUS_WIDTH_HIGH: vote for high bus bandwidth
* @PLD_BUS_WIDTH_VERY_HIGH: vote for very high bus bandwidth
*/
enum pld_bus_width_type {
PLD_BUS_WIDTH_NONE,
PLD_BUS_WIDTH_IDLE,
PLD_BUS_WIDTH_LOW,
PLD_BUS_WIDTH_MEDIUM,
PLD_BUS_WIDTH_HIGH
PLD_BUS_WIDTH_HIGH,
PLD_BUS_WIDTH_VERY_HIGH,
};
#define PLD_MAX_FILE_NAME NAME_MAX