From patchwork Tue Sep 7 16:32:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 98203 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 8E803A0C46; Tue, 7 Sep 2021 18:33:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53DB8410ED; Tue, 7 Sep 2021 18:33:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id CEDB3410EC for ; Tue, 7 Sep 2021 18:33:41 +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 1879YTuN016040; Tue, 7 Sep 2021 09:33:40 -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=J36qLFNLMtmJEH3B+B0vTlG6HqRVqWlS2vWDBWb1dgU=; b=do2glwQBBMP12zZR3+P2TXnytNREick+l6XrOx7nJmgQSxgzQhL1eggkXPvOfHtGHrSX pXxDBeuJCF/XwSICtsKk9hIr+FFDbfHcmOn2vSJSEz7L+9VoJosY3AEg6699NjbieiG+ +X90PpLY5v5XraZQC17VYDXzTY8TafGfW+ThRsG2D036eNFR7N0yxGkyoJvp4zYido6u i9NLI5kmpqbWQMrwY2eLZ8uS4BHI3Pp012t3LqSF85gACmeLi1CprlRHuEW/AKsO8KrD Qv0jQnJY70XQRh5uJ5HEKUhlD0m0rZ4a46+Cy7c3W8pkG3KmK1XO1kScQ94V+A8bATGD HA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3ax5jjhcm2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Sep 2021 09:33:40 -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; Tue, 7 Sep 2021 09:33:38 -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; Tue, 7 Sep 2021 09:33:38 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id E00103F7087; Tue, 7 Sep 2021 09:33:32 -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: Tue, 7 Sep 2021 22:02:46 +0530 Message-ID: <1631032372-275-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1629207767-262-1-git-send-email-anoobj@marvell.com> References: <1629207767-262-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: eTSaai0q9Fy5PP1LXQAEsuqpc0Ppsg0Y X-Proofpoint-ORIG-GUID: eTSaai0q9Fy5PP1LXQAEsuqpc0Ppsg0Y 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-07_06,2021-09-07_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 0/6] Add SA lifetime in security 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" Add SA lifetime configuration in security. SA lifetime tracking can be offloaded on supported PMDs. SA lifetime would cover soft & hard expiry in units of number of packets and bytes. When SA soft expiry happens, the packet is successfuly processed but with additional expiry notification. Crypto op structure, ``rte_crypto_op`` is updated to cover such notifications with lookaside protocol offloads. SA hard expiration would cause IPsec processing to return an error. PMDs crypto_cn10k, crypto_cn9k and crypto_octeontx2 are updated with their respective lifetime tracking capabilities. Unit tests are added for soft and hard expiry with number of packets. Depends on 1. http://patches.dpdk.org/project/dpdk/list/?series=18642 2. http://patches.dpdk.org/project/dpdk/list/?series=18742 Changes in v2: - Clear soft expiry configuration in ipsec-secgw - Rebased on v3 of dependent series - Updated release notes & deprecation notice Anoob Joseph (6): security: add SA lifetime configuration common/cnxk: support lifetime configuration crypto/octeontx2: add checks for life configuration test/crypto: add packets soft expiry tests test/crypto: add packets hard expiry tests examples/ipsec-secgw: clear soft expiry configuration app/test/test_cryptodev.c | 38 +++++++++++- app/test/test_cryptodev_security_ipsec.c | 40 +++++++++++-- app/test/test_cryptodev_security_ipsec.h | 5 +- .../test_cryptodev_security_ipsec_test_vectors.h | 3 - doc/guides/rel_notes/deprecation.rst | 5 -- doc/guides/rel_notes/release_21_11.rst | 13 ++++ drivers/common/cnxk/cnxk_security.c | 70 ++++++++++++++++++++++ drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 48 +++++++++++---- drivers/crypto/cnxk/cn9k_ipsec.c | 6 +- drivers/crypto/octeontx2/otx2_ipsec_po.h | 6 ++ examples/ipsec-secgw/ipsec.c | 5 +- examples/ipsec-secgw/ipsec.h | 2 - lib/cryptodev/rte_crypto.h | 18 +++++- lib/security/rte_security.h | 28 ++++++++- 14 files changed, 253 insertions(+), 34 deletions(-)