20 #ifndef __CNAT_VA_DB_H__ 21 #define __CNAT_VA_DB_H__ 23 #include <clib_lite.h> 29 #define VA_TOTAL_ENTRIES (64*1024) 30 #define VA_ENTRY_PER_BUCKET (8) 31 #define VA_BUCKET_MASK (VA_ENTRY_PER_BUCKET -1) 32 #define VA_BUCKETS (VA_TOTAL_ENTRIES / VA_ENTRY_PER_BUCKET) 33 #define VA_KEY_SIZE 12 35 typedef struct _va_entry {
47 typedef struct _va_keys {
57 typedef struct _va_bucket_t {
59 u32 next_available_entry;
60 u32 new_entry_counter;
74 #define FRAG_DEBUG_PRINTF1(a) \ 75 if (frag_debug_flag) { \ 76 PLATFORM_DEBUG_PRINT(a); \ 79 #define FRAG_DEBUG_PRINTF2(a, b) \ 80 if (frag_debug_flag) { \ 81 PLATFORM_DEBUG_PRINT(a, b); \ 84 #define FRAG_DEBUG_PRINTF3(a, b, c) \ 85 if (frag_debug_flag) { \ 86 PLATFORM_DEBUG_PRINT(a, b, c); \ 89 #define FRAG_DEBUG_PRINTF4(a, b, c, d) \ 90 if (frag_debug_flag) { \ 91 PLATFORM_DEBUG_PRINT(a, b, c, d); \ 94 #define FRAG_DEBUG_PRINTF5(a, b, c, d, e) \ 95 if (frag_debug_flag) { \ 96 PLATFORM_DEBUG_PRINT(a, b, c, d, e); \ 99 #define FRAG_DEBUG_PRINTF6(a, b, c, d, e, f) \ 100 if (frag_debug_flag) { \ 101 PLATFORM_DEBUG_PRINT(a, b, c, d, e, f); \ 105 #define FRAG_DEBUG_PRINTF1(a) 107 #define FRAG_DEBUG_PRINTF2(a, b) 109 #define FRAG_DEBUG_PRINTF3(a, b, c) 111 #define FRAG_DEBUG_PRINTF4(a, b, c, d) 113 #define FRAG_DEBUG_PRINTF5(a, b, c, d, e) 115 #define FRAG_DEBUG_PRINTF6(a, b, c, d, e, f) va_entry_t * va_db_lookup(u32 bucket_index, va_lookup_key *key)
#define VA_ENTRY_PER_BUCKET
struct _va_entry va_entry_t
struct _va_bucket_t va_bucket_t
int va_db_delete_entry(u32 bucket_index, va_lookup_key *)
void va_db_add_new_entry(u32 bucket_index, va_lookup_key *)