From 2a595da121b28784f73e710534522583cac7af40 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 22 Apr 2020 12:45:50 +0000 Subject: nat: ED: store both thread&session idx in hash By storing thread and session index in hash table we are able to skip multiple hash lookups in multi-worker scenario, which were used for handoff before. Also, by storing sesion index in vnet_buffer2, we can avoid repeating the lookup after handoff. Type: improvement Signed-off-by: Klement Sekera Change-Id: I406fb12f4e2dd8f4a5ca5d83d59dbc37e1af9abf --- src/plugins/nat/nat44_cli.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/nat/nat44_cli.c') diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c index 796e3495594..ccc2eac5539 100644 --- a/src/plugins/nat/nat44_cli.c +++ b/src/plugins/nat/nat44_cli.c @@ -228,6 +228,7 @@ nat44_show_hash_commnad_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "%U", format_bihash_8_8, &sm->static_mapping_by_external, verbose); + vlib_cli_output (vm, "%U", format_bihash_16_8, &sm->out2in_ed, verbose); vec_foreach_index (i, sm->per_thread_data) { tsm = vec_elt_at_index (sm->per_thread_data, i); @@ -237,8 +238,6 @@ nat44_show_hash_commnad_fn (vlib_main_t * vm, unformat_input_t * input, { vlib_cli_output (vm, "%U", format_bihash_16_8, &tsm->in2out_ed, verbose); - vlib_cli_output (vm, "%U", format_bihash_16_8, &tsm->out2in_ed, - verbose); } else { -- cgit 1.2.3-korg