Преглед изворни кода

qcacmn: Enable/Disable Round Robin core distribution

1. Add ini configuration for enabling round robin flows to
core distribution in FSE

2. Register FSE APIs to CDP FSE ops

Change-Id: Ic61c44eb9bc68a8c1a0116d4e6aa1d54cf489b62
CRs-Fixed: 3505287
Parikshit Gune пре 2 година
родитељ
комит
3b770cc5bb
5 измењених фајлова са 51 додато и 2 уклоњено
  1. 2 2
      dp/wifi3.0/dp_main.c
  2. 4 0
      dp/wifi3.0/dp_rings_main.c
  3. 5 0
      wlan_cfg/cfg_dp.h
  4. 21 0
      wlan_cfg/wlan_cfg.c
  5. 19 0
      wlan_cfg/wlan_cfg.h

+ 2 - 2
dp/wifi3.0/dp_main.c

@@ -11019,8 +11019,8 @@ static struct cdp_scs_ops dp_ops_scs = {
 
 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
 static struct cdp_fse_ops dp_ops_fse = {
-	.fse_rule_add = NULL,
-	.fse_rule_delete = NULL,
+	.fse_rule_add = dp_rx_sfe_add_flow_entry,
+	.fse_rule_delete = dp_rx_sfe_delete_flow_entry,
 };
 #endif
 

+ 4 - 0
dp/wifi3.0/dp_rings_main.c

@@ -4500,6 +4500,10 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
 
 	wlan_cfg_set_rx_hash(soc->wlan_cfg_ctx,
 			     cfg_get(soc->ctrl_psoc, CFG_DP_RX_HASH));
+#ifdef WLAN_SUPPORT_RX_FLOW_TAG
+	wlan_cfg_set_rx_rr(soc->wlan_cfg_ctx,
+			   cfg_get(soc->ctrl_psoc, CFG_DP_RX_RR));
+#endif
 	soc->cce_disable = false;
 	soc->max_ast_ageout_count = MAX_AST_AGEOUT_COUNT;
 

+ 5 - 0
wlan_cfg/cfg_dp.h

@@ -850,6 +850,10 @@
 	CFG_INI_BOOL("dp_rx_hash", true, \
 	"DP Rx Hash")
 
+#define CFG_DP_RX_RR \
+	CFG_INI_BOOL("dp_rx_rr", true, \
+	"DP Rx Round Robin")
+
 #define CFG_DP_TSO \
 	CFG_INI_BOOL("TSOEnable", false, \
 	"DP TSO Enabled")
@@ -1983,6 +1987,7 @@
 		CFG(CFG_DP_TIME_CONTROL_BP) \
 		CFG(CFG_DP_BASE_HW_MAC_ID) \
 		CFG(CFG_DP_RX_HASH) \
+		CFG(CFG_DP_RX_RR) \
 		CFG(CFG_DP_TSO) \
 		CFG(CFG_DP_LRO) \
 		CFG(CFG_DP_SG) \

+ 21 - 0
wlan_cfg/wlan_cfg.c

@@ -4866,6 +4866,27 @@ bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
 	return  cfg->rx_hash;
 }
 
+#ifdef WLAN_SUPPORT_RX_FLOW_TAG
+void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
+{
+	cfg->rx_rr = val;
+}
+
+bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return  cfg->rx_rr;
+}
+#else
+void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool val)
+{
+}
+
+bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return  false;
+}
+#endif
+
 int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg)
 {
 	return  cfg->nss_enabled;

+ 19 - 0
wlan_cfg/wlan_cfg.h

@@ -340,6 +340,7 @@ struct wlan_srng_cfg {
  * @pointer_num_threshold_rx: RX REO2SW ring pointer update entries threshold
  * @local_pkt_capture: flag indicating enable/disable of local packet capture
  * @special_frame_msk: Special frame mask
+ * @rx_rr: rx round robin enable / disable
  */
 struct wlan_cfg_dp_soc_ctxt {
 	int num_int_ctxts;
@@ -543,6 +544,9 @@ struct wlan_cfg_dp_soc_ctxt {
 	bool local_pkt_capture;
 #endif
 	uint32_t special_frame_msk;
+#ifdef WLAN_SUPPORT_RX_FLOW_TAG
+	bool rx_rr;
+#endif
 };
 
 /**
@@ -1390,6 +1394,21 @@ bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  */
 void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash);
 
+/**
+ * wlan_cfg_is_rx_rr_enabled - Return RX round robin enabled/disabled
+ * @cfg: soc configuration context
+ *
+ * Return: true - enabled false - disabled
+ */
+bool wlan_cfg_is_rx_rr_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
+
+/**
+ * wlan_cfg_set_rx_rr - set rx round robin enabled/disabled
+ * @cfg: soc configuration context
+ * @rx_rr: true - enabled false - disabled
+ */
+void wlan_cfg_set_rx_rr(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_rr);
+
 /**
  * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  * @cfg: pdev configuration context