From patchwork Sat Sep 25 15:35:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 99654 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 969F2A0C47; Sat, 25 Sep 2021 17:36:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1316F4003D; Sat, 25 Sep 2021 17:36:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 914804003C for ; Sat, 25 Sep 2021 17:36:06 +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 18PFLucq022192; Sat, 25 Sep 2021 08:36:05 -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=lQCK8yQugdhXFcUTo01xmD5xUVyRLDIYpDUIcg5QXME=; b=bwQozivEFGQp2iCqJpKMedT+fg3d5uAWERK0RGW08SxEnyw8iTh3wgUDOx/ARyVjWLc6 klt4pV+NnXHVyCVarcKVnmofGuErMsyuZbbQhhZlk7cChRZ9ywrUCOlewIZE79am7eKr H9JCpO324e6VGjpytfxQCpaJXWl3DjIR7jSfhaOaP08zV7bHIwpzWasLO2HTMoM/MYmA hekX1tEgA7SIZwJx59wsIkasGD/jh6S+uULay7DCN+nyfjJHQgh0JNqD2Lh8ZfhE0PKM 1B+LTbaubwUdLj/UrKC4ybtaoxacWycrrqy7Sgpa2B2NoUFkwnzD0ETe+by3NpfrFDyu IA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3ba14prp3q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 25 Sep 2021 08:36:05 -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; Sat, 25 Sep 2021 08:36:04 -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; Sat, 25 Sep 2021 08:36:04 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 3FFB43F7073; Sat, 25 Sep 2021 08:36:00 -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: Sat, 25 Sep 2021 21:05:27 +0530 Message-ID: <1632584132-289-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631884523-836-1-git-send-email-anoobj@marvell.com> References: <1631884523-836-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 1N1dVHhOit9TDgH8WLH5SICJhIb9DU8V X-Proofpoint-ORIG-GUID: 1N1dVHhOit9TDgH8WLH5SICJhIb9DU8V 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-25_05,2021-09-24_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v5 0/5] Add lookaside IPsec tests 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 lookaside IPsec functional tests. Known vector tests and combined mode framework is added. Known vectors are outbound vectors based on https://datatracker.ietf.org/doc/html/draft-mcgrew-gcm-test-01 The vectors are updated to have sequence number as 1 & L4 checksum computed correctly. And they have following properties, 1. ESP 2. Tunnel mode 3. IPv4 4. IPv4 tunnel Known vector tests for inbound operation would generate test vectors by reversing outbound known vectors. The input_text would become encrypted packet and output_text would be the plain packet. Tests would then validate the operation by comparing against plain packet. Combined mode tests are used to test all IPsec features against all ciphers supported by the PMD. The framework is introduced to avoid testing with any specific algo, thereby making it mandatory to be supported. Also, testing with all supported combinations will help with increasing coverage as well. Four test cases use combined mode, 1. Display algo coverage and basic in + out tests 2. Negative test for ICV corruption 3. IV generation 4. UDP encapsulation IV generation test case compares IV generated for a batch of packets and returns failure if IV is repeated. Upcoming additions, 1. AES-CBC-SHA1-HMAC known vectors & combined mode 2. IPv6 3. Transport 4. Mixed mode (IPv4-in-IPv6 etc, all combinations) Tested with following PMDs 1. crypto_octeontx2 2. crypto_cn10k 3. crypto_cn9k Changes in v5: - Fixed lack of return check with dev_configure_and_start() (comment from Akhil) - Adjusted patch title and description (comment from Akhil) Changes in v4: - Fixed lack of device stop in case capability check fails (comment from Ciara) - Rebased and updated release notes Changes in v3 - Added UDP encapsulation tests Changes in v2 - Dropped outbound known vector tests as lookaside protocol would require IV generated by PMD. The tests would be introduced with spec change to allow user to specify IV. - Added IV generation tests - Minor fixes in combined mode tests to handle multiple packets Anoob Joseph (2): test/crypto: add lookaside IPsec cases test/crypto: add combined mode IPsec cases Tejasree Kondoj (3): test/crypto: add lookaside IPsec ICV corrupt test case test/crypto: add IV gen cases for IPsec test/crypto: add UDP encapsulated IPsec test cases app/test/meson.build | 1 + app/test/test.h | 6 + app/test/test_cryptodev.c | 355 ++++++++++++++++++ app/test/test_cryptodev_security_ipsec.c | 401 +++++++++++++++++++++ app/test/test_cryptodev_security_ipsec.h | 119 ++++++ .../test_cryptodev_security_ipsec_test_vectors.h | 321 +++++++++++++++++ doc/guides/rel_notes/release_21_11.rst | 7 + 7 files changed, 1210 insertions(+) create mode 100644 app/test/test_cryptodev_security_ipsec.c create mode 100644 app/test/test_cryptodev_security_ipsec.h create mode 100644 app/test/test_cryptodev_security_ipsec_test_vectors.h