Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf865a8b authored by Yu Tian's avatar Yu Tian
Browse files

qcacmn: Add an ini control to disable Dynamic GRO feature

Dynamic GRO feature is enabled by default and aimed for specific
customers. Add an ini control to allow other customers to config
this feature enable/disable.

Change-Id: I7f505599327ac131b3cdac9b4d9e038861b1aeb6
CRs-Fixed: 3074689
parent 1fc8c2ab
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -2333,6 +2333,7 @@ struct cdp_monitor_filter {
 * @cfg_dp_tso_enable: get TSO enable config
 * @cfg_dp_lro_enable: get LRO enable config
 * @cfg_dp_gro_enable: get GRP enable config
 * @cfg_dp_force_gro_enable: get Force GRP enable config
 * @cfg_dp_tx_flow_start_queue_offset: get DP TX flow start queue offset
 * @cfg_dp_tx_flow_stop_queue_threshold: get DP TX flow stop queue threshold
 * @cfg_dp_ipa_uc_tx_buf_size: get IPA TX buf size config
@@ -2355,6 +2356,7 @@ enum cdp_dp_cfg {
	cfg_dp_tso_enable,
	cfg_dp_lro_enable,
	cfg_dp_gro_enable,
	cfg_dp_force_gro_enable,
	cfg_dp_tx_flow_start_queue_offset,
	cfg_dp_tx_flow_stop_queue_threshold,
	cfg_dp_ipa_uc_tx_buf_size,
+3 −0
Original line number Diff line number Diff line
@@ -11093,6 +11093,9 @@ static uint32_t dp_get_cfg(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg)
	case cfg_dp_gro_enable:
		value = dpsoc->wlan_cfg_ctx->gro_enabled;
		break;
	case cfg_dp_force_gro_enable:
		value = dpsoc->wlan_cfg_ctx->force_gro_enabled;
		break;
	case cfg_dp_tx_flow_start_queue_offset:
		value = dpsoc->wlan_cfg_ctx->tx_flow_start_queue_offset;
		break;
+3 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -4916,6 +4917,8 @@ void dp_print_soc_cfg_params(struct dp_soc *soc)
		       soc_cfg_ctx->sg_enabled);
	DP_PRINT_STATS("Gro enabled: %u ",
		       soc_cfg_ctx->gro_enabled);
	DP_PRINT_STATS("Force Gro enabled: %u ",
		       soc_cfg_ctx->force_gro_enabled);
	DP_PRINT_STATS("rawmode enabled: %u ",
		       soc_cfg_ctx->rawmode_enabled);
	DP_PRINT_STATS("peer flow ctrl enabled: %u ",
+28 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -614,9 +615,34 @@
	CFG_INI_BOOL("dp_sg_support", false, \
	"DP SG Enable")

#define WLAN_CFG_GRO_ENABLE_MIN 0
#define WLAN_CFG_GRO_ENABLE_MAX 3
#define WLAN_CFG_GRO_ENABLE_DEFAULT 0
#define DP_GRO_ENABLE_BIT_SET     BIT(0)
#define DP_FORCE_USE_GRO_BIT_SET  BIT(1)
/*
 * <ini>
 * CFG_DP_GRO - Enable the GRO feature standalonely
 * @Min: 0
 * @Max: 3
 * @Default: 0
 *
 * This ini entry is used to enable/disable GRO feature standalonely.
 * Value 0: Disable GRO feature
 * Value 1: Enable Dynamic GRO feature, TC rule can control GRO
 *          behavior of STA mode
 * Value 3: Enable GRO feature forcibly
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_DP_GRO \
	CFG_INI_BOOL("GROEnable", false, \
	"DP GRO Enable")
		CFG_INI_UINT("GROEnable", \
		WLAN_CFG_GRO_ENABLE_MIN, \
		WLAN_CFG_GRO_ENABLE_MAX, \
		WLAN_CFG_GRO_ENABLE_DEFAULT, \
		CFG_VALUE_OR_DEFAULT, "DP GRO Enable")

#define CFG_DP_OL_TX_CSUM \
	CFG_INI_BOOL("dp_offload_tx_csum_support", false, \
+8 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -502,6 +503,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
{
	struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
		qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
	uint32_t gro_bit_set;

	if (!wlan_cfg_ctx)
		return NULL;
@@ -560,7 +562,12 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
	wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
	wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
	wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
	wlan_cfg_ctx->gro_enabled = cfg_get(psoc, CFG_DP_GRO);
	gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
	if (gro_bit_set & DP_GRO_ENABLE_BIT_SET) {
		wlan_cfg_ctx->gro_enabled = true;
		if (gro_bit_set & DP_FORCE_USE_GRO_BIT_SET)
			wlan_cfg_ctx->force_gro_enabled = true;
	}
	wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
	wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
	wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
Loading