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 D0C9DA0C43; Thu, 23 Sep 2021 06:48:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5949F410D7; Thu, 23 Sep 2021 06:48:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4CE3A40E64 for ; Thu, 23 Sep 2021 06:48:18 +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 18MJigUo016922; Wed, 22 Sep 2021 21:48:16 -0700 Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2170.outbound.protection.outlook.com [104.47.73.170]) by mx0a-0016f401.pphosted.com with ESMTP id 3b8awj1ht6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Sep 2021 21:48:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E20tTIhmOBmzPBscD/u6f3B79/FOhbD2/GJRsN3BlhlaIxMXKe7TyUJw0U60tutflZ6kcxc41JfjikyjPJouu2dI/5RHIv/1SNbJE5KfcBrnIqDufjdeF1kJL4hxlCwcnsr3ClthYrVz0CHhKSLtGsGbnCjt33Kocc8rWFZXT559EOsbqf8sZ58cMyYUtgTDzKwDFTEaliqpKAKOG/kwPkd62hnNCWo0OOD0msg7ttGWwPnp3gqIK/3L9r/YAkNUcR6C5eUoRL16Bs+CVKXYupvQL4k098v/0L5OlDRjDxN+mD6AN+LxwPIz+YGUTOP0GJxI00qdPNFfuyV01Z8oTg== 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=NSKtGZAs0VxIANmpgB70gTz7D6N5OlzFMXDW9LkYQxk=; b=UC8kEZFZGUtM6TXtGZc/iFy+S5UEZToXFjdZ2VFJZj/+kYneHeaxS1cxy1oAuQIj2dd+I0b7UxESA+IJHZv/LsAUqi5toDsxyNly7UhsrFRxSqeMYqyeiNisCGFcZQkeM2EOpAJpmA4SrHpLzS12SAf08SgF1lDeKFLsLTpxq26Sq+xd3zfIeYC3Ix4WoQlXYOdzH83PI1jvX/GdiBfXMELdE9Nhscuk69WdU5QX6hCGsJtpEfIFw7z0paQ/Vlj6KFdjvr1a0lD7o+zQyeU7QvwT5P2FUy0T1N4MCRsnmjJgEAJMOu7yfTFJFCFVZsA6q8tT2OVZ7bhCSWN/aoFKCQ== 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=NSKtGZAs0VxIANmpgB70gTz7D6N5OlzFMXDW9LkYQxk=; b=i4GMOKTsZaH5i1P9dv497mO1wKCsXTZPIlzCbgMiTXaHLGK4thiGVeKcJEF2ROjrFyVkcwsyEeD6S9kRB8WzTT1u66bY1kw9igdDu+bIoyNlhv6zSlW11WzChrd0Ae3BaWXl0F8MsgScEKxxiP+FcxRX2ox8hnnO2/wU3RCTqeE= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by PH0PR18MB4766.namprd18.prod.outlook.com (2603:10b6:510:ce::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Thu, 23 Sep 2021 04:48:10 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984%4]) with mapi id 15.20.4544.014; Thu, 23 Sep 2021 04:48:09 +0000 From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Fan Zhang , Konstantin Ananyev , Ciara Power CC: 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: AQHXq8YlPuTK/Vsp1UCSiVhU2yefFauurjqAgAJihdA= Date: Thu, 23 Sep 2021 04:48:09 +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: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6a65d4c6-fe79-4565-19ac-08d97e4d57c7 x-ms-traffictypediagnostic: PH0PR18MB4766: 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: vNzbQA4Ym0tfU9AVLNd/uVxSfqKlWb+bY/dOKB5B0mUY5XPZHO68vtIqmavC8CRxtJ/VfFqjCSG9XCWf1BUDZ1h+WoruUlZBUnVQa3EoGwtwrucSiO3zNt/+bnVm4x2+oRUKXHH5ss1jsiTnPu0XujrrMyAmcg94HnGBzDqAKPxCmRTB4QgPqCW6zKqACJ9DUGnJsbqTSDdD02OSoQrQKQ4yg9T3q+vmcCVxtBdLfNxDlAb+uk1R8/J2yzjqJj0Z4nPhn/aCbSkwWtRsX6Re66fTJ0/rB8fVbMfBnvqn/9fIQTG3ApKTj2T1Ag4HCktZg3nGQ0JeUd7HbW5PZuJEg0OKEpS8RL3lF+YY2Yis9DlvrU3YyN6Xtjqme/DxbdSUZH8qgo4Qq9csQV2QZEk8y3m2y/DzCdgl2VF5fFbIAlVPLUL69fvPHxD5JYg+8bNuuPvwV265jYyC8Cf5Kx9CBta5DyqsA7oU9MIk9kkFI7PXb3b3EmiBnQ7qzlhIBxNyKSo6sC//jZ5HP8gGmLcGPOF4e92hinmTMNSS+nEFiY+AOGG7gzKFTZVn2KtCtNvZWknAcJDL2fliKbbfN3tAb2P0dgp7dwG93TjaWdLgQuXKtk6Sp7nicg4/lKyo9eLSt44eafHhiTudZAq+9sjGsUb7mOywTlB1d9Ui7kfDTunZCN1OoXWbgRUdZd8Kp/EGU0xRGisjtHRsh3OpNKr9KA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(26005)(8676002)(52536014)(66946007)(7696005)(122000001)(2906002)(71200400001)(8936002)(9686003)(53546011)(6506007)(38070700005)(83380400001)(4326008)(76116006)(186003)(33656002)(38100700002)(66476007)(66556008)(55016002)(316002)(54906003)(110136005)(64756008)(66446008)(5660300002)(508600001)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/hNmKi0gyu2EJ6ZqWHBszcDPl3NvN3NHWxLcsxL2rWjrsvcqnGBzOc6cBbum?= =?us-ascii?Q?/v6Pi7Bdw0SYLbOkJ3/8UBGlI+kJ8gi9vC4zFXt/zgdNJ/eO0sr9ZDtiqtIy?= =?us-ascii?Q?JyTpq+gIvBH8NHdgFafnEEcdaEAUaQ3LppfIAMFmnRQ23dg2QPez7P7X0uwp?= =?us-ascii?Q?uaO9XKqJKZodZk/ebQFhFQV+2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ii?Q?FuRG2oPphW5QsrcmV5R00TjksuWFgjymMvuv2McdRNFPMwULuvKQDJP4TvJr?= =?us-ascii?Q?t1m9SByQ8UdukXvkcHrCKZHRWN7Cb4gZFknUdsVRQjEtCTOblzZ9IIieOrkp?= =?us-ascii?Q?JoQH0WGRyD2tdCJJ9FxD4gTnWAWymN/4BZdw++B+rncOJVQdPSiTqRneu1kC?= =?us-ascii?Q?S+lPkwI4inUi41d7oZs7VSNB+N+WEeGJT+Q91h0MCHyZHHvnh0GLRY14TDtW?= =?us-ascii?Q?tTHAfhydkXcaYGHEBfxCb34C?= 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: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a65d4c6-fe79-4565-19ac-08d97e4d57c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2021 04:48:09.8927 (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: Bk4hhJt7ARuLEabNUBJcUT/nM2q4YnbrWdyToYn8aaGj9cSDkSR3BxJKVBAN5xUR8FuT5m8AcDEQJ91MQlqtKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4766 X-Proofpoint-GUID: GUS2gPcQ6zS3QGUqPC91uxMCdZDxFIfD X-Proofpoint-ORIG-GUID: GUS2gPcQ6zS3QGUqPC91uxMCdZDxFIfD 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-23_01,2021-09-22_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 Akhil, Thanks for the review. Please see inline. Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, September 21, 2021 9:38 PM > 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 > Subject: RE: [PATCH v4 1/5] test/crypto: add lookaside IPsec tests >=20 > Hi Anoob, > Few minor comments, Please see inline. > Apart from that, > Acked-by: Akhil Goyal > > > Update title as > Test/crypto: add lookaside IPsec cases. [Anoob] Will update so in v5 =20 >=20 > > +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); > > + >=20 > Do we really need to forward declare? [Anoob] I've kept 'ipsec_proto_testsuite_setup' close to other rte_security= test suite setups. The function, dev_configure_and_start() is defined late= r but I need to use it to enable SECURITY before doing capability check. On= ly other option is to move around code. =20 >=20 > > 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) > > > > #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 */ >=20 > Update comment like > /*Reconfigure to enable security and disable crypto */ BTW, shouldn't thi= s be > dev_configure_and_start(0) Why is sym and asym disabled here? [Anoob] Will update the comments in v5. Sym & asym are not required for sec= urity tests. But then, I can keep ff_disable as 0. It won't affect anything= . =20 >=20 > > + > dev_configure_and_start(RTE_CRYPTODEV_FF_SYMMETRIC_CRYPT > O > > | > > + > RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO); >=20 > Return value not taken care here. [Anoob] Will fix in v5. =20 >=20 >=20 > > + > > + /* 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]); >=20 > Add a comment that the device will be started again in ut_setup_security(= ) [Anoob] Will update so in v5. =20 >=20 > > + > > + 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; > > + >=20 > Above four lines are getting executed again in the success cases. [Anoob] rte_crypto_op_free() has a NULL check. So executing this for succes= s cases is alright. I believe UT already does it this way for certain cases= . If you check PDCP test cases, it has a free in the test case and there wo= uld be one free in ut_teardown() also.