Bläddra i källkod

qcacmn: revert FISA LRU deletion change

Revert FISA LRU deletion change.

Change-Id: Ie24df0df8f3833c0a982036b71479f1eb8f485f8
CRs-Fixed: 3083882
Jinwei Chen 3 år sedan
förälder
incheckning
480aac399f
3 ändrade filer med 18 tillägg och 36 borttagningar
  1. 1 32
      dp/wifi3.0/dp_types.h
  2. 9 2
      hal/wifi3.0/qca6490/hal_6490.c
  3. 8 2
      hal/wifi3.0/wcn7850/hal_7850.c

+ 1 - 32
dp/wifi3.0/dp_types.h

@@ -3578,8 +3578,6 @@ struct dp_fisa_rx_sw_ft {
 	uint32_t cur_aggr_gso_size;
 	struct udphdr *head_skb_udp_hdr;
 	uint16_t frags_cumulative_len;
-	/* debug delete count */
-	uint32_t del_count;
 	/* CMEM parameters */
 	uint32_t cmem_offset;
 	uint32_t metadata;
@@ -3593,7 +3591,6 @@ struct dp_fisa_rx_sw_ft {
 
 #define DP_RX_GET_SW_FT_ENTRY_SIZE sizeof(struct dp_fisa_rx_sw_ft)
 #define MAX_FSE_CACHE_FL_HST 10
-#define MAX_FSE_LRU_DELETE_HISTORY 16
 /**
  * struct fse_cache_flush_history - Debug history cache flush
  * @timestamp: Entry update timestamp
@@ -3606,32 +3603,6 @@ struct fse_cache_flush_history {
 	uint32_t flows_deleted;
 };
 
-#ifdef WLAN_SUPPORT_RX_FISA_HIST
-/**
- * struct fse_lru_delete_history_entry - lru deletion history
- * hashed_idx - hased index to be deleted and updated
- *
- */
-struct fse_lru_delete_history_entry {
-	uint32_t hashed_idx;
-	uint64_t eviction_timestamp;
-	struct cdp_rx_flow_tuple_info evicted_flow_tuple_info;
-	struct cdp_rx_flow_tuple_info added_flow_tuple_info;
-};
-
-/**
- * struct fse_lru_delete_history - fse lru delete debug history
- * current_index - current index to be updated
- * entry - array of history index
- */
-
-struct fse_lru_delete_history {
-	uint32_t current_index;
-	struct fse_lru_delete_history_entry entry[MAX_FSE_LRU_DELETE_HISTORY];
-};
-
-#endif
-
 struct dp_rx_fst {
 	/* Software (DP) FST */
 	uint8_t *base;
@@ -3658,9 +3629,6 @@ struct dp_rx_fst {
 	/* Allow FSE cache flush cmd to FW */
 	bool fse_cache_flush_allow;
 	struct fse_cache_flush_history cache_fl_rec[MAX_FSE_CACHE_FL_HST];
-#ifdef WLAN_SUPPORT_RX_FISA_HIST
-	struct fse_lru_delete_history lru_delete_history;
-#endif
 	/* FISA DP stats */
 	struct dp_fisa_stats stats;
 
@@ -3672,6 +3640,7 @@ struct dp_rx_fst {
 	uint32_t cmem_ba;
 	qdf_spinlock_t dp_rx_sw_ft_lock[MAX_REO_DEST_RINGS];
 	qdf_event_t cmem_resp_event;
+	bool flow_deletion_supported;
 	bool fst_in_cmem;
 	bool pm_suspended;
 };

+ 9 - 2
hal/wifi3.0/qca6490/hal_6490.c

@@ -1533,6 +1533,7 @@ hal_rx_flow_setup_fse_6490(uint8_t *rx_fst, uint32_t table_offset,
 	struct hal_rx_fst *fst = (struct hal_rx_fst *)rx_fst;
 	struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
 	uint8_t *fse;
+	bool fse_valid;
 
 	if (table_offset >= fst->max_entries) {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -1544,8 +1545,14 @@ hal_rx_flow_setup_fse_6490(uint8_t *rx_fst, uint32_t table_offset,
 	fse = (uint8_t *)fst->base_vaddr +
 		(table_offset * HAL_RX_FST_ENTRY_SIZE);
 
-	/* clear the valid bit before starting the deletion*/
-	HAL_CLR_FLD(fse, RX_FLOW_SEARCH_ENTRY_9, VALID);
+	fse_valid = HAL_GET_FLD(fse, RX_FLOW_SEARCH_ENTRY_9, VALID);
+
+	if (fse_valid) {
+		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
+				"HAL FSE %pK already valid", fse);
+		return NULL;
+	}
+
 	HAL_SET_FLD(fse, RX_FLOW_SEARCH_ENTRY_0, SRC_IP_127_96) =
 		HAL_SET_FLD_SM(RX_FLOW_SEARCH_ENTRY_0, SRC_IP_127_96,
 			(flow->tuple_info.src_ip_127_96));

+ 8 - 2
hal/wifi3.0/wcn7850/hal_7850.c

@@ -1047,6 +1047,7 @@ hal_rx_flow_setup_fse_7850(uint8_t *rx_fst, uint32_t table_offset,
 	struct hal_rx_fst *fst = (struct hal_rx_fst *)rx_fst;
 	struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
 	uint8_t *fse;
+	bool fse_valid;
 
 	if (table_offset >= fst->max_entries) {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -1058,8 +1059,13 @@ hal_rx_flow_setup_fse_7850(uint8_t *rx_fst, uint32_t table_offset,
 	fse = (uint8_t *)fst->base_vaddr +
 		(table_offset * HAL_RX_FST_ENTRY_SIZE);
 
-	/* clear the valid bit before starting the deletion*/
-	HAL_CLR_FLD(fse, RX_FLOW_SEARCH_ENTRY, VALID);
+	fse_valid = HAL_GET_FLD(fse, RX_FLOW_SEARCH_ENTRY, VALID);
+
+	if (fse_valid) {
+		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
+			  "HAL FSE %pK already valid", fse);
+		return NULL;
+	}
 
 	HAL_SET_FLD(fse, RX_FLOW_SEARCH_ENTRY, SRC_IP_127_96) =
 		HAL_SET_FLD_SM(RX_FLOW_SEARCH_ENTRY, SRC_IP_127_96,