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 B9BB4A0C43; Wed, 20 Oct 2021 12:25:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FE7140687; Wed, 20 Oct 2021 12:25:50 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 46A1740142 for ; Wed, 20 Oct 2021 12:25:43 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="252232126" X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="252232126" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 03:25:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="483671148" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga007.jf.intel.com with ESMTP; 20 Oct 2021 03:25:41 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) 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 03:25:41 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX608.amr.corp.intel.com (10.22.229.21) 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 03:25:40 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) 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 03:25:40 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) by edgegateway.intel.com (134.134.137.102) 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 03:25:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbC1uo53pQHt6ySR6MXmUp0Wj+zw7tJ1Ruzw4k4scJBeAZ5tKJ7oF1IqHklxgft1C2BvLNBVX1OrZxIG6X1DQ/AtoJxDss2lX0hPdgZWrE9l+r7P5EpIvGjKOIlTzms4PamBdJaIi0KlGOzJGRu2tUUGxhw0FysykohB1ZABys6UliQA4zi8aEPUiKTQS3ho8zpVZXGh86oX1rOd3BRxNl/MelOk3pcCMYsPygf67WaW5185vMMQu9ghEas9GBS1TQmaveuTsDk7+bHFHH+CQj28XMCLTWa+H2nl8hWK+XEyng8N5iRf3qSYwI+MagBVSCw8OJOq08FgMd/RPmGhDA== 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=VwEruAkj/85ZCh6J153Ishr3MDRBBk4IBb0MrUoWgpc=; b=jdk9dfaeruUz+yjm0xf4RlPZs5EHsaqx+t+ia2Q96FCcLon8uLRonM6FMVJLEvLx9rnSjpTwntBRLIIHD6hlJ3ky6mVhW6JwgHpAipm15gSBBKm9w0iu+VxbzXidCjUAbGnGEgAvlWlX7K3iX6WsVl5pLn3cQysvh9lrVBWocxEsXYIC6H/pF4mETydhwrxqmUSwctNI7OgQWD+aNHMY74ya2hnaRf9KvdAonumgUnA1vvjdW3iziOekWMXAjl5B6zt/6ouIza1Mqicb7UBjE9G54niP3rzx8/Kb/YpSBTcNbD2aBkMc2CKTNw8BFJwxrdFpGVZj5LWBeHaIu26fgQ== 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=VwEruAkj/85ZCh6J153Ishr3MDRBBk4IBb0MrUoWgpc=; b=exQeet2rj4WC7eKrnpUbexUr1rjVDPhiqj9gXQ2KvUUSO5482Fc+k3Y7roEA2DjcndDiQTobZ8dz0O4jf+qtoZTLTmtaw1KFVGQjGh0s63DsReo7VGumLYntdHVck7noL3gCIG4BfDieJdeE2H4kx0CqvekQbCv30xEwkq1zHKI= Received: from MN2PR11MB3821.namprd11.prod.outlook.com (2603:10b6:208:f7::24) by MN2PR11MB3664.namprd11.prod.outlook.com (2603:10b6:208:f1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Wed, 20 Oct 2021 10:25:38 +0000 Received: from MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::304c:39f1:9d95:4ba2]) by MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::304c:39f1:9d95:4ba2%6]) with mapi id 15.20.4608.018; Wed, 20 Oct 2021 10:25:38 +0000 From: "Power, Ciara" 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" , "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" Thread-Topic: [PATCH v3 0/7] cryptodev: hide internal structures Thread-Index: AQHXxC5+jdqxqUhhBUylaYqEyF/hO6vbsGkw Date: Wed, 20 Oct 2021 10:25:38 +0000 Message-ID: References: <20211011124309.4066491-1-gakhil@marvell.com> <20211018144201.2028022-1-gakhil@marvell.com> In-Reply-To: <20211018144201.2028022-1-gakhil@marvell.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action 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: 147a99c0-a411-46f0-9663-08d993b3f618 x-ms-traffictypediagnostic: MN2PR11MB3664: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ELCrte93blAkfmkiga1vM4TBsVAd5tazmVLD32W+7OytNxN6TC8urB58mXrG4+8w9xGt6guTXvzvmoWRyNbdLbm8ipBagS3hGTCwJaBVUVoG8FhCYMifJetqYaWtV1ImfYccEXxr8A79APipXQM+wFakaeUsmX+C39xmuX4YRzdGi2Zk+Z9E4KGRJCuLvriWtHVBdEobx3E0jS7+8DxrTQBOaJW7Fm9cJrlavwz7nM4+/NzD4AdatanureNi+SWvVk+U7p0CbYaX5+Ed1yWjdSTcjfxQGWCjCA3m2VgImUIM9daBwBAKin8i7hag6diSii6rCR86lIKEQ3Dn3cF3CM7xF21VhtIaEkoqM2nMLOpHy3o6hYBqlTRGvsDam5bmoIht+ozDbFgWRjc/Ezx6yxCDbG4i406RvnPsNkwmL3gDN3xI99YaRRJYynHWeFKe0lS8P077bWqt7/dnpa+mF+hYIJ0rCOnZk2oBUDaSwEIPxyFgj1SSjr5n8rsElV+4hXPvhpG3Qq/hcWx04MWyKSO1oCdghYMeTXz8nJse67mVNs9SD77E1n0lHtu+nWDStxmstlqCnl5Y+amBhgQkCVeebNdMcqIp9Hgkq2Fhk5uV+fhc4V72JLdnIYCCaDvDVDEzC18I8b/dn+MEmE35oI4CK33FflH4qUlkHnchawkk5K/tfa994gvqo9DGfODFF79SG+z4Pf1YxA5CGKSgRDyKMKEQCeU5ZLYYVKyOG7aOX3yb2oZV4bIbkJsqXadvK11gDM7MbOSAZQ8BdWnKChBj5CfzPMYYmg7ifUqO9B9ft0GwxzIA8B9/wh1oB4RsHoyZjpjdlPwaLcJdMpi1Jw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3821.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(5660300002)(6506007)(66946007)(64756008)(66446008)(66476007)(66556008)(110136005)(54906003)(38070700005)(316002)(9686003)(55016002)(186003)(71200400001)(86362001)(2906002)(52536014)(8676002)(76116006)(4326008)(33656002)(83380400001)(82960400001)(26005)(38100700002)(8936002)(7696005)(122000001)(508600001)(7416002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WqcV22Wwh1HK0FiMUWmOLK8YxgRUnWXZel+qWNIQRu3YY05UGhn5FLREDP2e?= =?us-ascii?Q?R5LVn9/s8daQTLht//lSzjgM4eQ2djuq9/0f1XsJ+BcSWc/MH2giMkEaeJRM?= =?us-ascii?Q?DcPoox+g7piOkfUiG/IjaKPXqjS+bWaVB8TM8bJSKlRoEmaj4ugnmzPwszbh?= =?us-ascii?Q?n9ORMSSXehzjLmhrD9V0yPbNsSImfkEjEnhiA1T/Nfkdtio9fRmQ2SKXRq8I?= =?us-ascii?Q?vyQoDkN9qrFqtfrk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C6CjSH5zXzSreFD?= =?us-ascii?Q?VcMaGZFh9cpUqg4yK9J+iQ2ESXHL01Z4fEst0vle9h4nzC557KsdC3gcL4Ty?= =?us-ascii?Q?vtxNkBlZY/hGHp8DOScK+8Abzx1urWihoBx9ycgAIvMoDvGahoexmzp2x+4T?= =?us-ascii?Q?Musldnpig9LbklzQif130H176Ur2s9q2x0rcddyH4Rnk4zirZCmGflsILoH8?= =?us-ascii?Q?+zZgibVP5zMO1YMRI1x9mfM4?= 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: MN2PR11MB3821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 147a99c0-a411-46f0-9663-08d993b3f618 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2021 10:25:38.5172 (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: YoZEKJmmKd6tbk+M4bbBkvawf+rl0nFDS/70nvv0TtFrsG4ay2N98M4DB1YyAe9VHCBJgGM5xl2CJVK8N556dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3664 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 0/7] cryptodev: hide internal structures 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, >-----Original Message----- >From: Akhil Goyal >Sent: Monday 18 October 2021 15:42 >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 v3 0/7] cryptodev: hide internal structures > >Structures rte_cryptodev and rte_cryptodev_data are not supposed to be >directly used by the application. These are made public as they are used b= y >inline datapath public APIs. >This patchset, creates a new rte_cryptodev_core.h file which helps in defi= ning >a data structure to hold datapath APIs in a flat array based on the device >identifier which is filled by the PMD. > >Similar series for ethdev and eventdev are also floated on ML. >https://patchwork.dpdk.org/project/dpdk/list/?series=3D19428 >https://patchwork.dpdk.org/project/dpdk/list/?series=3D19405 > > With this patchset I see a seg fault with the cryptodev_scheduler_autotest. It is due to the worker PMDs using the direct device start functions rather= than rte_cryptodev_start(), so fp_ops never get set. I believe this fix is needed: diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/= scheduler/scheduler_pmd_ops.c index 465b88ade8..d6f8d3ab78 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c @@ -181,10 +181,8 @@ 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); =20 - 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 +206,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) Thanks, Ciara