diff --git a/core/dp/txrx3.0/dp_fisa_rx.h b/core/dp/txrx3.0/dp_fisa_rx.h index 2642c584ae4a..8d316fb8417c 100644 --- a/core/dp/txrx3.0/dp_fisa_rx.h +++ b/core/dp/txrx3.0/dp_fisa_rx.h @@ -38,6 +38,17 @@ #define FISA_FLOW_MAX_CUMULATIVE_IP_LEN \ (FISA_MAX_SINGLE_CUMULATIVE_IP_LEN * FISA_FLOW_MAX_AGGR_COUNT) +struct dp_fisa_rx_fst_update_elem { + /* Do not add new entries here */ + qdf_list_node_t node; + struct cdp_rx_flow_tuple_info flow_tuple_info; + struct dp_vdev *vdev; + uint32_t flow_idx; + bool is_tcp_flow; + bool is_udp_flow; + u8 reo_id; +}; + /** * dp_rx_dump_fisa_stats() - Dump fisa stats * @soc: core txrx main context diff --git a/core/dp/txrx3.0/dp_rx_fst.c b/core/dp/txrx3.0/dp_rx_fst.c index f1929a249fc0..c70ef102eaf7 100644 --- a/core/dp/txrx3.0/dp_rx_fst.c +++ b/core/dp/txrx3.0/dp_rx_fst.c @@ -25,6 +25,7 @@ #include "dp_internal.h" #ifdef WLAN_SUPPORT_RX_FISA +void dp_fisa_rx_fst_update_work(void *arg); void dp_rx_dump_fisa_table(struct dp_soc *soc) { @@ -96,6 +97,54 @@ static void dp_fisa_fse_cache_flush_timer(void *arg) } } +/** + * dp_rx_fst_cmem_deinit() - De-initialize CMEM parameters + * @fst: Pointer to DP FST + * + * Return: None + */ +static void dp_rx_fst_cmem_deinit(struct dp_rx_fst *fst) +{ + int i; + + qdf_cancel_work(&fst->fst_update_work); + qdf_flush_work(&fst->fst_update_work); + qdf_flush_workqueue(0, fst->fst_update_wq); + + qdf_destroy_workqueue(0, fst->fst_update_wq); + qdf_list_destroy(&fst->fst_update_list); + qdf_event_destroy(&fst->cmem_resp_event); + + for (i = 0; i < MAX_REO_DEST_RINGS; i++) + qdf_spinlock_destroy(&fst->dp_rx_sw_ft_lock[i]); +} + +/** + * dp_rx_fst_cmem_init() - Initialize CMEM parameters + * @fst: Pointer to DP FST + * + * Return: Success/Failure + */ +static QDF_STATUS dp_rx_fst_cmem_init(struct dp_rx_fst *fst) +{ + int i; + + fst->fst_update_wq = + qdf_alloc_high_prior_ordered_workqueue("dp_rx_fst_update_wq"); + if (!fst->fst_update_wq) + return QDF_STATUS_E_FAILURE; + + qdf_create_work(0, &fst->fst_update_work, + dp_fisa_rx_fst_update_work, fst); + qdf_list_create(&fst->fst_update_list, 128); + qdf_event_create(&fst->cmem_resp_event); + + for (i = 0; i < MAX_REO_DEST_RINGS; i++) + qdf_spinlock_create(&fst->dp_rx_sw_ft_lock[i]); + + return QDF_STATUS_SUCCESS; +} + /** * dp_rx_fst_attach() - Initialize Rx FST and setup necessary parameters * @soc: SoC handle