From patchwork Tue Aug 31 14:01:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 97609 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 926E2A0C46; Tue, 31 Aug 2021 15:08:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11384410F6; Tue, 31 Aug 2021 15:08:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 26C134067E for ; Tue, 31 Aug 2021 15:08:49 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17VCLri7015673 for ; Tue, 31 Aug 2021 06:08:49 -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=MPEAaezeZoyH11i1joIo8iV1l2bLsEX0GtumnVXPxqo=; b=YOulcpXbdY6ZX6uJab5BcZwr4cSA908tCni5rtDhkDWO9YyhPmHALu7qrYKZgUZBgId+ ZoQ8s/Ve96Rh4Yoskp3/lxyLesV1Gctr0LIlJWi4Sp8EuFXkCxtlGG5wPuKIpdWevKG7 WTh3OHAub+CBNLhtFTOUp/p4bOrndtWgRI9kPDL8yGAKN0X/SQNcFS901O3DB1QY6StN jE9ODKNejF9BdZ8HHjVzJ+WMhixpXqUScXowKTDzimAzGZDWtPDz1CE6Q3cxf5qDuTCT ShbcwfeDhbB3PCjPG7+CcRL/fGANTWgJfZ1uK8U8upmTp7/LLN7EG8sg98QSsbN2bPfC 0g== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3asdgxhv5f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 31 Aug 2021 06:08:49 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 31 Aug 2021 06:08:47 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 31 Aug 2021 06:08:47 -0700 Received: from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id EC2273F7083; Tue, 31 Aug 2021 06:08:44 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal CC: Tejasree Kondoj , Anoob Joseph , Ankur Dwivedi , Archana Muniganti , Srujana Challa , "Nithin Dabilpuram" , Jerin Jacob , Date: Tue, 31 Aug 2021 19:31:26 +0530 Message-ID: <20210831140127.31775-8-ktejasree@marvell.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210831140127.31775-1-ktejasree@marvell.com> References: <20210831140127.31775-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: nzMfSKws7J_gFGleQ8B5Dhictt235edz X-Proofpoint-GUID: nzMfSKws7J_gFGleQ8B5Dhictt235edz 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-08-31_05,2021-08-31_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 7/8] crypto/cnxk: support UDP encap with lookaside IPsec 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" Adding support for UDP encapsulation in lookaside IPsec. Signed-off-by: Tejasree Kondoj --- doc/guides/cryptodevs/cnxk.rst | 1 + doc/guides/rel_notes/release_21_11.rst | 1 + drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c | 11 ++++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/guides/cryptodevs/cnxk.rst b/doc/guides/cryptodevs/cnxk.rst index 0dd71135da..1eb72282db 100644 --- a/doc/guides/cryptodevs/cnxk.rst +++ b/doc/guides/cryptodevs/cnxk.rst @@ -231,6 +231,7 @@ Features supported * ESP * Tunnel mode * Transport mode +* UDP Encapsulation * AES-128/192/256-GCM * AES-128/192/256-CBC-SHA1-HMAC diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 4727698228..7a9aa11119 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -24,6 +24,7 @@ DPDK Release 21.11 * Added AES-CBC-SHA1-HMAC in lookaside protocol (IPsec). * Added transport mode in lookaside protocol (IPsec). + * Added UDP encapsulation in lookaside protocol (IPsec). New Features diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c index 05bffa9759..c4f7824332 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c @@ -907,6 +907,12 @@ sec_crypto_caps_populate(struct rte_cryptodev_capabilities cnxk_caps[], sec_caps_add(cnxk_caps, &cur_pos, caps_end, RTE_DIM(caps_end)); } +static void +cnxk_sec_caps_update(struct rte_security_capability *sec_cap) +{ + sec_cap->ipsec.options.udp_encap = 1; +} + void cnxk_cpt_caps_populate(struct cnxk_cpt_vf *vf) { @@ -918,8 +924,11 @@ cnxk_cpt_caps_populate(struct cnxk_cpt_vf *vf) PLT_STATIC_ASSERT(RTE_DIM(sec_caps_templ) <= RTE_DIM(vf->sec_caps)); memcpy(vf->sec_caps, sec_caps_templ, sizeof(sec_caps_templ)); - for (i = 0; i < RTE_DIM(sec_caps_templ) - 1; i++) + for (i = 0; i < RTE_DIM(sec_caps_templ) - 1; i++) { vf->sec_caps[i].crypto_capabilities = vf->sec_crypto_caps; + + cnxk_sec_caps_update(&vf->sec_caps[i]); + } } const struct rte_security_capability *