summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.c
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2019-06-24 15:13:06 +0000
committerDave Barach <openvpp@barachs.net>2019-07-09 21:27:59 +0000
commite4f9556d308ed75b08a2c89925b118e0b7b78abc (patch)
treea4fdd84d9059f1b6083a45f0c6ea873c8d8c84fd /src/plugins/acl/acl.c
parent70f26d5425f72ebf207ad4ca6e83c1b7ff959c18 (diff)
acl: perform the ACL-as-a-service user registrations in global heap
Some users tend to call registration routine long before they need that service - which triggers an immediate initialization of the ACL heap, which is rather big. This commit defers this process by keeping the registrations in the global heap. Change-Id: I5825871bd836851942b55184b6ee2657c7a9cc33 Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.c')
-rw-r--r--src/plugins/acl/acl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index 56a1bfa4d6e..9ebb349d1b1 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -789,10 +789,6 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index,
u32 lc_index = (*pinout_lc_index_by_sw_if_index)[sw_if_index];
if (~0 == lc_index)
{
- if (~0 == am->interface_acl_user_id)
- am->interface_acl_user_id =
- acl_plugin.register_user_module ("interface ACL", "sw_if_index",
- "is_input");
lc_index =
acl_plugin.get_lookup_context_index (am->interface_acl_user_id,
sw_if_index, is_input);
@@ -3659,7 +3655,9 @@ acl_init (vlib_main_t * vm)
/* Set the default threshold */
am->tuple_merge_split_threshold = TM_SPLIT_THRESHOLD;
- am->interface_acl_user_id = ~0; /* defer till the first use */
+ am->interface_acl_user_id =
+ acl_plugin.register_user_module ("interface ACL", "sw_if_index",
+ "is_input");
return error;
}