summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat.h')
-rw-r--r--src/plugins/nat/nat.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h
index 86f6342ab09..d7f60dd2145 100644
--- a/src/plugins/nat/nat.h
+++ b/src/plugins/nat/nat.h
@@ -36,8 +36,8 @@
#include <nat/lib/lib.h>
#include <nat/lib/inlines.h>
-/* number of worker handoff frame queue elements */
-#define NAT_FQ_NELTS 64
+/* default number of worker handoff frame queue elements */
+#define NAT_FQ_NELTS_DEFAULT 64
/* NAT buffer flags */
#define SNAT_FLAG_HAIRPINNING (1 << 0)
@@ -782,6 +782,9 @@ typedef struct snat_main_s
/* pat - dynamic mapping enabled or conneciton tracking */
u8 pat;
+ /* number of worker handoff frame queue elements */
+ u32 frame_queue_nelts;
+
/* nat44 plugin enabled */
u8 enabled;
@@ -1299,6 +1302,15 @@ clib_error_t *nat44_api_hookup (vlib_main_t * vm);
int snat_set_workers (uword * bitmap);
/**
+ * @brief Set NAT plugin number of frame queue elements
+ *
+ * @param frame_queue_nelts number of worker handoff frame queue elements
+ *
+ * @return 0 on success, non-zero value otherwise
+ */
+int snat_set_frame_queue_nelts (u32 frame_queue_nelts);
+
+/**
* @brief Enable/disable NAT44 feature on the interface
*
* @param sw_if_index software index of the interface