From patchwork Thu Jul 29 10:43:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 96392 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 594AEA0C40; Thu, 29 Jul 2021 12:43:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23FF840687; Thu, 29 Jul 2021 12:43:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EC00F40041 for ; Thu, 29 Jul 2021 12:43:36 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16TAeNvB002368; Thu, 29 Jul 2021 03:43:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=ls4hgR+34YP+eiO43U6HDYHynS27SVHiYqsUPHBKjp4=; b=GzgNmEqal9+eD+UJuj8I5VvBfc4W+Bm92ExPQKpBUdXGkdgtzJlRIKHncHc9ANlvicH5 gKexUgu6xH0wY6wWQf3gKA/QuCVDG2JbM5GsMGMJFYfZ/CMmIszHMXQJut0EZs3fhQq/ JlEBaTMfDczDJD4/halbsB3l/c5WefAqAdbh/lXvt269+F3rjCWZPDtOkzKUQzgpXq4+ EBXiABJzup++/k5yC8HefA/fCHVbavH7i2MRNCDxBOK+kKK/amWASZMBgzd8xklQ3vTr ojZZUgNJOopEvRD/tO5lmyZkoEtUxvi0bceI5X+qkCjEeB+0X1cMNp9ZSdEr/VHcj2JH MQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a35pr4ape-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 29 Jul 2021 03:43:36 -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; Thu, 29 Jul 2021 03:43:34 -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; Thu, 29 Jul 2021 03:43:34 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 896643F7061; Thu, 29 Jul 2021 03:43:30 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Fan Zhang , "Konstantin Ananyev" CC: Anoob Joseph , Jerin Jacob , "Ankur Dwivedi" , Tejasree Kondoj , Date: Thu, 29 Jul 2021 16:13:19 +0530 Message-ID: <1627555402-4789-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: EhtiT_eJ1F7zzBGCFHtgkpPfRWWCZ-cO X-Proofpoint-GUID: EhtiT_eJ1F7zzBGCFHtgkpPfRWWCZ-cO X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-29_09:2021-07-29, 2021-07-29 signatures=0 Subject: [dpdk-dev] [PATCH 21.11 0/3] 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 vector tests for outbound operations would use predefined IV and sequence number as 1. So plain packet would get encrypted to generate the IPsec packet. Tests would compare against known vector. 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 hardware. 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. Two test cases use combined mode, 1. Display algo coverage and basic in + out tests 2. Negative test for ICV corruption Known vectors are 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 This series is targetted for DPDK 21.11. Upcoming additions, 1. AES-CBC-SHA1-HMAC known vectors & combined mode 2. IPv6 3. UDP encapsulation 4. Transport 5. Mixed mode (IPv4-in-IPv6 etc, all combinations) Tested with following PMDs 1. crypto_octeontx2 2. crypto_cn10k Anoob Joseph (2): test/crypto: add lookaside IPsec tests test/crypto: add combined mode tests Tejasree Kondoj (1): test/crypto: add lookaside IPsec ICV corrupt test case app/test/meson.build | 1 + app/test/test.h | 6 + app/test/test_cryptodev.c | 330 +++++++++++++++++++++ app/test/test_cryptodev_security_ipsec.c | 311 +++++++++++++++++++ app/test/test_cryptodev_security_ipsec.h | 115 +++++++ .../test_cryptodev_security_ipsec_test_vectors.h | 321 ++++++++++++++++++++ 6 files changed, 1084 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