aboutsummaryrefslogtreecommitdiff
path: root/helper/include
diff options
context:
space:
mode:
authorAakash Sasidharan <asasidharan@marvell.com>2021-01-25 05:40:34 +0000
committerMatias Elo <matias.elo@nokia.com>2021-02-05 16:14:44 +0200
commitb0470792a68fa0fa1b7e2eaeedc721c1e9fc65cc (patch)
treed08f69d891db46e0a00a89916b1bd825debfd387 /helper/include
parenta2ae9164243ea6eb994e8e58c401e4d3e24d6b4c (diff)
helper: ipsec: add algorithm check function
Add IPSEC check function to see whether a requested algorithm configuration is supported by the platform. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'helper/include')
-rw-r--r--helper/include/odp/helper/ipsec.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/helper/include/odp/helper/ipsec.h b/helper/include/odp/helper/ipsec.h
index d506d2a4d..66bed5399 100644
--- a/helper/include/odp/helper/ipsec.h
+++ b/helper/include/odp/helper/ipsec.h
@@ -71,6 +71,29 @@ ODP_STATIC_ASSERT(sizeof(odph_ahhdr_t) == ODPH_AHHDR_LEN,
"ODPH_AHHDR_T__SIZE_ERROR");
/**
+ * Check IPSEC algorithm support
+ *
+ * Based on the capabilities exposed by the ODP implementation, check whether
+ * the specified IPSEC algorithm configuration is supported by the
+ * implementation. The caller provides the IPSEC capability structure as an
+ * argument to the helper function.
+ *
+ * @param capa IPSEC capability structure
+ * @param cipher_alg Cipher algorithm
+ * @param cipher_key_len Length of cipher key in bytes
+ * @param auth_alg Authentication algorithm
+ * @param auth_key_len Length of authentication key in bytes
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int odph_ipsec_alg_check(odp_ipsec_capability_t capa,
+ odp_cipher_alg_t cipher_alg,
+ uint32_t cipher_key_len,
+ odp_auth_alg_t auth_alg,
+ uint32_t auth_key_len);
+
+/**
* @}
*/