Ver código fonte

qcacld-3.0: Prealloc FISA Flow Table

Allocation failed as flow table size is huge.
To Fix this, moved the ft table to prealloc memory.

Change-Id: I27ee62b1bcfced563f45cb80e11978cb3dd46183
CRs-Fixed: 2926899
Ananya Gupta 4 anos atrás
pai
commit
15bf4db8e3
2 arquivos alterados com 11 adições e 4 exclusões
  1. 5 4
      core/dp/txrx3.0/dp_rx_fst.c
  2. 6 0
      core/dp/txrx3.0/dp_txrx.c

+ 5 - 4
core/dp/txrx3.0/dp_rx_fst.c

@@ -24,6 +24,7 @@
 #include "dp_htt.h"
 #include "dp_internal.h"
 #include "hif.h"
+#include "dp_txrx.h"
 
 /* Timeout in milliseconds to wait for CMEM FST HTT response */
 #define DP_RX_FST_CMEM_RESP_TIMEOUT 2000
@@ -248,8 +249,8 @@ QDF_STATUS dp_rx_fst_attach(struct dp_soc *soc, struct dp_pdev *pdev)
 	dp_err("FST setup params FT size %d, hash_mask 0x%x, skid_length %d",
 	       fst->max_entries, fst->hash_mask, fst->max_skid_length);
 
-	fst->base = (uint8_t *)qdf_mem_malloc(DP_RX_GET_SW_FT_ENTRY_SIZE *
-					       fst->max_entries);
+	fst->base = (uint8_t *)dp_context_alloc_mem(soc, DP_FISA_RX_FT_TYPE,
+				DP_RX_GET_SW_FT_ENTRY_SIZE * fst->max_entries);
 
 	if (!fst->base)
 		goto out2;
@@ -299,7 +300,7 @@ timer_init_fail:
 	qdf_spinlock_destroy(&fst->dp_rx_fst_lock);
 	hal_rx_fst_detach(fst->hal_rx_fst, soc->osdev);
 out1:
-	qdf_mem_free(fst->base);
+	dp_context_free_mem(soc, DP_FISA_RX_FT_TYPE, fst->base);
 out2:
 	qdf_mem_free(fst);
 	return QDF_STATUS_E_NOMEM;
@@ -394,7 +395,7 @@ void dp_rx_fst_detach(struct dp_soc *soc, struct dp_pdev *pdev)
 		else
 			hal_rx_fst_detach(dp_fst->hal_rx_fst, soc->osdev);
 
-		qdf_mem_free(dp_fst->base);
+		dp_context_free_mem(soc, DP_FISA_RX_FT_TYPE, dp_fst->base);
 		qdf_spinlock_destroy(&dp_fst->dp_rx_fst_lock);
 		qdf_mem_free(dp_fst);
 	}

+ 6 - 0
core/dp/txrx3.0/dp_txrx.c

@@ -192,6 +192,9 @@ int dp_rx_tm_get_pending(ol_txrx_soc_handle soc)
 
 #ifdef DP_MEM_PRE_ALLOC
 
+/* Max entries in FISA Flow table */
+#define FISA_RX_FT_SIZE 128
+
 /* Num elements in REO ring */
 #define REO_DST_RING_SIZE 1024
 
@@ -295,6 +298,9 @@ static struct dp_prealloc_context g_dp_context_allocs[] = {
 	 false, NULL},
 #endif	/* RX_DEFRAG_DO_NOT_REINJECT */
 #endif	/* WLAN_FEATURE_DP_RX_RING_HISTORY */
+#ifdef WLAN_SUPPORT_RX_FISA
+	{DP_FISA_RX_FT_TYPE, sizeof(struct dp_fisa_rx_sw_ft) * FISA_RX_FT_SIZE, false, NULL},
+#endif
 };
 
 static struct  dp_consistent_prealloc g_dp_consistent_allocs[] = {