diff --git a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index 2aff4dfdcf71..b81df6058528 100644 --- a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -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); diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 9f68499914c5..67e942ee585f 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -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 */ diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c index c1bb04c28958..70c9ba421977 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c @@ -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 = diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 3f0c8a18cea2..96f7316529fc 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -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; }; /** diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 93e336c96961..078185ef98b5 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -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 diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 4dcbe0944cca..2fe30d6d5320 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -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; diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c index 9e4d8d0b288e..7acc1e7e3296 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -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); } } diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index f7e49376ac57..891c3b1dce7d 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -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;