summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ei/nat44_ei.c
diff options
context:
space:
mode:
authorElias Rudberg <elias.rudberg@bahnhof.net>2021-01-26 13:56:45 +0100
committerOle Tr�an <otroan@employees.org>2021-02-05 11:54:14 +0000
commite345ee5cb94cb28cac4ba62af67c2c540916a429 (patch)
treef5653c0f78888281710869907b049720853d8ede /src/plugins/nat/nat44-ei/nat44_ei.c
parent839dcc0fb7313638d9b8f52a9db81350dddfe461 (diff)
nat: configurable handoff frame queue size
Make number of worker handoff frame queue elements configurable as a set nat frame-queue-nelts command. The default value is 64 which is the same value that was previously hard-coded. The idea is that allowing larger values can be useful in some cases, to avoid congestion drops. Also add nat_set_fq_options API support and a corresponding test case. Type: improvement Change-Id: I5c321eb2d7997f76fac2703d9c4a5b2516375db3 Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Diffstat (limited to 'src/plugins/nat/nat44-ei/nat44_ei.c')
-rw-r--r--src/plugins/nat/nat44-ei/nat44_ei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44-ei/nat44_ei.c b/src/plugins/nat/nat44-ei/nat44_ei.c
index 34288e14856..02403d0cd99 100644
--- a/src/plugins/nat/nat44-ei/nat44_ei.c
+++ b/src/plugins/nat/nat44-ei/nat44_ei.c
@@ -117,6 +117,9 @@ nat44_ei_plugin_enable (nat44_ei_config_t c)
vlib_zero_simple_counter (&sm->total_sessions, 0);
vlib_zero_simple_counter (&sm->user_limit_reached, 0);
+ if (!sm->frame_queue_nelts)
+ sm->frame_queue_nelts = NAT_FQ_NELTS_DEFAULT;
+
sm->enabled = 1;
return 0;