Lines Matching refs:fst

103 void hal_rx_dump_fse_table(struct hal_rx_fst *fst)  in hal_rx_dump_fse_table()  argument
107 (struct rx_flow_search_entry *)fst->base_vaddr; in hal_rx_dump_fse_table()
109 dp_info("Number flow table entries %d", fst->add_flow_count); in hal_rx_dump_fse_table()
110 for (i = 0; i < fst->max_entries; i++) { in hal_rx_dump_fse_table()
130 void hal_rx_dump_fse_table(struct hal_rx_fst *fst) in hal_rx_dump_fse_table() argument
142 struct hal_rx_fst *fst, uint32_t table_offset, in hal_rx_flow_setup_fse() argument
148 return hal_soc->ops->hal_rx_flow_setup_fse((uint8_t *)fst, in hal_rx_flow_setup_fse()
189 struct hal_rx_fst *fst, void *hal_rx_fse) in hal_rx_flow_delete_entry() argument
194 return hal_soc->ops->hal_rx_flow_delete_entry((uint8_t *)fst, in hal_rx_flow_delete_entry()
210 static void hal_rx_fst_key_configure(struct hal_rx_fst *fst) in hal_rx_fst_key_configure() argument
214 qdf_mem_copy(key_bytes, fst->key, HAL_FST_HASH_KEY_SIZE_BYTES); in hal_rx_fst_key_configure()
226 key_reverse(fst->shifted_key, key_bytes, HAL_FST_HASH_KEY_SIZE_BYTES); in hal_rx_fst_key_configure()
229 static void hal_rx_fst_key_configure(struct hal_rx_fst *fst) in hal_rx_fst_key_configure() argument
240 static inline void *hal_rx_fst_get_base(struct hal_rx_fst *fst) in hal_rx_fst_get_base() argument
242 return fst->base_vaddr; in hal_rx_fst_get_base()
273 struct hal_rx_fst *fst, in hal_rx_flow_get_tuple_info() argument
281 (uint8_t *)fst, in hal_rx_flow_get_tuple_info()
296 static void hal_flow_toeplitz_create_cache(struct hal_rx_fst *fst) in hal_flow_toeplitz_create_cache() argument
301 uint8_t *key = fst->shifted_key; in hal_flow_toeplitz_create_cache()
343 fst->key_cache[i][val] = hash; in hal_flow_toeplitz_create_cache()
350 static void hal_flow_toeplitz_create_cache(struct hal_rx_fst *fst) in hal_flow_toeplitz_create_cache() argument
362 struct hal_rx_fst *fst = qdf_mem_malloc(sizeof(struct hal_rx_fst)); in hal_rx_fst_attach() local
365 if (!fst) { in hal_rx_fst_attach()
371 qdf_mem_set(fst, sizeof(struct hal_rx_fst), 0); in hal_rx_fst_attach()
373 fst->key = hash_key; in hal_rx_fst_attach()
374 fst->max_skid_length = max_search; in hal_rx_fst_attach()
375 fst->max_entries = max_entries; in hal_rx_fst_attach()
376 fst->hash_mask = max_entries - 1; in hal_rx_fst_attach()
379 fst->fst_entry_size = fst_entry_size; in hal_rx_fst_attach()
382 "HAL FST allocation %pK %d * %d\n", fst, in hal_rx_fst_attach()
383 fst->max_entries, fst_entry_size); in hal_rx_fst_attach()
384 qdf_ssr_driver_dump_register_region("hal_rx_fst", fst, sizeof(*fst)); in hal_rx_fst_attach()
388 fst->base_vaddr = (uint8_t *)qdf_mem_alloc_consistent(qdf_dev, in hal_rx_fst_attach()
390 (fst->max_entries * fst_entry_size), in hal_rx_fst_attach()
391 &fst->base_paddr); in hal_rx_fst_attach()
393 if (!fst->base_vaddr) { in hal_rx_fst_attach()
396 qdf_mem_free(fst); in hal_rx_fst_attach()
400 fst->base_vaddr, in hal_rx_fst_attach()
401 (fst->max_entries * in hal_rx_fst_attach()
404 *hal_fst_base_paddr = (uint64_t)fst->base_paddr; in hal_rx_fst_attach()
411 "hal_rx_fst base address 0x%pK", (void *)fst->base_paddr); in hal_rx_fst_attach()
414 (void *)fst->key, HAL_FST_HASH_KEY_SIZE_BYTES); in hal_rx_fst_attach()
416 qdf_mem_set((uint8_t *)fst->base_vaddr, in hal_rx_fst_attach()
417 (fst->max_entries * fst_entry_size), 0); in hal_rx_fst_attach()
420 hal_rx_fst_key_configure(fst); in hal_rx_fst_attach()
421 hal_flow_toeplitz_create_cache(fst); in hal_rx_fst_attach()
423 return fst; in hal_rx_fst_attach()
455 struct hal_rx_fst *fst = (struct hal_rx_fst *)hal_fst; in hal_flow_toeplitz_hash() local
477 hash ^= fst->key_cache[i][tuple[j]]; in hal_flow_toeplitz_hash()
482 (hash >> 12), (hash >> 12) % (fst->max_entries)); in hal_flow_toeplitz_hash()
485 hash &= (fst->max_entries - 1); in hal_flow_toeplitz_hash()
511 struct hal_rx_fst *fst, uint32_t flow_hash, in hal_rx_insert_flow_entry() argument
519 for (i = 0; i < fst->max_skid_length; i++) { in hal_rx_insert_flow_entry()
520 hal_hash = hal_rx_get_hal_hash(fst, (flow_hash + i)); in hal_rx_insert_flow_entry()
522 hal_fse = hal_rx_flow_get_tuple_info(hal_soc, fst, hal_hash, in hal_rx_insert_flow_entry()
536 if (i == fst->max_skid_length) { in hal_rx_insert_flow_entry()
550 struct hal_rx_fst *fst, uint32_t flow_hash, in hal_rx_find_flow_from_tuple() argument
558 for (i = 0; i < fst->max_skid_length; i++) { in hal_rx_find_flow_from_tuple()
559 hal_hash = hal_rx_get_hal_hash(fst, (flow_hash + i)); in hal_rx_find_flow_from_tuple()
561 hal_fse = hal_rx_flow_get_tuple_info(hal_soc_hdl, fst, hal_hash, in hal_rx_find_flow_from_tuple()
574 if (i == fst->max_skid_length) { in hal_rx_find_flow_from_tuple()