diff options
author | Klement Sekera <ksekera@cisco.com> | 2020-04-09 13:31:27 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2020-04-24 13:51:38 +0000 |
commit | 69de9fadbfd2e6e256a5133513e002712705ded3 (patch) | |
tree | 84c17fb37b5b9b08bb99c99e63351327095f1196 /src/plugins/nat/out2in_ed.c | |
parent | e7f420177620868275add23ba5fcea7c7d18c91a (diff) |
nat: ED: reduce number of hash tables used
Use out2in_ed hash table for port overloading tracking instead of
global table. This reduces number of hash insertions in slowpath.
Type: improvement
Change-Id: Iad4e897d52033beb7f6d76a7ddb596eef586c6cb
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/plugins/nat/out2in_ed.c')
-rw-r--r-- | src/plugins/nat/out2in_ed.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/plugins/nat/out2in_ed.c b/src/plugins/nat/out2in_ed.c index 5b70b0c672a..e4f01303b4d 100644 --- a/src/plugins/nat/out2in_ed.c +++ b/src/plugins/nat/out2in_ed.c @@ -131,16 +131,6 @@ nat44_o2i_ed_is_idle_session_cb (clib_bihash_kv_16_8_t * kv, void *arg) if (clib_bihash_add_del_16_8 (&tsm->in2out_ed, &ed_kv, 0)) nat_elog_warn ("in2out_ed key del failed"); - ed_bihash_kv_t bihash_key; - clib_memset (&bihash_key, 0, sizeof (bihash_key)); - bihash_key.k.dst_address = s->ext_host_addr.as_u32; - bihash_key.k.dst_port = s->ext_host_port; - bihash_key.k.src_address = s->out2in.addr.as_u32; - bihash_key.k.src_port = s->out2in.port; - bihash_key.k.protocol = s->out2in.protocol; - clib_bihash_add_del_16_8 (&sm->ed_ext_ports, &bihash_key.kv, - 0 /* is_add */ ); - if (snat_is_unk_proto_session (s)) goto delete; |