qcacld-3.0: Enable TSO/SG feature by the FEATURE_TSO/dp_sg_support

The hdd_set_netdev_flags enable the TSO feature regardless of the
FEATURE_TSO, which will cause the performance regression issue on
the non-tso supported chip.

Enable TSO feature based on the FEATURE_TSO, and enable the SG feature
separately by ini dp_sg_support for legacy chip to fix it.

Change-Id: I0fcb189069f0aa2069ae8427ad96a8db25a91a2f
CRs-Fixed: 2812953
This commit is contained in:
Tiger Yu authored and Madan Koyyalamudi committed 2022-05-13 03:59:58 -07:00
1 parent 28f138040f
commit dfd3c33d44
5 files changed
+16 -2

No files matched your search

+1
View File
@@ -460,6 +460,7 @@ static void cds_cdp_cfg_attach(struct wlan_objmgr_psoc *psoc)
cfg_get(psoc, CFG_DP_CE_CLASSIFY_ENABLE);
cdp_cfg.tso_enable = cfg_get(psoc, CFG_DP_TSO);
cdp_cfg.lro_enable = cfg_get(psoc, CFG_DP_LRO);
cdp_cfg.sg_enable = cfg_get(psoc, CFG_DP_SG);
cdp_cfg.enable_data_stall_detection =
cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
cdp_cfg.gro_enable = cfg_get(psoc, CFG_DP_GRO);
+1
View File
@@ -111,6 +111,7 @@ struct txrx_pdev_cfg_t {
bool gro_enable;
bool tso_enable;
bool lro_enable;
bool sg_enable;
bool enable_data_stall_detection;
bool enable_flow_steering;
bool disable_intra_bss_fwd;
+1
View File
@@ -208,6 +208,7 @@ struct cdp_cfg *ol_pdev_cfg_attach(qdf_device_t osdev, void *pcfg_param)
cfg_ctx->gro_enable = cfg_param->gro_enable;
cfg_ctx->tso_enable = cfg_param->tso_enable;
cfg_ctx->lro_enable = cfg_param->lro_enable;
cfg_ctx->sg_enable = cfg_param->sg_enable;
cfg_ctx->enable_data_stall_detection =
cfg_param->enable_data_stall_detection;
cfg_ctx->enable_flow_steering = cfg_param->enable_flow_steering;
+3
View File
@@ -5887,6 +5887,9 @@ static uint32_t ol_txrx_get_cfg(struct cdp_soc_t *soc_hdl, enum cdp_dp_cfg cfg)
case cfg_dp_lro_enable:
value = cfg_ctx->lro_enable;
break;
case cfg_dp_sg_enable:
value = cfg_ctx->sg_enable;
break;
case cfg_dp_gro_enable:
value = cfg_ctx->gro_enable;
break;
+10 -2
View File
@@ -215,6 +215,12 @@
#define MAX_NET_DEV_REF_LEAK_ITERATIONS 10
#define NET_DEV_REF_LEAK_ITERATION_SLEEP_TIME_MS 10
#ifdef FEATURE_TSO
#define TSO_FEATURE_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG)
#else
#define TSO_FEATURE_FLAGS 0
#endif
int wlan_start_ret_val;
static DECLARE_COMPLETION(wlan_start_comp);
static qdf_atomic_t wlan_hdd_state_fops_ref;
@@ -7148,8 +7154,10 @@ void hdd_set_netdev_flags(struct hdd_adapter *adapter)
(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
if (cdp_cfg_get(soc, cfg_dp_tso_enable) && enable_csum)
adapter->dev->features |=
(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG);
adapter->dev->features |= TSO_FEATURE_FLAGS;
if (cdp_cfg_get(soc, cfg_dp_sg_enable))
adapter->dev->features |= NETIF_F_SG;
adapter->dev->features |= NETIF_F_RXCSUM;
temp = (uint64_t)adapter->dev->features;