From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4679BA0C49; Tue, 20 Jul 2021 07:56:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 419BA410DB; Tue, 20 Jul 2021 07:56:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3A3AF410DB for ; Tue, 20 Jul 2021 07:56:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16K5oXJw028884; Mon, 19 Jul 2021 22:56:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=HKjD43kZHtpvkKhREyQglpxjhr3/aSXrNKoppZpfHjI=; b=GCOe67O4C1JTomkIS8XdfCkrIqU1GYcx0Gm6ynTamIZlCdfYddfPHRgNFO5AllOjvCng tfgR92jIcyy08jyOYXo93S/dvf6EDzYLmVgkSwbWfGoS9jtm6+afhJxjUEEK8WxYKaf8 yACFE8Upm/N7u+7wNJ/bQCJXP9NDxmqBTiGD6RjklvU7MuLLFFJb68LA9veqnjoyzrsI qrtmjHjtilr8x8AmapBQsAMBGA4CMpedMobUB0C4iqPOCvvV0HVItEc6RhqujfkguKLr g73rR6BjFlwSCiNpvDaOeC34WYx/sFwTJZAFo9+4XJv/ZH8HOrF06HGOum06/NbI9ZCz hQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 39wa68b76k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 19 Jul 2021 22:56:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 19 Jul 2021 22:56:53 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 19 Jul 2021 22:56:52 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.144]) by maili.marvell.com (Postfix) with ESMTP id 6A46C3F7064; Mon, 19 Jul 2021 22:56:48 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Fan Zhang , "Konstantin Ananyev" CC: Anoob Joseph , Jerin Jacob , "Ankur Dwivedi" , Tejasree Kondoj , Date: Tue, 20 Jul 2021 11:16:12 +0530 Message-ID: <1626759974-334-2-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626759974-334-1-git-send-email-anoobj@marvell.com> References: <1626759974-334-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: d9n1FUjRfkvvtb78BXb6GVjvih4K3rX7 X-Proofpoint-ORIG-GUID: d9n1FUjRfkvvtb78BXb6GVjvih4K3rX7 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-20_04:2021-07-19, 2021-07-20 signatures=0 Subject: [dpdk-dev] [PATCH 1/2] lib/security: add IV generation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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