1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Chelsio Communications.
9 #include <rte_bitmap.h>
11 #include "cxgbe_filter.h"
14 * Max # of ATIDs. The absolute HW max is 16K but we keep it lower.
16 #define MAX_ATIDS 8192U
20 union aopen_entry *next;
24 * Holds the size, base address, free list start, etc of filter TID.
25 * The tables themselves are allocated dynamically.
30 struct filter_entry *ftid_tab; /* Normal filters */
31 union aopen_entry *atid_tab;
32 struct rte_bitmap *ftid_bmap;
33 uint8_t *ftid_bmap_array;
34 unsigned int nftids, natids;
35 unsigned int ftid_base, hash_base;
37 union aopen_entry *afree;
38 unsigned int atids_in_use;
40 /* TIDs in the TCAM */
41 rte_atomic32_t tids_in_use;
42 /* TIDs in the HASH */
43 rte_atomic32_t hash_tids_in_use;
44 rte_atomic32_t conns_in_use;
46 rte_spinlock_t atid_lock __rte_cache_aligned;
47 rte_spinlock_t ftid_lock;
49 #endif /* _CXGBE_OFLD_H_ */