diff options
author | Szymon Sliwa <szs@semihalf.com> | 2018-01-05 16:26:31 +0100 |
---|---|---|
committer | Szymon Sliwa <szs@semihalf.com> | 2018-02-19 17:47:48 +0100 |
commit | 3a6b2d99d969bbb90792e1d09e97aa1be40d10df (patch) | |
tree | c4738c6a4c85c8515a3675e51583cafa3cb591cc /src/plugins/odp/odp_packet.c | |
parent | 808c3e6e7b1c764bd77b12d4bc5ffc68707971a9 (diff) |
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 <szs@semihalf.com>
Diffstat (limited to 'src/plugins/odp/odp_packet.c')
-rwxr-xr-x | src/plugins/odp/odp_packet.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |