aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/odp/ipsec/ipsec.h
diff options
context:
space:
mode:
authorSzymon Sliwa <szs@semihalf.com>2018-01-05 16:26:31 +0100
committerSzymon Sliwa <szs@semihalf.com>2018-02-19 17:47:48 +0100
commit3a6b2d99d969bbb90792e1d09e97aa1be40d10df (patch)
treec4738c6a4c85c8515a3675e51583cafa3cb591cc /src/plugins/odp/ipsec/ipsec.h
parent808c3e6e7b1c764bd77b12d4bc5ffc68707971a9 (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/ipsec/ipsec.h')
-rw-r--r--src/plugins/odp/ipsec/ipsec.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/odp/ipsec/ipsec.h b/src/plugins/odp/ipsec/ipsec.h
index 0f3ceb86..c947d7ce 100644
--- a/src/plugins/odp/ipsec/ipsec.h
+++ b/src/plugins/odp/ipsec/ipsec.h
@@ -20,11 +20,14 @@
typedef struct
{
+ u8 is_odp_sa_present;
+ odp_ipsec_sa_t odp_sa;
odp_crypto_session_t sess;
u32 digest_size;
u8 iv_data[16];
u32 iv_len;
u32 key_size;
+ ip46_address_t tunnel_dst, tunnel_src;
} sa_data_t;
typedef struct
@@ -43,8 +46,10 @@ extern odp_crypto_main_t odp_crypto_main;
extern u8 enable_odp_crypto;
int create_sess (ipsec_sa_t * sa, sa_data_t * sess, int is_outbound);
+int create_odp_sa (ipsec_sa_t * sa, sa_data_t * sess, int flow_label,
+ int is_outbound);
-clib_error_t *ipsec_init (vlib_main_t * vm);
+clib_error_t *ipsec_init (vlib_main_t * vm, u8 ipsec_api);
#endif /* __IPSEC_H__ */