From patchwork Wed Sep 1 10:19:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 97680 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 DCD1BA0C4D; Wed, 1 Sep 2021 11:26:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BA494115F; Wed, 1 Sep 2021 11:25:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 17DC941135 for ; Wed, 1 Sep 2021 11:25:51 +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 1819LYmj016704 for ; Wed, 1 Sep 2021 02:25:51 -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=ftym7O3BVcohPx3Lo5pIKpluQ4pMQjpkI/vsuDL+caE=; b=iwyeO8pA06UBza1P6fHZNgx9rSQfo4Pzsj80dnkDHat3y4oz9Vk5pq/J9Il4bmo3r7QP RL5/cuuZ/IT5dyPnjj2Q/YXiyXDsUuBugjgBMG9FHQ9nKDjhUt0KpsDiUe4Gh461v2ht XEqyplmqAID2JDCv4x0+HktEFsYF/lyoN+jTppbqmSOXQD2pQTszEvSAIZB59AuqAh+p HRMIvDFBqTFg8dwkExbgyaXYJ5dh4xjN94PP7DeZ2J20V3krmBOLsdjC5UdRHCrulSlP f04fiCY4AjYKd0eptuKS62U44TBUFBnsF8Nru2sZQeU2gx0sB769Xbup2nEwwZeCtUFI rA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3at0ax9fdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 01 Sep 2021 02:25:50 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 1 Sep 2021 02:25:49 -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; Wed, 1 Sep 2021 02:25:48 -0700 Received: from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 3216E3F7088; Wed, 1 Sep 2021 02:25:45 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal CC: Tejasree Kondoj , Anoob Joseph , Ankur Dwivedi , Archana Muniganti , Srujana Challa , "Nithin Dabilpuram" , Jerin Jacob , Date: Wed, 1 Sep 2021 15:49:29 +0530 Message-ID: <20210901101930.29333-8-ktejasree@marvell.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210901101930.29333-1-ktejasree@marvell.com> References: <20210901101930.29333-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: q4tECvJWAiwNpRtAK9gnp2hoRH0LX1Dm X-Proofpoint-ORIG-GUID: q4tECvJWAiwNpRtAK9gnp2hoRH0LX1Dm 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-01_03,2021-08-31_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 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 0a024dda8f..70dd1c52f7 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -59,6 +59,7 @@ New Features * Added aes-cbc sha1-hmac in lookaside protocol (IPsec). * Added transport mode in lookaside protocol (IPsec). + * Added UDP encapsulation in lookaside protocol (IPsec). Removed Items 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 *