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

Commit bb99ccad authored by Yeshwanth Sriram Guntuka's avatar Yeshwanth Sriram Guntuka Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Control GRO en/dis based on TC filter prio

The dynamic GRO enable/disable based on ingress filters
should currently is restricted only to standalone STA.
This was done to address issue where ingress filters are
added on STA interface whenever SAP is up disabling GRO
unnecessarily.

Fix is to allow dynamic GRO to work on all interfaces
and concurrency scenarios based on the priority of
the ingress filter configured to avoid unnecessary
GRO disable in STA+SAP.

Change-Id: I1742f4539353939e3a40ff4096b3f833f2029b12
CRs-Fixed: 3206815
parent b175ba6d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1407,15 +1407,14 @@ struct policy_mgr_cdp_cbacks {
/**
 * struct policy_mgr_dp_cbacks - CDP Callbacks to be invoked
 * from policy manager
 * @hdd_rx_handle_concurrency: Callback to handle concurrency related
 *  operations for rx
 * @hdd_disable_rx_ol_in_concurrency: Callback to disable LRO/GRO offloads
 * @hdd_set_rx_mode_rps_cb: Callback to set RPS
 * @hdd_ipa_set_mcc_mode_cb: Callback to set mcc mode for ipa module
 * @hdd_v2_flow_pool_map: Callback to create vdev flow pool
 * @hdd_v2_flow_pool_unmap: Callback to delete vdev flow pool
 */
struct policy_mgr_dp_cbacks {
	void (*hdd_rx_handle_concurrency)(bool);
	void (*hdd_disable_rx_ol_in_concurrency)(bool);
	void (*hdd_set_rx_mode_rps_cb)(bool);
	void (*hdd_ipa_set_mcc_mode_cb)(bool);
	void (*hdd_v2_flow_pool_map)(int);
+4 −4
Original line number Diff line number Diff line
@@ -1727,8 +1727,8 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
	    (policy_mgr_mode_specific_connection_count(psoc,
						       PM_NDI_MODE,
						       NULL) > 0)) {
		if (pm_ctx->dp_cbacks.hdd_rx_handle_concurrency)
			pm_ctx->dp_cbacks.hdd_rx_handle_concurrency(true);
		if (pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency)
			pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(true);
	};

	/* Enable RPS if SAP interface has come up */
@@ -1823,8 +1823,8 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
	     (policy_mgr_mode_specific_connection_count(psoc,
							PM_NDI_MODE,
							NULL) == 0))) {
		if (pm_ctx->dp_cbacks.hdd_rx_handle_concurrency)
			pm_ctx->dp_cbacks.hdd_rx_handle_concurrency(false);
		if (pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency)
			pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(false);
	};

	/* Disable RPS if SAP interface has come up */
+2 −2
Original line number Diff line number Diff line
@@ -740,8 +740,8 @@ QDF_STATUS policy_mgr_register_dp_cb(struct wlan_objmgr_psoc *psoc,
		return QDF_STATUS_E_FAILURE;
	}

	pm_ctx->dp_cbacks.hdd_rx_handle_concurrency =
		dp_cbacks->hdd_rx_handle_concurrency;
	pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency =
		dp_cbacks->hdd_disable_rx_ol_in_concurrency;
	pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb =
		dp_cbacks->hdd_set_rx_mode_rps_cb;
	pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb =
+6 −3
Original line number Diff line number Diff line
@@ -950,10 +950,13 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)

	cds_debug("CDS successfully Opened");

	if (cdp_cfg_get(gp_cds_context->dp_soc, cfg_dp_force_gro_enable))
		hdd_ctx->dp_agg_param.force_gro_enable = true;
	if (cdp_cfg_get(gp_cds_context->dp_soc, cfg_dp_tc_based_dyn_gro_enable))
		hdd_ctx->dp_agg_param.tc_based_dyn_gro = true;
	else
		hdd_ctx->dp_agg_param.force_gro_enable = false;
		hdd_ctx->dp_agg_param.tc_based_dyn_gro = false;

	hdd_ctx->dp_agg_param.tc_ingress_prio =
		    cdp_cfg_get(gp_cds_context->dp_soc, cfg_dp_tc_ingress_prio);

	return 0;

+19 −5
Original line number Diff line number Diff line
@@ -1140,6 +1140,20 @@ struct rcpi_info {

struct hdd_context;

#ifdef WLAN_FEATURE_DYNAMIC_RX_AGGREGATION
/**
 * enum qdisc_filter_status - QDISC filter status
 * @QDISC_FILTER_RTNL_LOCK_FAIL: rtnl lock acquire failed
 * @QDISC_FILTER_PRIO_MATCH: qdisc filter with priority match
 * @QDISC_FILTER_PRIO_MISMATCH: no filter match with configured priority
 */
enum qdisc_filter_status {
	QDISC_FILTER_RTNL_LOCK_FAIL,
	QDISC_FILTER_PRIO_MATCH,
	QDISC_FILTER_PRIO_MISMATCH,
};
#endif

/**
 * struct hdd_adapter - hdd vdev/net_device context
 * @vdev: object manager vdev context
@@ -1466,7 +1480,7 @@ struct hdd_adapter {
	bool handle_feature_update;

	qdf_work_t netdev_features_update_work;
	uint8_t gro_disallowed[DP_MAX_RX_THREADS];
	qdf_atomic_t gro_disallowed;
	uint8_t gro_flushed[DP_MAX_RX_THREADS];
	bool delete_in_progress;
	qdf_atomic_t net_dev_hold_ref_count[NET_DEV_HOLD_ID_MAX];
@@ -1782,10 +1796,10 @@ struct hdd_adapter_ops_history {
 * @sar_cmd_params: SAR command params to be configured to the FW
 * @rx_aggregation: rx aggregation enable or disable state
 * @gro_force_flush: gro force flushed indication flag
 * @force_gro_enable: force GRO enable or disable flag
 * @tc_based_dyn_gro: TC based dynamic GRO enable/disable flag
 * @tc_ingress_prio: TC ingress priority
 * @adapter_ops_wq: High priority workqueue for handling adapter operations
 * @is_dual_mac_cfg_updated: indicate whether dual mac cfg has been updated
 * @rx_skip_qdisc_chk_conc: flag to skip ingress qdisc check in concurrency
 */
struct hdd_context {
	struct wlan_objmgr_psoc *psoc;
@@ -2113,7 +2127,8 @@ struct hdd_context {
	struct {
		qdf_atomic_t rx_aggregation;
		uint8_t gro_force_flush[DP_MAX_RX_THREADS];
		bool force_gro_enable;
		bool tc_based_dyn_gro;
		uint32_t tc_ingress_prio;
	} dp_agg_param;
#ifdef FW_THERMAL_THROTTLE_SUPPORT
	uint8_t dutycycle_off_percent;
@@ -2122,7 +2137,6 @@ struct hdd_context {
	qdf_workqueue_t *adapter_ops_wq;
	struct hdd_adapter_ops_history adapter_ops_history;
	bool is_dual_mac_cfg_updated;
	qdf_atomic_t rx_skip_qdisc_chk_conc;
};

/**
Loading