qcacld-3.0: Do GRO en/dis based on qdisc only for standalone STA

In case of STA+SAP, ingress qdisc filters are getting
configured on both STA and SAP interface which is
causing GRO to be disabled.

Check for ingress qdisc to enable/disable GRO only in
case of stanalone STA and not do this in case of
concurrency.

Change-Id: I3542930c7b14d72e267378dd4687ee9721eed4ed
CRs-Fixed: 3062195
This commit is contained in:
Yeshwanth Sriram Guntuka 2021-11-18 10:32:13 +05:30
commit b72ea52ca9
8 changed files with 50 additions and 24 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 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
@ -1531,14 +1532,15 @@ struct policy_mgr_cdp_cbacks {
/**
* struct policy_mgr_dp_cbacks - CDP Callbacks to be invoked
* from policy manager
* @hdd_disable_rx_ol_in_concurrency: Callback to disable LRO/GRO offloads
* @hdd_rx_handle_concurrency: Callback to handle concurrency related
* operations for rx
* @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_disable_rx_ol_in_concurrency)(bool);
void (*hdd_rx_handle_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);

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 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
@ -2010,8 +2011,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_disable_rx_ol_in_concurrency)
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(true);
if (pm_ctx->dp_cbacks.hdd_rx_handle_concurrency)
pm_ctx->dp_cbacks.hdd_rx_handle_concurrency(true);
};
/* Enable RPS if SAP interface has come up */
@ -2105,8 +2106,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_disable_rx_ol_in_concurrency)
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency(false);
if (pm_ctx->dp_cbacks.hdd_rx_handle_concurrency)
pm_ctx->dp_cbacks.hdd_rx_handle_concurrency(false);
};
/* Disable RPS if SAP interface has come up */

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 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
@ -803,8 +804,8 @@ QDF_STATUS policy_mgr_register_dp_cb(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
pm_ctx->dp_cbacks.hdd_disable_rx_ol_in_concurrency =
dp_cbacks->hdd_disable_rx_ol_in_concurrency;
pm_ctx->dp_cbacks.hdd_rx_handle_concurrency =
dp_cbacks->hdd_rx_handle_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 =

View file

@ -1875,6 +1875,7 @@ struct hdd_adapter_ops_history {
* @is_dual_mac_cfg_updated: indicate whether dual mac cfg has been updated
* @twt_en_dis_work: work to send twt enable/disable cmd on MCC/SCC concurrency
* @dump_in_progress: Stores value of dump in progress
* @rx_skip_qdisc_chk_conc: flag to skip ingress qdisc check in concurrency
*/
struct hdd_context {
struct wlan_objmgr_psoc *psoc;
@ -2232,6 +2233,7 @@ struct hdd_context {
bool is_therm_stats_in_progress;
#endif
uint64_t bw_vote_time;
qdf_atomic_t rx_skip_qdisc_chk_conc;
};
/**

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 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
@ -218,12 +219,13 @@ QDF_STATUS hdd_rx_pkt_thread_enqueue_cbk(void *adapter_context,
int hdd_rx_ol_init(struct hdd_context *hdd_ctx);
/**
* hdd_disable_rx_ol_in_concurrency() - Disable Rx offload due to concurrency
* @disable: true/false to disable/enable the Rx offload
* hdd_rx_handle_concurrency() - Handle concurrency related operations
* for rx
* @is_concurrency: true if there are concurrenct connections else false
*
* Return: none
*/
void hdd_disable_rx_ol_in_concurrency(bool disable);
void hdd_rx_handle_concurrency(bool is_concurrency);
/**
* hdd_disable_rx_ol_for_low_tput() - Disable Rx offload in low TPUT scenario

View file

@ -14524,14 +14524,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
if (ret)
goto cds_disable;
/* Donot disable rx offload on concurrency for lithium based targets */
if (!(hdd_ctx->target_type == TARGET_TYPE_QCA6290 ||
hdd_ctx->target_type == TARGET_TYPE_QCA6390 ||
hdd_ctx->target_type == TARGET_TYPE_QCA6490 ||
hdd_ctx->target_type == TARGET_TYPE_QCA6750))
if (hdd_ctx->ol_enable)
dp_cbs.hdd_disable_rx_ol_in_concurrency =
hdd_disable_rx_ol_in_concurrency;
dp_cbs.hdd_rx_handle_concurrency = hdd_rx_handle_concurrency;
dp_cbs.hdd_set_rx_mode_rps_cb = hdd_set_rx_mode_rps;
dp_cbs.hdd_ipa_set_mcc_mode_cb = hdd_ipa_set_mcc_mode;
dp_cbs.hdd_v2_flow_pool_map = hdd_v2_flow_pool_map;

View file

@ -1059,7 +1059,7 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id,
if (hdd_ctx->ol_enable &&
!NAN_CONCURRENCY_SUPPORTED(hdd_ctx->psoc)) {
hdd_debug("Disable LRO/GRO in NDI Mode");
hdd_disable_rx_ol_in_concurrency(true);
hdd_rx_handle_concurrency(true);
}
hdd_bus_bw_compute_prev_txrx_stats(adapter);
@ -1110,7 +1110,7 @@ void hdd_cleanup_ndi(struct hdd_context *hdd_ctx,
PM_STA_MODE,
NULL) == 1)))) {
hdd_debug("Enable LRO/GRO");
hdd_disable_rx_ol_in_concurrency(false);
hdd_rx_handle_concurrency(false);
}
}

View file

@ -2003,7 +2003,7 @@ int hdd_rx_ol_init(struct hdd_context *hdd_ctx)
return 0;
}
void hdd_disable_rx_ol_in_concurrency(bool disable)
void hdd_rx_handle_concurrency(bool is_concurrency)
{
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
@ -2012,7 +2012,23 @@ void hdd_disable_rx_ol_in_concurrency(bool disable)
return;
}
if (disable) {
if (hdd_ctx->is_wifi3_0_target) {
/*
* Donot disable rx offload on concurrency for lithium and
* beryllium based targets
*/
if (is_concurrency)
qdf_atomic_set(&hdd_ctx->rx_skip_qdisc_chk_conc, 1);
else
qdf_atomic_set(&hdd_ctx->rx_skip_qdisc_chk_conc, 0);
return;
}
if (!hdd_ctx->ol_enable)
return;
if (is_concurrency) {
if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) {
struct wlan_rx_tp_data rx_tp_data;
@ -2048,7 +2064,7 @@ int hdd_rx_ol_init(struct hdd_context *hdd_ctx)
return -EPERM;
}
void hdd_disable_rx_ol_in_concurrency(bool disable)
void hdd_rx_handle_concurrency(bool is_concurrency)
{
}
@ -2228,6 +2244,15 @@ hdd_rx_check_qdisc_for_adapter(struct hdd_adapter *adapter, uint8_t rx_ctx_id)
if (qdf_unlikely(!soc))
return;
/*
* Restrict the qdisc based dynamic GRO enable/disable to
* standalone STA mode only. Reset the configuration for
* any other device mode or concurrency.
*/
if (adapter->device_mode != QDF_STA_MODE ||
(qdf_atomic_read(&adapter->hdd_ctx->rx_skip_qdisc_chk_conc)))
goto reset_wl;
if (!adapter->dev->ingress_queue)
goto reset_wl;