From patchwork Mon Sep 6 14:58:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 98083 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 078EAA0C54; Mon, 6 Sep 2021 16:58:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD643410FE; Mon, 6 Sep 2021 16:58:55 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9315D41102 for ; Mon, 6 Sep 2021 16:58:54 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 186Cbskb021315; Mon, 6 Sep 2021 07:58: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=0eeJQoICuWBMfVFnThmPe6Vh+vi4V/DXg6o8LfpSDQA=; b=emaeWPrRrHAfwXTmmgaGO6XCzvOjTESd37HJzN5bN6pVnue9FgSGIx77e0gHL0HBnilh 7WSuPLCTjTmE4kEHtvoDYnRYDhLIqgdfLaGGvdDbqYn4Q7TilDI3e9Us0MLVMiJgxvHJ pW9EgfIpES80zzeDJYKayXVyU7r400xYQhPAjlWTT5Qv8Mnn+5gnVLOmJlOAXqVSEr3d JPtxsP7131L/vbRuQOwRyExG3Qjf2CBcfre9aHMN3xHMuVCbtMsW+uh1QCxoIf1ZHgJx Xgh8xKZbEilqxuVnl9Yji9nBWEFwP+KMcTvLwweMWq3gFjXlsU8vxpXKYxMTXpmI4b2N 9w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3aw2sp319s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Sep 2021 07:58:53 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 6 Sep 2021 07:58:51 -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, 6 Sep 2021 07:58:51 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.144]) by maili.marvell.com (Postfix) with ESMTP id 6ADBD3F709A; Mon, 6 Sep 2021 07:58:46 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Fan Zhang , "Konstantin Ananyev" CC: Anoob Joseph , Jerin Jacob , Archana Muniganti , Tejasree Kondoj , Hemant Agrawal , "Radu Nicolau" , Ciara Power , Gagandeep Singh , Date: Mon, 6 Sep 2021 20:28:25 +0530 Message-ID: <1630940307-78-2-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1630940307-78-1-git-send-email-anoobj@marvell.com> References: <1629093590-115-1-git-send-email-anoobj@marvell.com> <1630940307-78-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: k_QYL-PAbr_lGxXhnyVFN1wnnr2oxDKB X-Proofpoint-ORIG-GUID: k_QYL-PAbr_lGxXhnyVFN1wnnr2oxDKB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-06_06,2021-09-03_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 1/3] security: support user specified IV 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 user to provide IV to be used per security operation. This would be used with lookaside protocol offload for comparing against known vectors. By default, PMD would generate IV internally and would be random. Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- doc/guides/rel_notes/release_21_11.rst | 5 +++++ lib/security/rte_security.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 83da727..a1813bd 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -105,6 +105,11 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* security: add IPsec SA option to disable IV generation + + * Added IPsec SA option to disable IV generation to allow known vector + tests as well as usage of application provided IV on supported PMDs. + ABI Changes ----------- diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 88d31de..b4b6776 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; + + /** Disable IV generation in PMD + * + * * 1: Disable IV generation in PMD. When disabled, IV provided in + * rte_crypto_op will be used by the PMD. + * + * * 0: Enable IV generation in PMD. When enabled, PMD generated random + * value would be used and application is not required to provide + * IV. + * + * Note: For inline cases, IV generation would always need to be handled + * by the PMD. + */ + uint32_t iv_gen_disable : 1; }; /** IPSec security association direction */