From cd35ed48d44615c49617e6d0135396b57cd43cd5 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Thu, 11 Jun 2020 10:35:52 +0000 Subject: nat: properly scale out2in-ed hash on init Type: fix Fixes: a1018c166a468f7692ab621c743503914266f508 Signed-off-by: Klement Sekera Change-Id: I86592f73a60fd146d3764e474f975881e940c244 --- src/plugins/nat/nat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins') 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); } -- cgit 1.2.3-korg