qcacmn: DPtrace: Do not log to memory during high throughput
During high TPUT scenario logging of DPT trace is not useful, require more MIPS. Disable datapacket DPtrace logging during TPUT runs, but contiue to log special packets like ARP/DHCP/ICMP etc.. Change-Id: I70c9368de4cb2423901449b267452a34d652213d CRs-Fixed: 2255756
This commit is contained in:

committed by
nshrivas

parent
617ff247dd
commit
cf4286b730
@@ -163,9 +163,10 @@ typedef struct s_qdf_trace_data {
|
|||||||
|
|
||||||
#define QDF_DP_TRACE_RECORD_SIZE 40
|
#define QDF_DP_TRACE_RECORD_SIZE 40
|
||||||
#define INVALID_QDF_DP_TRACE_ADDR 0xffffffff
|
#define INVALID_QDF_DP_TRACE_ADDR 0xffffffff
|
||||||
#define QDF_DP_TRACE_VERBOSITY_HIGH 3
|
#define QDF_DP_TRACE_VERBOSITY_HIGH 4
|
||||||
#define QDF_DP_TRACE_VERBOSITY_MEDIUM 2
|
#define QDF_DP_TRACE_VERBOSITY_MEDIUM 3
|
||||||
#define QDF_DP_TRACE_VERBOSITY_LOW 1
|
#define QDF_DP_TRACE_VERBOSITY_LOW 2
|
||||||
|
#define QDF_DP_TRACE_VERBOSITY_ULTRA_LOW 1
|
||||||
#define QDF_DP_TRACE_VERBOSITY_BASE 0
|
#define QDF_DP_TRACE_VERBOSITY_BASE 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -176,26 +177,27 @@ typedef struct s_qdf_trace_data {
|
|||||||
* @QDF_DP_TRACE_DHCP_PACKET_RECORD - record DHCP packet
|
* @QDF_DP_TRACE_DHCP_PACKET_RECORD - record DHCP packet
|
||||||
* @QDF_DP_TRACE_ARP_PACKET_RECORD - record ARP packet
|
* @QDF_DP_TRACE_ARP_PACKET_RECORD - record ARP packet
|
||||||
* @QDF_DP_TRACE_MGMT_PACKET_RECORD - record MGMT pacekt
|
* @QDF_DP_TRACE_MGMT_PACKET_RECORD - record MGMT pacekt
|
||||||
* QDF_DP_TRACE_EVENT_RECORD - record events
|
* @QDF_DP_TRACE_EVENT_RECORD - record events
|
||||||
* @QDF_DP_TRACE_BASE_VERBOSITY - below this are part of base verbosity
|
* @QDF_DP_TRACE_BASE_VERBOSITY - below this are part of base verbosity
|
||||||
* @QDF_DP_TRACE_ICMP_PACKET_RECORD - record ICMP packet
|
* @QDF_DP_TRACE_ICMP_PACKET_RECORD - record ICMP packet
|
||||||
* @QDF_DP_TRACE_ICMPv6_PACKET_RECORD - record ICMPv6 packet
|
* @QDF_DP_TRACE_ICMPv6_PACKET_RECORD - record ICMPv6 packet
|
||||||
* @QDF_DP_TRACE_HDD_TX_PACKET_RECORD - record 32 bytes of tx pkt at HDD
|
|
||||||
* @QDF_DP_TRACE_HDD_RX_PACKET_RECORD - record 32 bytes of rx pkt at HDD
|
|
||||||
* @QDF_DP_TRACE_TX_PACKET_RECORD - record 32 bytes of tx pkt at any layer
|
|
||||||
* @QDF_DP_TRACE_RX_PACKET_RECORD - record 32 bytes of rx pkt at any layer
|
|
||||||
* @QDF_DP_TRACE_HDD_TX_TIMEOUT - HDD tx timeout
|
* @QDF_DP_TRACE_HDD_TX_TIMEOUT - HDD tx timeout
|
||||||
* @QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT- SOFTAP HDD tx timeout
|
* @QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT- SOFTAP HDD tx timeout
|
||||||
|
* @QDF_DP_TRACE_ULTRA_LOW_VERBOSITY - Below this is not logged for >4PPS
|
||||||
|
* @QDF_DP_TRACE_TX_PACKET_RECORD - record 32 bytes of tx pkt at any layer
|
||||||
|
* @QDF_DP_TRACE_RX_PACKET_RECORD - record 32 bytes of rx pkt at any layer
|
||||||
|
* @QDF_DP_TRACE_HDD_TX_PACKET_RECORD - record 32 bytes of tx pkt at HDD
|
||||||
|
* @QDF_DP_TRACE_HDD_RX_PACKET_RECORD - record 32 bytes of rx pkt at HDD
|
||||||
* @QDF_DP_TRACE_FREE_PACKET_PTR_RECORD - tx completion ptr record
|
* @QDF_DP_TRACE_FREE_PACKET_PTR_RECORD - tx completion ptr record
|
||||||
* @QDF_DP_TRACE_LOW_VERBOSITY - below this are part of low verbosity
|
* @QDF_DP_TRACE_LOW_VERBOSITY - below this are part of low verbosity
|
||||||
* @QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD - HDD layer ptr record
|
* @QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD - HDD layer ptr record
|
||||||
* @QDF_DP_TRACE_LI_DP_TX_PACKET_PTR_RECORD - Lithium DP layer ptr record
|
* @QDF_DP_TRACE_LI_DP_TX_PACKET_PTR_RECORD - Lithium DP layer ptr record
|
||||||
|
* @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD - HDD RX record
|
||||||
* @QDF_DP_TRACE_CE_PACKET_PTR_RECORD - CE layer ptr record
|
* @QDF_DP_TRACE_CE_PACKET_PTR_RECORD - CE layer ptr record
|
||||||
* @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD- CE fastpath ptr record
|
* @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD- CE fastpath ptr record
|
||||||
* @QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD- CE fastpath error record
|
* @QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD- CE fastpath error record
|
||||||
* @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD - HTT RX record
|
* @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD - HTT RX record
|
||||||
* @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD- HTT RX offload record
|
* @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD- HTT RX offload record
|
||||||
* @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD - HDD RX record
|
|
||||||
* @QDF_DP_TRACE_RX_LI_DP_PACKET_PTR_RECORD - Lithium DP RX record
|
* @QDF_DP_TRACE_RX_LI_DP_PACKET_PTR_RECORD - Lithium DP RX record
|
||||||
* @QDF_DP_TRACE_MED_VERBOSITY - below this are part of med verbosity
|
* @QDF_DP_TRACE_MED_VERBOSITY - below this are part of med verbosity
|
||||||
* @QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD -tx queue ptr record
|
* @QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD -tx queue ptr record
|
||||||
@@ -222,12 +224,13 @@ enum QDF_DP_TRACE_ID {
|
|||||||
QDF_DP_TRACE_BASE_VERBOSITY,
|
QDF_DP_TRACE_BASE_VERBOSITY,
|
||||||
QDF_DP_TRACE_ICMP_PACKET_RECORD,
|
QDF_DP_TRACE_ICMP_PACKET_RECORD,
|
||||||
QDF_DP_TRACE_ICMPv6_PACKET_RECORD,
|
QDF_DP_TRACE_ICMPv6_PACKET_RECORD,
|
||||||
QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
|
|
||||||
QDF_DP_TRACE_HDD_RX_PACKET_RECORD,
|
|
||||||
QDF_DP_TRACE_TX_PACKET_RECORD,
|
|
||||||
QDF_DP_TRACE_RX_PACKET_RECORD,
|
|
||||||
QDF_DP_TRACE_HDD_TX_TIMEOUT,
|
QDF_DP_TRACE_HDD_TX_TIMEOUT,
|
||||||
QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT,
|
QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT,
|
||||||
|
QDF_DP_TRACE_ULTRA_LOW_VERBOSITY,
|
||||||
|
QDF_DP_TRACE_TX_PACKET_RECORD,
|
||||||
|
QDF_DP_TRACE_RX_PACKET_RECORD,
|
||||||
|
QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
|
||||||
|
QDF_DP_TRACE_HDD_RX_PACKET_RECORD,
|
||||||
QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
|
QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
|
||||||
QDF_DP_TRACE_LOW_VERBOSITY,
|
QDF_DP_TRACE_LOW_VERBOSITY,
|
||||||
QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
|
QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
|
||||||
@@ -353,6 +356,7 @@ struct qdf_dp_trace_record_s {
|
|||||||
* @proto_bitmap: defines which protocol to be traced
|
* @proto_bitmap: defines which protocol to be traced
|
||||||
* @no_of_record: defines every nth packet to be traced
|
* @no_of_record: defines every nth packet to be traced
|
||||||
* @verbosity : defines verbosity level
|
* @verbosity : defines verbosity level
|
||||||
|
* @ini_conf_verbosity: Configured verbosity from INI
|
||||||
* @enable: enable/disable DP trace
|
* @enable: enable/disable DP trace
|
||||||
* @count: current packet number
|
* @count: current packet number
|
||||||
* @live_mode_config: configuration as received during initialization
|
* @live_mode_config: configuration as received during initialization
|
||||||
@@ -361,6 +365,7 @@ struct qdf_dp_trace_record_s {
|
|||||||
* @force_live_mode: flag to enable live mode all the time for all packets.
|
* @force_live_mode: flag to enable live mode all the time for all packets.
|
||||||
* This can be set/unset from userspace and overrides other
|
* This can be set/unset from userspace and overrides other
|
||||||
* live mode flags.
|
* live mode flags.
|
||||||
|
* @dynamic_verbosity_modify: Dynamic user configured verbosity overrides all
|
||||||
* @print_pkt_cnt: count of number of packets printed in live mode
|
* @print_pkt_cnt: count of number of packets printed in live mode
|
||||||
* @high_tput_thresh: thresh beyond which live mode is turned off
|
* @high_tput_thresh: thresh beyond which live mode is turned off
|
||||||
* @thresh_time_limit: max time, in terms of BW timer intervals to wait,
|
* @thresh_time_limit: max time, in terms of BW timer intervals to wait,
|
||||||
@@ -394,12 +399,14 @@ struct s_qdf_dp_trace_data {
|
|||||||
uint8_t proto_bitmap;
|
uint8_t proto_bitmap;
|
||||||
uint8_t no_of_record;
|
uint8_t no_of_record;
|
||||||
uint8_t verbosity;
|
uint8_t verbosity;
|
||||||
|
uint8_t ini_conf_verbosity;
|
||||||
bool enable;
|
bool enable;
|
||||||
bool live_mode_config;
|
bool live_mode_config;
|
||||||
bool live_mode;
|
bool live_mode;
|
||||||
uint32_t curr_pos;
|
uint32_t curr_pos;
|
||||||
uint32_t saved_tail;
|
uint32_t saved_tail;
|
||||||
bool force_live_mode;
|
bool force_live_mode;
|
||||||
|
bool dynamic_verbosity_modify;
|
||||||
uint8_t print_pkt_cnt;
|
uint8_t print_pkt_cnt;
|
||||||
uint8_t high_tput_thresh;
|
uint8_t high_tput_thresh;
|
||||||
uint16_t thresh_time_limit;
|
uint16_t thresh_time_limit;
|
||||||
@@ -645,6 +652,14 @@ void qdf_dp_trace_ptr(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code,
|
|||||||
uint16_t msdu_id, uint16_t status);
|
uint16_t msdu_id, uint16_t status);
|
||||||
void qdf_dp_trace_throttle_live_mode(bool high_bw_request);
|
void qdf_dp_trace_throttle_live_mode(bool high_bw_request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_tput_policy() - Change verbosity based on the TPUT
|
||||||
|
* @is_data_traffic: Is traffic more than low TPUT threashould
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_dp_trace_apply_tput_policy(bool is_data_traffic);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_trace_data_pkt() - trace data packet
|
* qdf_dp_trace_data_pkt() - trace data packet
|
||||||
* @nbuf: nbuf which needs to be traced
|
* @nbuf: nbuf which needs to be traced
|
||||||
|
@@ -776,6 +776,7 @@ void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
|
|||||||
g_qdf_dp_trace_data.thresh_time_limit = time_limit;
|
g_qdf_dp_trace_data.thresh_time_limit = time_limit;
|
||||||
g_qdf_dp_trace_data.proto_bitmap = proto_bitmap;
|
g_qdf_dp_trace_data.proto_bitmap = proto_bitmap;
|
||||||
g_qdf_dp_trace_data.verbosity = verbosity;
|
g_qdf_dp_trace_data.verbosity = verbosity;
|
||||||
|
g_qdf_dp_trace_data.ini_conf_verbosity = verbosity;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(qdf_dp_trace_cb_table); i++)
|
for (i = 0; i < ARRAY_SIZE(qdf_dp_trace_cb_table); i++)
|
||||||
qdf_dp_trace_cb_table[i] = qdf_dp_display_record;
|
qdf_dp_trace_cb_table[i] = qdf_dp_display_record;
|
||||||
@@ -820,6 +821,7 @@ void qdf_dp_trace_set_value(uint8_t proto_bitmap, uint8_t no_of_record,
|
|||||||
g_qdf_dp_trace_data.proto_bitmap = proto_bitmap;
|
g_qdf_dp_trace_data.proto_bitmap = proto_bitmap;
|
||||||
g_qdf_dp_trace_data.no_of_record = no_of_record;
|
g_qdf_dp_trace_data.no_of_record = no_of_record;
|
||||||
g_qdf_dp_trace_data.verbosity = verbosity;
|
g_qdf_dp_trace_data.verbosity = verbosity;
|
||||||
|
g_qdf_dp_trace_data.dynamic_verbosity_modify = true;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_set_value);
|
qdf_export_symbol(qdf_dp_trace_set_value);
|
||||||
|
|
||||||
@@ -909,6 +911,11 @@ static bool qdf_dp_trace_enable_track(enum QDF_DP_TRACE_ID code)
|
|||||||
if (code <= QDF_DP_TRACE_LOW_VERBOSITY)
|
if (code <= QDF_DP_TRACE_LOW_VERBOSITY)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
case QDF_DP_TRACE_VERBOSITY_ULTRA_LOW:
|
||||||
|
if (code <= QDF_DP_TRACE_ULTRA_LOW_VERBOSITY)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
|
||||||
case QDF_DP_TRACE_VERBOSITY_BASE:
|
case QDF_DP_TRACE_VERBOSITY_BASE:
|
||||||
if (code <= QDF_DP_TRACE_BASE_VERBOSITY)
|
if (code <= QDF_DP_TRACE_BASE_VERBOSITY)
|
||||||
return true;
|
return true;
|
||||||
@@ -1339,6 +1346,20 @@ static void qdf_dp_add_record(enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
|||||||
|
|
||||||
spin_lock_bh(&l_dp_trace_lock);
|
spin_lock_bh(&l_dp_trace_lock);
|
||||||
|
|
||||||
|
if (print || g_qdf_dp_trace_data.force_live_mode) {
|
||||||
|
print_this_record = true;
|
||||||
|
} else if (g_qdf_dp_trace_data.live_mode == 1) {
|
||||||
|
print_this_record = true;
|
||||||
|
g_qdf_dp_trace_data.print_pkt_cnt++;
|
||||||
|
if (g_qdf_dp_trace_data.print_pkt_cnt >
|
||||||
|
g_qdf_dp_trace_data.high_tput_thresh) {
|
||||||
|
g_qdf_dp_trace_data.live_mode = 0;
|
||||||
|
g_qdf_dp_trace_data.verbosity =
|
||||||
|
QDF_DP_TRACE_ULTRA_LOW_VERBOSITY;
|
||||||
|
info |= QDF_DP_TRACE_RECORD_INFO_THROTTLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_qdf_dp_trace_data.num++;
|
g_qdf_dp_trace_data.num++;
|
||||||
|
|
||||||
if (g_qdf_dp_trace_data.num > MAX_QDF_DP_TRACE_RECORDS)
|
if (g_qdf_dp_trace_data.num > MAX_QDF_DP_TRACE_RECORDS)
|
||||||
@@ -1380,17 +1401,6 @@ static void qdf_dp_add_record(enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print || g_qdf_dp_trace_data.force_live_mode) {
|
|
||||||
print_this_record = true;
|
|
||||||
} else if (g_qdf_dp_trace_data.live_mode == 1) {
|
|
||||||
print_this_record = true;
|
|
||||||
g_qdf_dp_trace_data.print_pkt_cnt++;
|
|
||||||
if (g_qdf_dp_trace_data.print_pkt_cnt >
|
|
||||||
g_qdf_dp_trace_data.high_tput_thresh) {
|
|
||||||
g_qdf_dp_trace_data.live_mode = 0;
|
|
||||||
info |= QDF_DP_TRACE_RECORD_INFO_THROTTLED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spin_unlock_bh(&l_dp_trace_lock);
|
spin_unlock_bh(&l_dp_trace_lock);
|
||||||
|
|
||||||
info |= QDF_DP_TRACE_RECORD_INFO_LIVE;
|
info |= QDF_DP_TRACE_RECORD_INFO_LIVE;
|
||||||
@@ -2536,11 +2546,28 @@ void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
|
|||||||
g_qdf_dp_trace_data.live_mode = 1;
|
g_qdf_dp_trace_data.live_mode = 1;
|
||||||
|
|
||||||
g_qdf_dp_trace_data.print_pkt_cnt = 0;
|
g_qdf_dp_trace_data.print_pkt_cnt = 0;
|
||||||
|
g_qdf_dp_trace_data.verbosity =
|
||||||
|
g_qdf_dp_trace_data.ini_conf_verbosity;
|
||||||
spin_unlock_bh(&l_dp_trace_lock);
|
spin_unlock_bh(&l_dp_trace_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_throttle_live_mode);
|
qdf_export_symbol(qdf_dp_trace_throttle_live_mode);
|
||||||
|
|
||||||
|
void qdf_dp_trace_apply_tput_policy(bool is_data_traffic)
|
||||||
|
{
|
||||||
|
if (g_qdf_dp_trace_data.dynamic_verbosity_modify)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (is_data_traffic) {
|
||||||
|
g_qdf_dp_trace_data.verbosity =
|
||||||
|
QDF_DP_TRACE_ULTRA_LOW_VERBOSITY;
|
||||||
|
qdf_dp_trace_throttle_live_mode(true);
|
||||||
|
} else {
|
||||||
|
g_qdf_dp_trace_data.verbosity =
|
||||||
|
g_qdf_dp_trace_data.ini_conf_verbosity;
|
||||||
|
qdf_dp_trace_throttle_live_mode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct qdf_print_ctrl print_ctrl_obj[MAX_PRINT_CONFIG_SUPPORTED];
|
struct qdf_print_ctrl print_ctrl_obj[MAX_PRINT_CONFIG_SUPPORTED];
|
||||||
|
Reference in New Issue
Block a user