From 092b3cd59f17d5c3ebe167d8729273838afbe2cb Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Tue, 19 Sep 2017 05:42:38 -0700 Subject: NAT: move session and user lookup tables to per thread data (VPP-986) Change-Id: I41a51bb36e31e05c76fef0b34fe006afbee27729 Signed-off-by: Matus Fabian --- src/plugins/nat/nat.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/nat/nat.h') diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h index d1ba5d55b73..f970821b1c9 100644 --- a/src/plugins/nat/nat.h +++ b/src/plugins/nat/nat.h @@ -244,6 +244,13 @@ typedef struct { } snat_static_map_resolve_t; typedef struct { + /* Main lookup tables */ + clib_bihash_8_8_t out2in; + clib_bihash_8_8_t in2out; + + /* Find-a-user => src address lookup */ + clib_bihash_8_8_t user_hash; + /* User pool */ snat_user_t * users; @@ -271,17 +278,10 @@ typedef u32 snat_icmp_match_function_t (struct snat_main_s *sm, typedef u32 (snat_get_worker_function_t) (ip4_header_t * ip, u32 rx_fib_index); typedef struct snat_main_s { - /* Main lookup tables */ - clib_bihash_8_8_t out2in; - clib_bihash_8_8_t in2out; - /* Endpoint address dependent sessions lookup tables */ clib_bihash_16_8_t out2in_ed; clib_bihash_16_8_t in2out_ed; - /* Find-a-user => src address lookup */ - clib_bihash_8_8_t user_hash; - /* Non-translated packets worker lookup => src address + VRF */ clib_bihash_8_8_t worker_by_in; -- cgit 1.2.3-korg