diff options
author | Vijayabhaskar Katamreddy <vkatamre@cisco.com> | 2022-05-16 22:18:37 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-05-18 07:47:39 +0000 |
commit | 3fda200c4c7c44cd0706e57e0b88254571ef196f (patch) | |
tree | faa27bda1697ed21f4206ace29ec7b12286497b9 /src/vnet/ip/reass | |
parent | 61f6a4c4f026a83390f41595cb77771a668cc55c (diff) |
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
Diffstat (limited to 'src/vnet/ip/reass')
-rw-r--r-- | src/vnet/ip/reass/ip4_full_reass.c | 4 | ||||
-rw-r--r-- | src/vnet/ip/reass/ip6_full_reass.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c index f0e1753cf2d..2493fae434a 100644 --- a/src/vnet/ip/reass/ip4_full_reass.c +++ b/src/vnet/ip/reass/ip4_full_reass.c @@ -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) diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c index 4a6c6a106f0..ff877ca7567 100644 --- a/src/vnet/ip/reass/ip6_full_reass.c +++ b/src/vnet/ip/reass/ip6_full_reass.c @@ -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) |