aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-16 11:32:09 +0100
committerDave Barach <openvpp@barachs.net>2017-03-16 13:06:27 +0000
commite9f929b52ddb741ec1e4cb2d92c6be1e798933a0 (patch)
tree1843d4798292dbd17d27ad3fab3c833388eaaf62 /src/vnet/tcp
parent3cc4971882235a539bc6177e8e4b4d92129b3a12 (diff)
vlib: make runtime_data thread-local
Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r--src/vnet/tcp/tcp_syn_filter4.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/vnet/tcp/tcp_syn_filter4.c b/src/vnet/tcp/tcp_syn_filter4.c
index c7605a30c98..9b2a8ac7c87 100644
--- a/src/vnet/tcp/tcp_syn_filter4.c
+++ b/src/vnet/tcp/tcp_syn_filter4.c
@@ -450,18 +450,21 @@ syn_filter_enable_disable (u32 sw_if_index, int enable_disable)
if (enable_disable)
{
- vlib_main_t *vm = vlib_get_main ();
syn_filter4_runtime_t *rt;
- rt = vlib_node_get_runtime_data (vm, syn_filter4_node.index);
- vec_validate (rt->syn_counts, 1023);
- /*
- * Given perfect disperson / optimal hashing results:
- * Allow 128k (successful) syns/sec. 1024, buckets each of which
- * absorb 128 syns before filtering. Reset table once a second.
- * Reality bites, lets try resetting once every 100ms.
- */
- rt->reset_interval = 0.1; /* reset interval in seconds */
+ /* *INDENT-OFF* */
+ foreach_vlib_main ({
+ rt = vlib_node_get_runtime_data (this_vlib_main, syn_filter4_node.index);
+ vec_validate (rt->syn_counts, 1023);
+ /*
+ * Given perfect disperson / optimal hashing results:
+ * Allow 128k (successful) syns/sec. 1024, buckets each of which
+ * absorb 128 syns before filtering. Reset table once a second.
+ * Reality bites, lets try resetting once every 100ms.
+ */
+ rt->reset_interval = 0.1; /* reset interval in seconds */
+ });
+ /* *INDENT-ON* */
}
rv = vnet_feature_enable_disable ("ip4-local", "syn-filter-4",