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 080F5A0C43; Wed, 20 Oct 2021 13:32:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB86740687; Wed, 20 Oct 2021 13:32:01 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 506B840142 for ; Wed, 20 Oct 2021 13:32:00 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="252243889" X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="252243889" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 04:31:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="444331740" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga006.jf.intel.com with ESMTP; 20 Oct 2021 04:31:58 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 20 Oct 2021 04:31:58 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 20 Oct 2021 04:31:58 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 20 Oct 2021 04:31:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nVzxoGbgpvOh58VWTenbm5lSp/tTtI6frhWW1Qg9qGGLFDFTxik8F4lAbTYAbUdJpE09Kbif713u+5Zjue+TEdNaC5jwwqwwwePMh7SHyXvr0a0NxY05nKO4accZicOhPA9AH4k4uTsomQ2S7tPTXJ3RwWwdztXumFdRBJistdUnDtKc/hjndTeOWKZqb1MeoKAz/eIFfnC9IJMDxbnfhHdpN/M3eAbiSWhTWDB4L3ViWDceflxX593H16CggmDP8XjSy2oUhhzPm0sMX3QzI801Pr27RhsZApbpYUONUhGFzgw+FVxt6iCO9ngFVMj1cUDPw+d2C3O24gt4o5zunQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lZrVM/R/C3W/HW8hBtt+LcsTFe/3WdWVWrr7kUMnbQM=; b=j+AqASUal6IWSoogA169JL0e4IuWYw73rVKywknUFkwJF1Wru6Cwj5VnEpR0PJwKDmtgqKs3yhGnkL50JhWn/LElvN/qOmSFkYDDPd9E1+MtXPVVbOsiVyab3g07X0hEyb/p0SGFOMrxNiE7Dz2Q2vZbWAIcMCFQwOisT2nuSkD/Onj+Bbt+yUPc0ZWugGnI0tql7lJe6qrLDbulHxw2oO0Nye7P3GWa50ViVo+t9/A5geNlVrEQKwN/jpifMeVpVwD53SV8OyjF3H64FfnWDGcFedIIFuk0+ybA6fhLq4IdgX8gbC10dMmxecmJHHOitQ3FmiDHSBuJBr8Efk8L4w== 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=lZrVM/R/C3W/HW8hBtt+LcsTFe/3WdWVWrr7kUMnbQM=; b=nsTchmtitFlsxjXz3H8cGNQzWyta6XsWZBmfKNM9SgDgFrMfjjGMjTyTW8XAf4claIsEZoZyPvNEwxGXphqwhpI9Nj8/4xchNyqxwychW6Qp134Fg6phLRBQAfhJ2pHiuWywBpxj97A4mffpsiineUCnPZlqV8egDsYZHac0A00= Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MWHPR11MB1711.namprd11.prod.outlook.com (2603:10b6:300:27::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Wed, 20 Oct 2021 11:31:55 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::2c31:1470:3036:959b%8]) with mapi id 15.20.4608.018; Wed, 20 Oct 2021 11:31:55 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , "anoobj@marvell.com" , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "g.singh@nxp.com" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "Ananyev, Konstantin" , "Nicolau, Radu" , "ajit.khaparde@broadcom.com" , "rnagadheeraj@marvell.com" , "adwivedi@marvell.com" , "Power, Ciara" Thread-Topic: [PATCH v4 4/8] crypto/scheduler: use proper API for device start/stop Thread-Index: AQHXxaWs44KHCpylYk6Uhl+ZMn3HSKvbwMNA Date: Wed, 20 Oct 2021 11:31:55 +0000 Message-ID: References: <20211018144201.2028022-1-gakhil@marvell.com> <20211020112754.1270163-1-gakhil@marvell.com> <20211020112754.1270163-5-gakhil@marvell.com> In-Reply-To: <20211020112754.1270163-5-gakhil@marvell.com> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4fdfebbd-61f5-4dd7-5156-08d993bd38b4 x-ms-traffictypediagnostic: MWHPR11MB1711: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1002; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lQSbA+pzCKHDXDEti+YxB8EuImvhjoCh/JobtzkoLCUj2zIKE3HwfXgXQmZw+/iWG2lwqk0/jyW0gXHDNJzlvBL+6dvUCjbSDZ15tGuN3Olmmj9sCYXRIrliFPuix+45nrpONDKgXy2holM51fwuhV6k0ULcRf5l3bXO6lq2mX5qWYqabcevdnkWEpjqXNJJmmG/VIWxcGpUULQFLCB4kGI8KS3B5MMMfUxG0Tc1eYqsD4h1rfqXSTxix3fJfvDdll4C+VVp47Uf5FwT8oVYdAaJYXh+upHgd88l9cOILANFoiGadfdwICPlcaMXPE1eZwmtmpoNv0/TPYEj59Thk99w4GUVIb3Dlf1SZUb9aDtABkFOqmx9ugyOy/PSYZ3ZOmFQtM/PilXT4+NbWw80iZ7oxVeCDQfbb5S/Td6GY/jcuJoyovetSxDJin6nJO9t2HR1Fqf+IaqxpuqBPBtMqDOzOmL4Yoob4AbhVFWy1u0viYp7yoyWNlOyjjIwDnl4sCJ3bAkkm2tMh8ykIR8vzGaAiw/rgKjXvHTOb+W9QPlABC5Jey5pPm67lbxvIl4funQ/WL5CUAc6uGidMDCUd4ZhKeTNzfHhw0KJo7lfD2l5+APhFqHuZC9aomsdGm1tmbrfhT+/f2KHYc0WldOSDzH1w7FSetwCU1XprTy/Neoc7I9im2UCIgqFBGWLNOUpreWezsWRS12jmmKDGALFLQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(107886003)(53546011)(7696005)(508600001)(6506007)(110136005)(8936002)(64756008)(66446008)(66556008)(76116006)(86362001)(2906002)(66946007)(66476007)(26005)(316002)(52536014)(55016002)(5660300002)(83380400001)(8676002)(9686003)(33656002)(38070700005)(122000001)(4326008)(186003)(54906003)(38100700002)(71200400001)(82960400001)(7416002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?ulqJEQ6VGd8cA5Km/+irspAl5sGm4NXj5kAXAL1qIkfd9SFZG0nRR8GM?= =?Windows-1252?Q?9g7M2Ay8iQOJz3TG5LAy902C9m+3usjET3e7R3wkqDv4JOdW/YecDAbP?= =?Windows-1252?Q?csbs3pmYPiqLQY/1j8BY3spm8VBRfcWrStrD/pZzhwk4/+fxazGbS085?= =?Windows-1252?Q?Wp7WUoFLmLnl459v7UAgUfMwlM0cFC50Zk3C2vbL9t4ODavO+JiSoY+1?= =?Windows-1252?Q?9Y8PP7im9N+HZxXVpGeAk4x6slDlxK2cBTg5QKkZMbiSOB5Z66VhJ4kv?= =?Windows-1252?Q?Ooc0hjkW77Y+YhUhs3aHQkGyrs01TkK45iDvSO7d1/2bHK7F6aisYiUy?= =?Windows-1252?Q?iM05aWD8kMGZ3OdaNULGplOEEBZzu/BRcYWo3LjiCiK530Q/I3ykeRl5?= =?Windows-1252?Q?JQYTTyMhzm41yHYAsgKKGe0fJYuy0JkhXy/cByhA7GWC/axUUBNhj7Bt?= =?Windows-1252?Q?kzM2WqO0LhuCuEm2j7YBzRdkdDSFjiUjxQBoQh7e0XSSsP6XMhBaymJA?= =?Windows-1252?Q?TuDTGuFJXZwk3P65O4/jMe0ptUAg3fa+55ImLLqVALngDQzBjjph2epo?= =?Windows-1252?Q?/rcsWB1tAmcOzv6NzVtM2Zqiv3N3tmpuddFMmlsYBiDUPumdj+X5OIED?= =?Windows-1252?Q?c4dPCzYWm8h5Rz7rmEIjnnGvbScHdtDKDM00wZ1VyIb6DIf/i2j36zvH?= =?Windows-1252?Q?gx9vrt+dxrZkXCVpGXa5jxQHuolhw+UIfiOWoWrk9lPa4C7qt0HYP72p?= =?Windows-1252?Q?Qt3nb2PTSC1wKkjAM2ddt5zahG2zzyc9PRPR20lDQukguAxDiM3Ne+ji?= =?Windows-1252?Q?sewnmVYuLIAKB+n2ArNp/oPUzMTKAXO9D+5DzUoXxryI/ZBOcr3FRLZA?= =?Windows-1252?Q?rVSZYMLgpEoNU5pInigeXHz8VwRecnpel5KRJA7ShHioKQDj4PDxbli4?= =?Windows-1252?Q?V1iA7ZN1hfjIXZngVfF0X9IOG+QJa/vfWKuLFZlvrBxszCG5MFEuaHTt?= =?Windows-1252?Q?vbcqooGIX8B3SlBC8VE2677SFXJ4JiijW1KXzcbYTVyjbBKvYTmW25mr?= =?Windows-1252?Q?H3BpomOSSGVVATY9AdAQrvz7pMaUGRbEbrvuHYNtZ2S1Kxr5G01HwqJX?= =?Windows-1252?Q?abJOKv+WZkUfNouQ2dN4lv9X0225wEBGzbNMF5jYe4VOFQsrA/x/1sor?= =?Windows-1252?Q?nbDZK1s2B5B+ax3SILEYjJAG/2rB5m4/PXvI0Drjxi+rKZFD6YpDNiRB?= =?Windows-1252?Q?AUWVnh29WsPvOutzgG1otMQc+8TxfKWhOG47Lp0qj1S+/dI/ZFscowfM?= =?Windows-1252?Q?BfcdDfwRCBfIZq0EClIxD8iJHsdmBi1EwQjSrXIQqn4Bmn8/FOwVcfPH?= =?Windows-1252?Q?UgdmxqkktgkHtnPr/1ui4D2FnWAgUnOjHzHTK0WlojxAdAoJNicmwkOL?= =?Windows-1252?Q?G71QqUTNCsJriQwejqvDb3nNikx9/QRMcygvLR1IKXureAy/dt2RTIM8?= =?Windows-1252?Q?C1vSduWw5Z2714DHn23M8xnHHb4bkP/uXgObpGdf0ic+5RxAmXs=3D?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fdfebbd-61f5-4dd7-5156-08d993bd38b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2021 11:31:55.7695 (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: roy.fan.zhang@intel.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1711 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 4/8] crypto/scheduler: use proper API for device start/stop 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" > -----Original Message----- > From: Akhil Goyal > Sent: Wednesday, October 20, 2021 12:28 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; david.marchand@redhat.com; > hemant.agrawal@nxp.com; anoobj@marvell.com; De Lara Guarch, Pablo > ; Trahe, Fiona ; > Doherty, Declan ; matan@nvidia.com; > g.singh@nxp.com; Zhang, Roy Fan ; > jianjay.zhou@huawei.com; asomalap@amd.com; ruifeng.wang@arm.com; > Ananyev, Konstantin ; Nicolau, Radu > ; ajit.khaparde@broadcom.com; > rnagadheeraj@marvell.com; adwivedi@marvell.com; Power, Ciara > ; Akhil Goyal > Subject: [PATCH v4 4/8] crypto/scheduler: use proper API for device > start/stop >=20 > The worker PMDs were using direct device start/stop > functions rather than rte_cryptodev_start(), > so rte_crypto_fp_ops never get set. This patch calls > the rte_cryptodev_start and stop APIs which start and > stop devices properly and fp_ops get set. >=20 > Reported-by: Ciara Power > Signed-off-by: Akhil Goyal > --- > drivers/crypto/scheduler/scheduler_pmd_ops.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c > b/drivers/crypto/scheduler/scheduler_pmd_ops.c > index 465b88ade8..f61640c9d6 100644 > --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c > +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c > @@ -181,10 +181,7 @@ scheduler_pmd_start(struct rte_cryptodev *dev) > /* start all workers */ > for (i =3D 0; i < sched_ctx->nb_workers; i++) { > uint8_t worker_dev_id =3D sched_ctx->workers[i].dev_id; > - struct rte_cryptodev *worker_dev =3D > - > rte_cryptodev_pmd_get_dev(worker_dev_id); > - > - ret =3D (*worker_dev->dev_ops->dev_start)(worker_dev); > + ret =3D rte_cryptodev_start(worker_dev_id); > if (ret < 0) { > CR_SCHED_LOG(ERR, "Failed to start worker dev %u", > worker_dev_id); > @@ -208,10 +205,8 @@ scheduler_pmd_stop(struct rte_cryptodev *dev) > /* stop all workers first */ > for (i =3D 0; i < sched_ctx->nb_workers; i++) { > uint8_t worker_dev_id =3D sched_ctx->workers[i].dev_id; > - struct rte_cryptodev *worker_dev =3D > - > rte_cryptodev_pmd_get_dev(worker_dev_id); >=20 > - (*worker_dev->dev_ops->dev_stop)(worker_dev); > + rte_cryptodev_stop(worker_dev_id); > } >=20 > if (*sched_ctx->ops.scheduler_stop) > -- > 2.25.1 Acked-by: Fan Zhang