From: Klement Sekera Date: Thu, 11 Jun 2020 10:35:52 +0000 (+0000) Subject: nat: properly scale out2in-ed hash on init X-Git-Tag: v21.01-rc0~293 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F27496%2F1;p=vpp.git nat: properly scale out2in-ed hash on init Type: fix Fixes: a1018c166a468f7692ab621c743503914266f508 Signed-off-by: Klement Sekera Change-Id: I86592f73a60fd146d3764e474f975881e940c244 --- diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c index 36d03a620d4..e4fed18371e 100644 --- a/src/plugins/nat/nat.c +++ b/src/plugins/nat/nat.c @@ -4122,8 +4122,10 @@ snat_config (vlib_main_t * vm, unformat_input_t * input) nat_ha_init (vm, nat_ha_sadd_ed_cb, nat_ha_sdel_ed_cb, nat_ha_sref_ed_cb); clib_bihash_init_16_8 (&sm->out2in_ed, "out2in-ed", + clib_max (1, sm->num_workers) * sm->translation_buckets, - translation_memory_size); + clib_max (1, sm->num_workers) * + sm->translation_memory_size); clib_bihash_set_kvp_format_fn_16_8 (&sm->out2in_ed, format_ed_session_kvp); }