ipsec: implement SA data-path API
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Thu, 10 Jan 2019 21:06:30 +0000 (21:06 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 Jan 2019 15:57:22 +0000 (16:57 +0100)
commit4d7ea3e1459b7df218534eb802c13f89ff867c54
treeae313235a7fd7d1fa886ecaab77cd09b6de85a9e
parent1e0ad1e36d46a76bc675bd7df39539c3dd83211a
ipsec: implement SA data-path API

Provide implementation for rte_ipsec_pkt_crypto_prepare() and
rte_ipsec_pkt_process().
Current implementation:
 - supports ESP protocol tunnel mode.
 - supports ESP protocol transport mode.
 - supports ESN and replay window.
 - supports algorithms: AES-CBC, AES-GCM, HMAC-SHA1, NULL.
 - covers all currently defined security session types:
        - RTE_SECURITY_ACTION_TYPE_NONE
        - RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO
        - RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL
        - RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL

For first two types SQN check/update is done by SW (inside the library).
For last two type it is HW/PMD responsibility.

Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
lib/librte_ipsec/crypto.h [new file with mode: 0644]
lib/librte_ipsec/iph.h [new file with mode: 0644]
lib/librte_ipsec/ipsec_sqn.h
lib/librte_ipsec/pad.h [new file with mode: 0644]
lib/librte_ipsec/sa.c