From 3a6b2d99d969bbb90792e1d09e97aa1be40d10df Mon Sep 17 00:00:00 2001 From: Szymon Sliwa Date: Fri, 5 Jan 2018 16:26:31 +0100 Subject: plugins: odp: Add new nodes using ODP IPsec API Created two new nodes for encryption/decryption, based on user preferences we can use them to accellerate IPsec by offloading it to hardware or optimized software implementations To use the new nodes two flags are needed in the odp section of the startup.conf file, like this: To use the new nodes put the enable-odp-ipsec flag to startup.conf file, like this: odp { enable-odp-ipsec } Change-Id: Ib4bbc481efad7e90d63994580b57849b74400947 Signed-off-by: Szymon Sliwa --- src/plugins/odp/odp_packet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/plugins/odp/odp_packet.c') diff --git a/src/plugins/odp/odp_packet.c b/src/plugins/odp/odp_packet.c index 43ad6772..5a43a444 100755 --- a/src/plugins/odp/odp_packet.c +++ b/src/plugins/odp/odp_packet.c @@ -24,6 +24,7 @@ odp_if_mode_t def_if_mode; odp_if_config_t *if_config; odp_crypto_main_t odp_crypto_main; u8 enable_odp_crypto; +u8 ipsec_api; static u32 odp_packet_eth_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hi, @@ -430,6 +431,10 @@ odp_config (vlib_main_t * vm, unformat_input_t * input) { enable_odp_crypto = 1; } + else if (unformat (input, "enable-odp-ipsec")) + { + ipsec_api = 1; + } else if (unformat (input, "%s", ¶m)) { clib_warning ("%s: Unknown option %s\n", __func__, param); @@ -472,7 +477,7 @@ odp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) /* Initialization complete and worker threads can start */ tm->worker_thread_release = 1; - ipsec_init (vlib_get_main ()); + ipsec_init (vlib_get_main (), ipsec_api); return 0; } -- cgit 1.2.3-korg