From 93a7f63943ab6ed2460321f38c90246b1585f0c8 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Mon, 13 Jul 2020 06:49:56 -0400 Subject: dpdk-ipsec: use init function instead of one-time process Use VLIB_MAIN_LOOP_ENTER_FUNCTION to do post init initialization for dpdk crypto rather than create a one-time process to do the same. Type: fix Signed-off-by: Christian Hopps Change-Id: I06e480b028c8e1fc1b0024a66b2338eb21a797ca --- src/plugins/dpdk/ipsec/ipsec.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/plugins/dpdk/ipsec') diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index ad638db65d4..db2b1d6c2e9 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -1009,9 +1009,8 @@ dpdk_ipsec_enable_disable (int is_enable) return 0; } -static uword -dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt, - vlib_frame_t * f) +static clib_error_t * +dpdk_ipsec_main_init (vlib_main_t * vm) { ipsec_main_t *im = &ipsec_main; dpdk_crypto_main_t *dcm = &dpdk_crypto_main; @@ -1084,14 +1083,7 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ -VLIB_REGISTER_NODE (dpdk_ipsec_process_node,static) = { - .function = dpdk_ipsec_process, - .type = VLIB_NODE_TYPE_PROCESS, - .name = "dpdk-ipsec-process", - .process_log2_n_stack_bytes = 17, -}; -/* *INDENT-ON* */ +VLIB_MAIN_LOOP_ENTER_FUNCTION (dpdk_ipsec_main_init); /* * fd.io coding-style-patch-verification: ON -- cgit 1.2.3-korg