ip: reassembly - increasing the nbuckets for reass

Type: fix

as number of reass contexts increasing based on workers, increasing the number of nbuckets for bihash

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I83d061a709ecb8845ce745b18d03fdefc795787f
This commit is contained in:
Vijayabhaskar Katamreddy
2022-05-16 22:18:37 +00:00
committed by Ole Tr�an
parent 61f6a4c4f0
commit 3fda200c4c
2 changed files with 6 additions and 2 deletions

View File

@ -1481,7 +1481,9 @@ ip4_full_reass_get_nbuckets ()
u32 nbuckets;
u8 i;
nbuckets = (u32) (rm->max_reass_n / IP4_REASS_HT_LOAD_FACTOR);
/* need more mem with more workers */
nbuckets = (u32) (rm->max_reass_n * (vlib_num_workers () + 1) /
IP4_REASS_HT_LOAD_FACTOR);
for (i = 0; i < 31; i++)
if ((1 << i) >= nbuckets)

View File

@ -1410,7 +1410,9 @@ ip6_full_reass_get_nbuckets ()
u32 nbuckets;
u8 i;
nbuckets = (u32) (rm->max_reass_n / IP6_FULL_REASS_HT_LOAD_FACTOR);
/* need more mem with more workers */
nbuckets = (u32) (rm->max_reass_n * (vlib_num_workers () + 1) /
IP6_FULL_REASS_HT_LOAD_FACTOR);
for (i = 0; i < 31; i++)
if ((1 << i) >= nbuckets)