summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.h
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-09-19 05:42:38 -0700
committerOle Trøan <otroan@employees.org>2017-09-20 06:47:20 +0000
commit092b3cd59f17d5c3ebe167d8729273838afbe2cb (patch)
tree3a082495ac32f2665a0032726c00868b19de9262 /src/plugins/nat/nat.h
parentf22f07dec90b7250f908d0085c1cf328f7d27138 (diff)
NAT: move session and user lookup tables to per thread data (VPP-986)
Change-Id: I41a51bb36e31e05c76fef0b34fe006afbee27729 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.h')
-rw-r--r--src/plugins/nat/nat.h14
1 files changed, 7 insertions, 7 deletions
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;