From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB117A0524; Tue, 30 Jun 2020 19:47:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 644661BEE3; Tue, 30 Jun 2020 19:47:20 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D864A1BED8 for ; Tue, 30 Jun 2020 19:47:18 +0200 (CEST) IronPort-SDR: K1rwFByDVEZu7Enu5xuhRdrHFJwmvcTogl1UPqDqK5YFJ698OcjBLj0GBuBowkAtz5RrCQ9Di0 ZfPD/HkbvEHg== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="231198021" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="231198021" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 10:47:17 -0700 IronPort-SDR: Sgg/OkqBoBQ3sjYzY9V2+ll6e9i139+oitMGF7SrHrITWGTQ5eSqVY1xYAoPpnW3E/mEPdlNQH rV8GyBFFzEYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="321478525" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga007.jf.intel.com with ESMTP; 30 Jun 2020 10:47:17 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 10:47:17 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 30 Jun 2020 10:47:16 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 30 Jun 2020 10:47:16 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 10:47:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FGIVX/VU+vnk3XRuQUJ80Eos0qg76vn8tcyNxNb55PPk5dKGDGhDxSajMSSRSv12tA20QX4E25w3S8x1B5K5DIUdrmOeElm1eiNa9b0L3teV3Z/GH4V+bQxWrekb+hMhkEro7JWJZmdxewHZ52v0l6Ckta9lXlNod7JX92s3232fwdl1mX56TrAI1nPl6cTZZRpBebYY2V+WUtvRTbyTYrn+6SYgiovGUbjLfJFU4gI6u1PmqIoNmcmxLEufM3mLMhRhYQek76T6Whh1tdoHAMyhvDf8Pxt+Wksd1OChNZuyPV0YkUJfs4Vsm7dvHddGm/Gnm8wYedz+VIVVdXT7Nw== 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:X-MS-Exchange-SenderADCheck; bh=nrY8AVXhP71KMBDQxszv0Gwto6TmuaTF0jE+zPctbBc=; b=PZTFlOgYezWSAMq44NFiIRwkL0SfOXLQQLBP2L4eBTYB1FN1ICH1Xi6L4j3wjgiNUTJCxII3sIOa60l81ewLtkjSX1U07EMITRjs80rTLtz2p5q+juMyd2UKBLapDDkNbXLUr0A8Yq+c5Y+IRmERAvJDE/Ug/p/PY+VylIaNd6MJPXX0oTXqwWJ8o9yl/V2TVTmL9DxsqVcB6+srV3FuyZfhwhwvIHyOlMqMj+eCUZEd6wc1xV1Az+93RHXmjvCikFcFylV658p/6rHa+KNkvlMDCxCJtbkVfbq0FmAKNiPI6hMFdXt442LUO4E4Oyqs8rEWWeIXeVn/iEfPbZDxEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrY8AVXhP71KMBDQxszv0Gwto6TmuaTF0jE+zPctbBc=; b=bbZAxrY/pt0uSbYzv8JShhhg9pSrE6isTOGwPPxoN2G3pTtYjZrJwph/04C/CkcVSTAfzaFLyLSWUyHgToY0YEOq5nPeHF74m4C5qCmQvRZ1AhFeK4Ktyv/hgaFVJX4mgTxeGiduL2JIVFlw83BokkWPXGYF2c8eEvOzYtKZYIA= Received: from SN6PR11MB2880.namprd11.prod.outlook.com (2603:10b6:805:58::15) by SN6PR11MB3423.namprd11.prod.outlook.com (2603:10b6:805:db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.25; Tue, 30 Jun 2020 17:47:15 +0000 Received: from SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4]) by SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4%3]) with mapi id 15.20.3131.028; Tue, 30 Jun 2020 17:47:15 +0000 From: "Trahe, Fiona" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" Thread-Topic: [dpdk-dev v2 2/3] test/crypto: add unit-test for QAT direct APIs Thread-Index: AQHWSvUGXz79arQQy0ag9B/HeD0r3KjxXicQ Date: Tue, 30 Jun 2020 17:47:15 +0000 Message-ID: References: <20200612143940.52851-1-roy.fan.zhang@intel.com> <20200625133138.42827-1-roy.fan.zhang@intel.com> <20200625133138.42827-3-roy.fan.zhang@intel.com> In-Reply-To: <20200625133138.42827-3-roy.fan.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e0b7d857-43b8-4312-fa89-08d81d1da03e x-ms-traffictypediagnostic: SN6PR11MB3423: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0450A714CB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4ChpHOKyqeR4ijw4r4fhI21zqQuD4Uxae/hTwuHwT4TUhTTBGBzxR4uGZDd/E2S4PS2MLRgROL8pZ86wmXoCRH34O5Qfc6F6opqd0rUcApBVJbNy6UenMMEeD6TpHcf20KQE24aDCzPbyq/dgg9NjEdlmQ8EBI8Unin6lEqAQxf6XQrpfWGOsSkZHR566rj9CvGG4xdrA71AczlUb29krFwZHivQoIGGTC7l7kYhtGiLryQsMIjDecjRfqHgMkgIpJDhRAzbt5pNpyWolinJM3vhkNilAepVVcj9i5iss006atIDSQXV36iYpkXITDsEXjq8q8JLp6gHDQK4cX/DAg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2880.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(2906002)(316002)(110136005)(54906003)(33656002)(86362001)(83380400001)(4326008)(26005)(478600001)(8936002)(71200400001)(8676002)(5660300002)(7696005)(107886003)(53546011)(66476007)(66446008)(76116006)(9686003)(66556008)(64756008)(52536014)(186003)(66946007)(55016002)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: bPzdFZnizBmUVE5bDBkordye+Jcqm5RF1znl8TJXl1UwTl72uruJOrDL7XBdwPzaxAaiw6ksDtYJRq0hIHp0Oj3x+LIVRdfROb+Z1m7Tbb+oyhXzlUQuWxdvitv1y0l8PlS3wLWUVn7zixUGhWt8k1siWnKVDoHJu7egV48l7fqKXfwdW4r9/+qm7zG+3Zu8DCtycX6M1+1bV80TRKktSqwIBW+0DZ13IzREso//MCJZG+cxvQHiJFsI9p1fqFXXTv4+BdZyHAB4o4smqTYHax8cviD4k6l+f8FnjbLmDUrimnnLhWvI+9ENzmoRaM81LC4GAJZGrpQKpoWrcQSY661Z6tTqvxSMC2RkFN/S3W8Q1YfyimEqYgfzD/Y37xoRsmW3ugVHnYYkTSj4cwuAzBo3o0pk9aRyFWsau6Pjid8YXpswZoEwppoYeRX1iSRlU199uatJ6KJH0m6EQJX/pfXtD/CgCwLJ3FXdXq5quC6O7uKtDiACZK2jmVLvAdFM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2880.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0b7d857-43b8-4312-fa89-08d81d1da03e X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2020 17:47:15.1235 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2zfqtfp54Br37NdUcziQ6UQhs3kpw/Nu+q8+sN6/bq3gGqBnke+zqlNbx/kT+Htve1uQIwrhm6gWF3y4uuTBwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3423 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-dev v2 2/3] test/crypto: add unit-test for QAT direct APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Fan, > -----Original Message----- > From: Zhang, Roy Fan > Sent: Thursday, June 25, 2020 2:32 PM > To: dev@dpdk.org > Cc: Trahe, Fiona ; akhil.goyal@nxp.com; Zhang, Roy= Fan > > Subject: [dpdk-dev v2 2/3] test/crypto: add unit-test for QAT direct APIs >=20 > This patch adds the test to use QAT symmetric crypto direct APIs. > The test will be enabled only when QAT Sym PMD is built. >=20 > @@ -2451,7 +2615,11 @@ test_snow3g_authentication(const struct snow3g_has= h_test_data *tdata) > if (retval < 0) > return retval; >=20 > - ut_params->op =3D process_crypto_request(ts_params->valid_devs[0], > + if (qat_api_test) > + process_qat_api_op(ts_params->valid_devs[0], 0, ut_params->op, > + 0, 1, 1); [Fiona] it would be helpful wherever this is called to either use local par= ams with useful names, enums or comments for last 3 params, e.g.: process_qat_api_op(ts_params->valid_devs[0], 0, ut_params->op, 0, /*is_cipher */ 1, /* is_auth */ 1); /* len_in_bits*/ It would be better to generalise the tests too in light of Jerin's comments= . By passing the xform to process_crypto_request(), you should be able to avo= id all the changes to individual tests, e.g.; in process_crypto_request(dev, op, xform ) if (direct_pmd_datapath) switch (pmd) { qat: process_qat_api_op(); other PMD:/*future*/ default: break; } else rest of process_crypto_op fn Unfortunately the xform is usually not available where process_crypto_reque= st is called, it would have to be returned from the session create function= - but though the 3 params are enough for the moment, it's likely other se= ssion params will be needed for other tests. Or by other PMDs. > +static int > +test_qat_sym_direct_api(void /*argv __rte_unused, int argc __rte_unused*= /) > +{ > + int ret; > + > + gbl_driver_id =3D rte_cryptodev_driver_id_get( > + RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)); > + > + if (gbl_driver_id =3D=3D -1) { > + RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check that both " > + "CONFIG_RTE_LIBRTE_PMD_QAT and CONFIG_RTE_LIBRTE_PMD_QAT_SYM " > + "are enabled in config file to run this testsuite.\n"); > + return TEST_SKIPPED; > + } > + > + qat_api_test =3D 1; [Fiona] I'd suggest renaming this direct_pmd_datapath as above This would be a good place to check that the pmd has the direct_pmd_datapat= h capability. Checks for a finer granularity capability may be needed in process_qat_api_= op()=20 > + ret =3D unit_test_suite_runner(&qat_direct_api_testsuite); > + qat_api_test =3D 0; > + > + return ret; > +} > + [Fiona] It would be good to add tests that validate the frame concept - enq= ueueing and dequeueing only 1 descriptor at a time doesn't cover it.