qcacld-3.0: Mark packets to be sent to FW in control block
Classify the ICMP request packet and mark it to be sent to the firmware in the packet control block. Add an INI which indicates the time interval for marking the ICMP requests to be sent to FW. For the INI value: -1, indicates to mark all ICMP requests to be sent to FW. 0, indicates that none of the ICMP requests will be sent to FW. > 0, indicates the time interval for marking ICMP requests to be sent to FW. Change-Id: Ia9c41765cef64a4f5fd19019df595c9e7fd657e9 CRs-Fixed: 2826444
This commit is contained in:
parent
afc30ea9ab
commit
e7e35075ab
2
Kbuild
2
Kbuild
@ -3406,7 +3406,7 @@ cppflags-$(CONFIG_WLAN_DP_PENDING_MEM_FLUSH) += -DWLAN_DP_PENDING_MEM_FLUSH
|
||||
cppflags-$(CONFIG_WLAN_SUPPORT_DATA_STALL) += -DWLAN_SUPPORT_DATA_STALL
|
||||
cppflags-$(CONFIG_WLAN_SUPPORT_TXRX_HL_BUNDLE) += -DWLAN_SUPPORT_TXRX_HL_BUNDLE
|
||||
cppflags-$(CONFIG_QCN7605_PCIE_SHADOW_REG_SUPPORT) += -DQCN7605_PCIE_SHADOW_REG_SUPPORT
|
||||
cppflags-$(CONFIG_SEND_ICMP_PKT_TO_FW) += -DWLAN_DP_FEATURE_SEND_ICMP_TO_FW
|
||||
cppflags-$(CONFIG_MARK_ICMP_REQ_TO_FW) += -DWLAN_DP_FEATURE_MARK_ICMP_REQ_TO_FW
|
||||
|
||||
ifdef CONFIG_MAX_LOGS_PER_SEC
|
||||
ccflags-y += -DWLAN_MAX_LOGS_PER_SEC=$(CONFIG_MAX_LOGS_PER_SEC)
|
||||
|
@ -472,7 +472,7 @@ endif #CONFIG_HELIUMPLUS
|
||||
|
||||
ifeq ($(CONFIG_LITHIUM), y)
|
||||
CONFIG_RX_DEFRAG_DO_NOT_REINJECT := y
|
||||
CONFIG_SEND_ICMP_PKT_TO_FW := y
|
||||
CONFIG_MARK_ICMP_REQ_TO_FW := y
|
||||
#
|
||||
# Enable VERBOSE debug INI mechanism
|
||||
#
|
||||
|
@ -1429,6 +1429,40 @@
|
||||
WLAN_CFG_WMI_CREDIT_DEFAULT, \
|
||||
CFG_VALUE_OR_DEFAULT, "WMI HTC CREDIT COUNT")
|
||||
|
||||
#define WLAN_CFG_ICMP_REQ_TO_FW_MARK_ALL (-1)
|
||||
#define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL 0
|
||||
#define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MIN (-1)
|
||||
#define WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MAX 100000
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* icmp_req_to_fw_mark_interval - Interval to mark the ICMP Request packet
|
||||
* to be sent to FW.
|
||||
* @Min: -1
|
||||
* @Max: 100000
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to control DP Software to mark the ICMP request packets
|
||||
* to be sent to FW at certain interval (in milliseconds).
|
||||
* The value 0 is used to disable marking of ICMP requests to be sent to FW.
|
||||
* The value -1 is used to mark all the ICMP requests to be sent to FW.
|
||||
* Any value greater than zero indicates the time interval (in milliseconds)
|
||||
* at which ICMP requests are marked to be sent to FW.
|
||||
*
|
||||
* Supported modes: All modes
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL \
|
||||
CFG_INI_INT("icmp_req_to_fw_mark_interval", \
|
||||
WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MIN, \
|
||||
WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL_MAX, \
|
||||
WLAN_CFG_ICMP_REQ_TO_FW_MARK_INTERVAL, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Interval to mark ICMP Request packets to be sent to FW")
|
||||
|
||||
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
|
||||
#define CFG_HDD_DP_LEGACY_TX_FLOW \
|
||||
CFG(CFG_DP_LL_TX_FLOW_LWM) \
|
||||
@ -1504,6 +1538,7 @@
|
||||
CFG(CFG_DP_RX_WAKELOCK_TIMEOUT) \
|
||||
CFG(CFG_DP_NUM_DP_RX_THREADS) \
|
||||
CFG(CFG_DP_HTC_WMI_CREDIT_CNT) \
|
||||
CFG(CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL) \
|
||||
CFG_MSCS_FEATURE_ALL \
|
||||
CFG_DP_ENABLE_FASTPATH_ALL \
|
||||
CFG_HDD_DP_BUS_BANDWIDTH \
|
||||
|
@ -266,6 +266,7 @@ struct hdd_config {
|
||||
#ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
|
||||
uint32_t sta_stats_cache_expiry_time;
|
||||
#endif
|
||||
int icmp_req_to_fw_mark_interval;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -960,6 +960,52 @@ static void wlan_hdd_fix_broadcast_eapol(struct hdd_adapter *adapter,
|
||||
}
|
||||
#endif /* HANDLE_BROADCAST_EAPOL_TX_FRAME */
|
||||
|
||||
#ifdef WLAN_DP_FEATURE_MARK_ICMP_REQ_TO_FW
|
||||
/**
|
||||
* hdd_mark_icmp_req_to_fw() - Mark the ICMP request at a certain time interval
|
||||
* to be sent to the FW.
|
||||
* @hdd_ctx: Global hdd context (Caller's responsibility to validate)
|
||||
* @skb: packet to be transmitted
|
||||
*
|
||||
* This func sets the "to_fw" flag in the packet context block, if the
|
||||
* current packet is an ICMP request packet. This marking is done at a
|
||||
* specific time interval, unless the INI value indicates to disable/enable
|
||||
* this for all frames.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void hdd_mark_icmp_req_to_fw(struct hdd_context *hdd_ctx,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
uint64_t curr_time, time_delta;
|
||||
int time_interval_ms = hdd_ctx->config->icmp_req_to_fw_mark_interval;
|
||||
static uint64_t prev_marked_icmp_time;
|
||||
|
||||
if (!hdd_ctx->config->icmp_req_to_fw_mark_interval)
|
||||
return;
|
||||
|
||||
if (qdf_nbuf_get_icmp_subtype(skb) != QDF_PROTO_ICMP_REQ)
|
||||
return;
|
||||
|
||||
/* Mark all ICMP request to be sent to FW */
|
||||
if (time_interval_ms == WLAN_CFG_ICMP_REQ_TO_FW_MARK_ALL)
|
||||
QDF_NBUF_CB_TX_PACKET_TO_FW(skb) = 1;
|
||||
|
||||
curr_time = qdf_get_log_timestamp();
|
||||
time_delta = curr_time - prev_marked_icmp_time;
|
||||
if (time_delta >= (time_interval_ms *
|
||||
QDF_LOG_TIMESTAMP_CYCLES_PER_10_US * 100)) {
|
||||
QDF_NBUF_CB_TX_PACKET_TO_FW(skb) = 1;
|
||||
prev_marked_icmp_time = curr_time;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void hdd_mark_icmp_req_to_fw(struct hdd_context *hdd_ctx,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* __hdd_hard_start_xmit() - Transmit a frame
|
||||
* @skb: pointer to OS packet (sk_buff)
|
||||
@ -1052,15 +1098,9 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
|
||||
}
|
||||
} else if (QDF_NBUF_CB_GET_PACKET_TYPE(skb) ==
|
||||
QDF_NBUF_CB_PACKET_TYPE_ICMP) {
|
||||
subtype = qdf_nbuf_get_icmp_subtype(skb);
|
||||
/*
|
||||
* Mark the ICMP requests to be sent to FW.
|
||||
* The decision on whether its actually sent to FW
|
||||
* is done in the DATAPATH layer.
|
||||
*/
|
||||
if (subtype == QDF_PROTO_ICMP_REQ)
|
||||
QDF_NBUF_CB_TX_PACKET_TO_FW(skb) = 1;
|
||||
hdd_mark_icmp_req_to_fw(hdd_ctx, skb);
|
||||
}
|
||||
|
||||
/* track connectivity stats */
|
||||
if (adapter->pkt_type_bitmap)
|
||||
hdd_tx_rx_collect_connectivity_stats_info(skb, adapter,
|
||||
@ -3681,6 +3721,8 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_DP_RX_WAKELOCK_TIMEOUT);
|
||||
config->num_dp_rx_threads = cfg_get(psoc, CFG_DP_NUM_DP_RX_THREADS);
|
||||
config->cfg_wmi_credit_cnt = cfg_get(psoc, CFG_DP_HTC_WMI_CREDIT_CNT);
|
||||
config->icmp_req_to_fw_mark_interval =
|
||||
cfg_get(psoc, CFG_DP_ICMP_REQ_TO_FW_MARK_INTERVAL);
|
||||
hdd_dp_dp_trace_cfg_update(config, psoc);
|
||||
hdd_dp_nud_tracking_cfg_update(config, psoc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user