nat: more long read after short write optimization 00/27400/5
authorKlement Sekera <ksekera@cisco.com>
Tue, 19 May 2020 17:47:23 +0000 (17:47 +0000)
committerOle Trøan <otroan@employees.org>
Mon, 8 Jun 2020 13:46:35 +0000 (13:46 +0000)
commite3621518046ad7f37ccf77c549a93375ab89da19
treeaab4446172fe661f3a2eaa58c1fc4cc1d209219b
parentc1f0d9c105c25c67d9ef86a53c10d43d40b61fe0
nat: more long read after short write optimization

Replace whitespread (mis)use of snat_session_key_t by proper function
arguments where applicable and inline functions to calculate hash keys
instead of using structs for that. Make all hash tables use same network
byte order port so that there is no longer a discrepancy between static
mappings using host byte order while in2out/out2in tables using network
byte order.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I80786d2f947c67824c101a13bb608f1fe1080f34
15 files changed:
src/plugins/nat/in2out.c
src/plugins/nat/in2out_ed.c
src/plugins/nat/nat.c
src/plugins/nat/nat.h
src/plugins/nat/nat44_classify.c
src/plugins/nat/nat44_cli.c
src/plugins/nat/nat44_hairpinning.c
src/plugins/nat/nat64.c
src/plugins/nat/nat_api.c
src/plugins/nat/nat_det_in2out.c
src/plugins/nat/nat_det_out2in.c
src/plugins/nat/nat_format.c
src/plugins/nat/nat_inlines.h
src/plugins/nat/out2in.c
src/plugins/nat/out2in_ed.c