qcacmn: Make changes to support fisa flow deletion
Add fisa deletion support by invalidating the fisa DDR entry when adding a new entry. Change-Id: I02189e22e09ca0ef5e1fdb5952c7e72cd87d3673 CRs-Fixed: 2954060
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9cf3f44770
commit
88ff3516d7
@@ -3466,6 +3466,8 @@ struct dp_fisa_rx_sw_ft {
|
|||||||
uint32_t cur_aggr_gso_size;
|
uint32_t cur_aggr_gso_size;
|
||||||
struct udphdr *head_skb_udp_hdr;
|
struct udphdr *head_skb_udp_hdr;
|
||||||
uint16_t frags_cumulative_len;
|
uint16_t frags_cumulative_len;
|
||||||
|
/* debug delete count */
|
||||||
|
uint32_t del_count;
|
||||||
/* CMEM parameters */
|
/* CMEM parameters */
|
||||||
uint32_t cmem_offset;
|
uint32_t cmem_offset;
|
||||||
uint32_t metadata;
|
uint32_t metadata;
|
||||||
@@ -3479,6 +3481,7 @@ struct dp_fisa_rx_sw_ft {
|
|||||||
|
|
||||||
#define DP_RX_GET_SW_FT_ENTRY_SIZE sizeof(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_CACHE_FL_HST 10
|
||||||
|
#define MAX_FSE_LRU_DELETE_HISTORY 16
|
||||||
/**
|
/**
|
||||||
* struct fse_cache_flush_history - Debug history cache flush
|
* struct fse_cache_flush_history - Debug history cache flush
|
||||||
* @timestamp: Entry update timestamp
|
* @timestamp: Entry update timestamp
|
||||||
@@ -3491,6 +3494,32 @@ struct fse_cache_flush_history {
|
|||||||
uint32_t flows_deleted;
|
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 {
|
struct dp_rx_fst {
|
||||||
/* Software (DP) FST */
|
/* Software (DP) FST */
|
||||||
uint8_t *base;
|
uint8_t *base;
|
||||||
@@ -3517,6 +3546,9 @@ struct dp_rx_fst {
|
|||||||
/* Allow FSE cache flush cmd to FW */
|
/* Allow FSE cache flush cmd to FW */
|
||||||
bool fse_cache_flush_allow;
|
bool fse_cache_flush_allow;
|
||||||
struct fse_cache_flush_history cache_fl_rec[MAX_FSE_CACHE_FL_HST];
|
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 */
|
/* FISA DP stats */
|
||||||
struct dp_fisa_stats stats;
|
struct dp_fisa_stats stats;
|
||||||
|
|
||||||
@@ -3528,7 +3560,6 @@ struct dp_rx_fst {
|
|||||||
uint32_t cmem_ba;
|
uint32_t cmem_ba;
|
||||||
qdf_spinlock_t dp_rx_sw_ft_lock[MAX_REO_DEST_RINGS];
|
qdf_spinlock_t dp_rx_sw_ft_lock[MAX_REO_DEST_RINGS];
|
||||||
qdf_event_t cmem_resp_event;
|
qdf_event_t cmem_resp_event;
|
||||||
bool flow_deletion_supported;
|
|
||||||
bool fst_in_cmem;
|
bool fst_in_cmem;
|
||||||
bool pm_suspended;
|
bool pm_suspended;
|
||||||
};
|
};
|
||||||
|
@@ -1532,7 +1532,6 @@ 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_fst *fst = (struct hal_rx_fst *)rx_fst;
|
||||||
struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
|
struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
|
||||||
uint8_t *fse;
|
uint8_t *fse;
|
||||||
bool fse_valid;
|
|
||||||
|
|
||||||
if (table_offset >= fst->max_entries) {
|
if (table_offset >= fst->max_entries) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||||
@@ -1544,14 +1543,8 @@ hal_rx_flow_setup_fse_6490(uint8_t *rx_fst, uint32_t table_offset,
|
|||||||
fse = (uint8_t *)fst->base_vaddr +
|
fse = (uint8_t *)fst->base_vaddr +
|
||||||
(table_offset * HAL_RX_FST_ENTRY_SIZE);
|
(table_offset * HAL_RX_FST_ENTRY_SIZE);
|
||||||
|
|
||||||
fse_valid = HAL_GET_FLD(fse, RX_FLOW_SEARCH_ENTRY_9, VALID);
|
/* clear the valid bit before starting the deletion*/
|
||||||
|
HAL_CLR_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(fse, RX_FLOW_SEARCH_ENTRY_0, SRC_IP_127_96) =
|
||||||
HAL_SET_FLD_SM(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));
|
(flow->tuple_info.src_ip_127_96));
|
||||||
|
@@ -1060,7 +1060,6 @@ 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_fst *fst = (struct hal_rx_fst *)rx_fst;
|
||||||
struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
|
struct hal_rx_flow *flow = (struct hal_rx_flow *)rx_flow;
|
||||||
uint8_t *fse;
|
uint8_t *fse;
|
||||||
bool fse_valid;
|
|
||||||
|
|
||||||
if (table_offset >= fst->max_entries) {
|
if (table_offset >= fst->max_entries) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||||
@@ -1072,13 +1071,8 @@ hal_rx_flow_setup_fse_7850(uint8_t *rx_fst, uint32_t table_offset,
|
|||||||
fse = (uint8_t *)fst->base_vaddr +
|
fse = (uint8_t *)fst->base_vaddr +
|
||||||
(table_offset * HAL_RX_FST_ENTRY_SIZE);
|
(table_offset * HAL_RX_FST_ENTRY_SIZE);
|
||||||
|
|
||||||
fse_valid = HAL_GET_FLD(fse, RX_FLOW_SEARCH_ENTRY, VALID);
|
/* clear the valid bit before starting the deletion*/
|
||||||
|
HAL_CLR_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, SRC_IP_127_96) =
|
HAL_SET_FLD(fse, RX_FLOW_SEARCH_ENTRY, SRC_IP_127_96) =
|
||||||
HAL_SET_FLD_SM(RX_FLOW_SEARCH_ENTRY, SRC_IP_127_96,
|
HAL_SET_FLD_SM(RX_FLOW_SEARCH_ENTRY, SRC_IP_127_96,
|
||||||
|
Reference in New Issue
Block a user