[dpdk-dev] [PATCH 1/2] lib/security: add IV generation

Anoob Joseph anoobj at marvell.com
Tue Jul 20 07:46:12 CEST 2021


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 at marvell.com>
---
 lib/security/rte_security.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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 */
-- 
2.7.4



More information about the dev mailing list