- /// FIXME-MULTICORE: lock around this function
-#ifdef FA_NODE_VERBOSE_DEBUG
- clib_warning
- ("Initializing bihash for sw_if_index %d num buckets %lu memory size %llu",
- sw_if_index0, am->fa_conn_table_hash_num_buckets,
- am->fa_conn_table_hash_memory_size);
-#endif
- BV (clib_bihash_init) (&am->fa_sessions_hash,
+ if (!am->fa_sessions_hash_is_initialized) {
+ u16 wk;
+ /* Allocate the per-worker sessions pools */
+ for (wk = 0; wk < vec_len (am->per_worker_data); wk++) {
+ acl_fa_per_worker_data_t *pw = &am->per_worker_data[wk];
+ pool_alloc_aligned(pw->fa_sessions_pool, am->fa_conn_table_max_entries, CLIB_CACHE_LINE_BYTES);
+ }
+
+ /* ... and the interface session hash table */
+ BV (clib_bihash_init) (&am->fa_sessions_hash,