aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64_db.h
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2019-01-21 00:05:03 -0800
committerDamjan Marion <dmarion@me.com>2019-01-21 15:33:22 +0000
commit8254ab87f2b975c4c3324dc9ac08b7f7b6c167ee (patch)
tree58b93cfd5a3cbb1f2a18b988660b09051391b602 /src/plugins/nat/nat64_db.h
parentb951ad84ab542aaebb646bf61130618b5fef8bda (diff)
NAT: VPP-1537 IPFIX per worker processing
Change-Id: I428bd25a513eb9fe65bea56572fea8cab7c51681 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat64_db.h')
-rw-r--r--src/plugins/nat/nat64_db.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/plugins/nat/nat64_db.h b/src/plugins/nat/nat64_db.h
index f1b93cf8928..e6fa8e727ad 100644
--- a/src/plugins/nat/nat64_db.h
+++ b/src/plugins/nat/nat64_db.h
@@ -160,6 +160,7 @@ int nat64_db_init (nat64_db_t * db, u32 bib_buckets, u32 bib_memory_size,
/**
* @brief Create new NAT64 BIB entry.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param in_addr Inside IPv6 address.
* @param out_addr Outside IPv4 address.
@@ -171,20 +172,23 @@ int nat64_db_init (nat64_db_t * db, u32 bib_buckets, u32 bib_memory_size,
*
* @returns BIB entry on success, 0 otherwise.
*/
-nat64_db_bib_entry_t *nat64_db_bib_entry_create (nat64_db_t * db,
+nat64_db_bib_entry_t *nat64_db_bib_entry_create (u32 thread_index,
+ nat64_db_t * db,
ip6_address_t * in_addr,
ip4_address_t * out_addr,
u16 in_port, u16 out_port,
- u32 fib_index,
- u8 proto, u8 is_static);
+ u32 fib_index, u8 proto,
+ u8 is_static);
/**
* @brief Free NAT64 BIB entry.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param bibe BIB entry.
*/
-void nat64_db_bib_entry_free (nat64_db_t * db, nat64_db_bib_entry_t * bibe);
+void nat64_db_bib_entry_free (u32 thread_index, nat64_db_t * db,
+ nat64_db_bib_entry_t * bibe);
/**
* @brief Call back function when walking NAT64 BIB, non-zero
@@ -201,7 +205,8 @@ typedef int (*nat64_db_bib_walk_fn_t) (nat64_db_bib_entry_t * bibe,
* - 6 TCP BIB
* - 17 UDP BIB
* - 1/58 ICMP BIB
- * - otherwise "unknown" protocol BIB
+ *
+ * u - otherwise "unknown" protocol BIB
* @param fn The function to invoke on each entry visited.
* @param ctx A context passed in the visit function.
*/
@@ -240,6 +245,7 @@ nat64_db_bib_entry_t *nat64_db_bib_entry_by_index (nat64_db_t * db,
/**
* @brief Create new NAT64 session table entry.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param bibe Corresponding BIB entry.
* @param in_r_addr Inside IPv6 address of the remote host.
@@ -248,7 +254,8 @@ nat64_db_bib_entry_t *nat64_db_bib_entry_by_index (nat64_db_t * db,
*
* @returns BIB entry on success, 0 otherwise.
*/
-nat64_db_st_entry_t *nat64_db_st_entry_create (nat64_db_t * db,
+nat64_db_st_entry_t *nat64_db_st_entry_create (u32 thread_index,
+ nat64_db_t * db,
nat64_db_bib_entry_t * bibe,
ip6_address_t * in_r_addr,
ip4_address_t * out_r_addr,
@@ -257,10 +264,12 @@ nat64_db_st_entry_t *nat64_db_st_entry_create (nat64_db_t * db,
/**
* @brief Free NAT64 session table entry.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param ste Session table entry.
*/
-void nat64_db_st_entry_free (nat64_db_t * db, nat64_db_st_entry_t * ste);
+void nat64_db_st_entry_free (u32 thread_index, nat64_db_t * db,
+ nat64_db_st_entry_t * ste);
/**
* @brief Find NAT64 session table entry.
@@ -308,18 +317,21 @@ void nat64_db_st_walk (nat64_db_t * db, u8 proto,
/**
* @brief Free expired session entries in session tables.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param now Current time.
*/
-void nad64_db_st_free_expired (nat64_db_t * db, u32 now);
+void nad64_db_st_free_expired (u32 thread_index, nat64_db_t * db, u32 now);
/**
* @brief Free sessions using specific outside address.
*
+ * @param thread_index thread index.
* @param db NAT64 DB.
* @param out_addr Outside address to match.
*/
-void nat64_db_free_out_addr (nat64_db_t * db, ip4_address_t * out_addr);
+void nat64_db_free_out_addr (u32 thread_index, nat64_db_t * db,
+ ip4_address_t * out_addr);
/*
* @brief Get ST entry index.