From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B022A0C45; Tue, 21 Sep 2021 18:08:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC3F940151; Tue, 21 Sep 2021 18:08:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 646E14003C for ; Tue, 21 Sep 2021 18:08:24 +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 18L99Jg3005235; Tue, 21 Sep 2021 09:08:23 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by mx0a-0016f401.pphosted.com with ESMTP id 3b7cgt9fcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Sep 2021 09:08:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqQSvzuIHLlm6fIWUjjIef1nsw3QZGnhEuYhVTdska0v16uGnlzxUvNA7PbvbbeiVVqCL4l7dHgPiknlGqUE4vld+6QxNVPBaEMfyHm3c1kDwXQwZ6iAcdnSgos/+15Hxun++YAP1QFHxTJX/pkspPWAlbDPkl91j4K5nTV+1wEiYU0pdOwnGUcIGv3Bj/XJc712d/+qI50F358yOcWDKE8/WvjXBgQz36hgiyEzFXzaCq7/9BqguD7Gk0a5wZdszrlFJk32pSbTUd8KRptXOwg43Um+PCmw2i688UdS12KumbxbudQX/HD+ZNq1QGbPruMVGh8nnKywhG1Oz5L4cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=f7dO4J2xDnOWQJsI6ZPZ/TXCVsJq9LrWDp8VuF8Yfvs=; b=YOPa4akdUBjRoRKmeMkicMbzeBqsazRsLTjJX3Z0QK3CY4XemYvfzYOMKKezccme8dei3oz/3eupGYpUj7X1wu+SuJcmIeCJxLOGyWnEV3exhnalpce6/1QouGZcOrGDMurEP1/uJMUjLXB3ua9Fj6P2C9kU717xByH9B0U2hP+WB98zLM+OAUHKRXJrSam37Hq/wpsptZISezhOHQeXKYDEkcW3Hqy5+TEF7++rcDMnbpbrjQXkfGFZSptRNElATZTgp7Wid5EpgBCSbbjspHD9y+xt+42ARdJH82xJpe/0P4rmzRFeBmz9n/T7Spgx9Yv7l7q14IRTfqi7Xf2DVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f7dO4J2xDnOWQJsI6ZPZ/TXCVsJq9LrWDp8VuF8Yfvs=; b=RHhSrOb6Vy0Jgt3vHEg2N8mKyxtO5ObfkB7LrSnAxIYVSeH2aMyIorpXqUk+GNug9SB1Gq7/5rgMBovOYY7JN4UMx8DfknEkJir/hsgoA+zyFo+R2bwx9mcDpzwPo8spv5KwPUh9L1Etnb/7pnW3FpU02sKlEUK607hGC3JfJ7I= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4763.namprd18.prod.outlook.com (2603:10b6:303:ea::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Tue, 21 Sep 2021 16:08:18 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f068:d9c5:99fe:31cf]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f068:d9c5:99fe:31cf%8]) with mapi id 15.20.4544.013; Tue, 21 Sep 2021 16:08:18 +0000 From: Akhil Goyal To: Anoob Joseph , Declan Doherty , Fan Zhang , Konstantin Ananyev , Ciara Power CC: Anoob Joseph , Jerin Jacob Kollanukkaran , Archana Muniganti , Tejasree Kondoj , Hemant Agrawal , Radu Nicolau , Gagandeep Singh , "dev@dpdk.org" Thread-Topic: [PATCH v4 1/5] test/crypto: add lookaside IPsec tests Thread-Index: AQHXq8YlpNGiR1Uw00mCD1j5NDywoKuuj6Rg Date: Tue, 21 Sep 2021 16:08:17 +0000 Message-ID: References: <1630644420-1256-1-git-send-email-anoobj@marvell.com> <1631884523-836-1-git-send-email-anoobj@marvell.com> <1631884523-836-2-git-send-email-anoobj@marvell.com> In-Reply-To: <1631884523-836-2-git-send-email-anoobj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f2029912-5b72-4612-bcde-08d97d1a066e x-ms-traffictypediagnostic: CO1PR18MB4763: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: f6174+V7NxBcCLqeEl+eTi4d3QrzIgcQ8VH/Z1xJSYTJbXTxidOoMgfk7j94RHGb2W56alHcrKs0MiaAwVRVUiIhVhZy8//Z3NGEZO7WS2lqKlnxC9SWgkPG9N0VcrbryZjACro7yIvU9jiAK7YXhCycPfBziWFjHRr9jU78z4RYg1567BCp7JbBl4h3O+WXY1RTVZqQh69hR36G9EDVKE0vxDwmlCY3NiAZdzw74fKvL9lrDvPf4HI6Me6aG0pBTHsMDqkrLwekxpl6fyLF8ZVRv9fxOvDXbA0IkW7QKfm4QqaxpNj7KJdYYAUfnk1kFN6zWGOWi22ATiQS7UNC708KWk2/8n0CtgNKLQjtqACixNRDckgimDhhn+/AIRz1TGiTHrZpr4EC/PafdIPTbGoAqm/Xh8gml3eH9x630Bu9NcdhpsRU6Lu53wBor4pj+9b/A6ntYbMBhj2p2Sci1W0Vro7r8m3Gcd8MF1sZNVruDcTZEnP1J/gEtOG2ho3Y+w5Jr4m7CaCOy8/b7I0hJralIZSPHV8WGOevMsmWZzTqv3dDGeg7zbTVOVZDLeZ09OP3gxY8MlqblD8hCkewIPbeRAtXA3rsSYPbxVmJJc39K2nNYoxyBOEKzBtYIJeNMn9holUX0thNrh+O3KdeTP9qrTem/e7PHvVwVzx45gFrlahRm+vmaSp79bHfVaIsfnp4tmllNZtNGorrm4gzFQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(38070700005)(71200400001)(66946007)(316002)(5660300002)(66476007)(54906003)(55236004)(186003)(110136005)(4326008)(66446008)(86362001)(66556008)(76116006)(6506007)(33656002)(64756008)(508600001)(7696005)(9686003)(26005)(2906002)(83380400001)(55016002)(8676002)(8936002)(122000001)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?I/As/EM38cO7PNkoEx9wDvtMZXVsZTPV8dzmhY22vfw70OOxyVXeH4mcqyPo?= =?us-ascii?Q?9jZj41eqvPk0TjrGDzgH+wW3dAryUi75zA62Wt0/8e43JGjsXiZDIljmjsSv?= =?us-ascii?Q?TVqNL5Md5+mFiInEwQtQ7xk+5ojcSWILKH5WdNeFYrsWezlwCjRYREk2E2Y6?= =?us-ascii?Q?WlxDRlFtdTnOWmh1YfjgKDoeg6UG/o8rbDq1fmdyh75wBjeqz+/lTqxa2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vennr3vrJmbWO8AWSlR3+Slo6a?= =?us-ascii?Q?kwQnylyzr0dNIRx023dzsKSLs73f2DEQ+E8V7+CXcK3YScrDfxbUWSMqJRNL?= =?us-ascii?Q?khJzWQain95DBDmlLaz6RvSmJNSCQnHY7slnOdPQZR71PJ38jfD0BRoRmHjE?= =?us-ascii?Q?4Yr7QTm30MiMa3YKoHRutyMSipN5xFxaCEVfe9T69S09+M3zEZ8bdWJnge/v?= =?us-ascii?Q?gA3Gh8qc+FbZcGtZ6RpwnPIe?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2029912-5b72-4612-bcde-08d97d1a066e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2021 16:08:17.8137 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QJIE5GoNwxBw/GcqRJBm/EnB176XWukAGZCCFEdUtIWA1o+wTHUEJYBtxnaTL3ktdBMoUH/cDT4ybTo0PtKSQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4763 X-Proofpoint-ORIG-GUID: pagNuF6C5KTxt9FWcp0teJ9JvL0XXtRi X-Proofpoint-GUID: pagNuF6C5KTxt9FWcp0teJ9JvL0XXtRi 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-21_04,2021-09-20_01,2020-04-07_01 Subject: Re: [dpdk-dev] [PATCH v4 1/5] test/crypto: 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" Hi Anoob, Few minor comments, Please see inline. Apart from that, Acked-by: Akhil Goyal >=20 Update title as=20 Test/crypto: add lookaside IPsec cases. > +static int > +security_proto_supported(enum rte_security_session_action_type action, > + enum rte_security_session_protocol proto); > + > +static int > +dev_configure_and_start(uint64_t ff_disable); > + Do we really need to forward declare? > static struct rte_mbuf * > setup_test_string(struct rte_mempool *mpool, > const char *string, size_t len, uint8_t blocksize) > @@ -753,6 +763,43 @@ crypto_gen_testsuite_setup(void) >=20 > #ifdef RTE_LIB_SECURITY > static int > +ipsec_proto_testsuite_setup(void) > +{ > + struct crypto_testsuite_params *ts_params =3D &testsuite_params; > + struct crypto_unittest_params *ut_params =3D &unittest_params; > + struct rte_cryptodev_info dev_info; > + int ret =3D 0; > + > + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); > + > + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SECURITY)) { > + RTE_LOG(INFO, USER1, "Feature flag requirements for IPsec > Proto " > + "testsuite not met\n"); > + return TEST_SKIPPED; > + } > + > + /* Reconfigure to enable security */ Update comment like=20 /*Reconfigure to enable security and disable crypto */ BTW, shouldn't this be dev_configure_and_start(0) Why is sym and asym disabled here? > + dev_configure_and_start(RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO > | > + RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO); Return value not taken care here. > + > + /* Set action type */ > + ut_params->type =3D > RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL; > + > + if (security_proto_supported( > + > RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, > + RTE_SECURITY_PROTOCOL_IPSEC) < 0) { > + RTE_LOG(INFO, USER1, "Capability requirements for IPsec > Proto " > + "test not met\n"); > + ret =3D TEST_SKIPPED; > + } > + > + /* Stop the device */ > + rte_cryptodev_stop(ts_params->valid_devs[0]); Add a comment that the device will be started again in ut_setup_security() > + > + ret =3D test_ipsec_post_process(ut_params->ibuf, &td[i], > + res_d_tmp, silent); > + if (ret !=3D TEST_SUCCESS) > + goto crypto_op_free; > + > + rte_crypto_op_free(ut_params->op); > + ut_params->op =3D NULL; > + > + rte_pktmbuf_free(ut_params->ibuf); > + ut_params->ibuf =3D NULL; > + } > + > +crypto_op_free: > + rte_crypto_op_free(ut_params->op); > + ut_params->op =3D NULL; > + > + rte_pktmbuf_free(ut_params->ibuf); > + ut_params->ibuf =3D NULL; > + Above four lines are getting executed again in the success cases.