diff mbox series

[1/2] lib/security: add IV generation

Message ID 1626759974-334-2-git-send-email-anoobj@marvell.com (mailing list archive)
State Deferred
Delegated to: akhil goyal
Headers show
Series Improvements to rte_security | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anoob Joseph July 20, 2021, 5:46 a.m. UTC
Enable application to offload IV generation to PMD. In case of lookaside
protocol offload, IV would be provided by application in rte_crypto_op.
Allow offloading the same to PMD with such support.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 lib/security/rte_security.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index 88d31de..d61a55d 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -181,6 +181,20 @@  struct rte_security_ipsec_sa_options {
 	 * * 0: Disable per session security statistics collection for this SA.
 	 */
 	uint32_t stats : 1;
+
+	/** Generate IV
+	 *
+	 * * 1: Enable IV generation in PMD. When enabled, IV provided in
+	 *      rte_crypto_op will be overridden by the PMD generated random
+	 *      value and application is not required to provide IV in
+	 *      rte_crypto_op.
+	 *
+	 * * 0: Disable IV generation in PMD.
+	 *
+	 * Note: For inline cases, IV generation would always need to be handled
+	 * by the PMD.
+	 */
+	uint32_t iv_gen : 1;
 };
 
 /** IPSec security association direction */