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 BDCBAA034F; Wed, 11 Aug 2021 08:54:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F7F640042; Wed, 11 Aug 2021 08:54:41 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2042.outbound.protection.outlook.com [40.107.95.42]) by mails.dpdk.org (Postfix) with ESMTP id 03D7740040 for ; Wed, 11 Aug 2021 08:54:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1nsz3DXnYOFViAKJEZ9sNlYqhWZV7ae6O6ZSFbipmhGycrmZSy3l9o3TCHgG59a3Zbt0UfzMerXGKIh7FrDpg6edrSjGDoV+gnWHEyRgxgc03PkG4A+SXX4tWudBhfQLDuHa5De/biL+CHudg38DRInVfOO6F5jgcNOIazmQqMJwK3fVNcxy/43pM12GYMY8238zy2mRVylTMHNWnrltPUxNC7jJleJbCGCx4n1dPRdMZBzFFra0xBd5IxUP7t0raItVmkwDNe8q8c+u8nB3J1pmjuusQAhRLyaAjehfx6nesaycnhTKDG48OLzeQZeDaYKeAsFINOlxB/sgnFFtw== 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=/VHSBFmDs34PhOYsC4eCPLofcJXAArCKHWQlFAP/Ko4=; b=arSspCtO8Sh+yli3eoGaVF8H38F9g7T15jSNgbWlU5wc9wOYlaNQjLW0fED9Xgu/7kBCqm8oJn5oDTiqnWi+jY7qdobH41IjkAg6W1/t7CkvL9XmJVpftstoO8cAKHPsCTVlof6p0tGAwtoQV6o+ys0ISBJ5xAmwMRuB1jWkWTtW4WgPPjWjgAcPjBfTFnqqXWcF5NKaBsSnmAROvw0c2m6QjcWZB/bHgQJaU/TSxb75Mqf65PDKO5XmPnsuhPLXGFRZIP139EAk4qmyIgr9OCUS61aGDQ0l+tAZhBsLl0DCBEkcAZ0OSlqeIQM2fw0cPaTteuTYogf2cTb4om+YqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/VHSBFmDs34PhOYsC4eCPLofcJXAArCKHWQlFAP/Ko4=; b=kwLeh2pgJa/7p9wLz4op79KFnmHHLcN79txX88PhTgiZRgL0hgaY2Q0iYt5GQ394x9HmOKguZtwKWCLGVZ2U5Rdtey7vZEnPl9Mu0npxZ+HCsr24IYVDlFcTqcWUBM+g0eVhDi3wsjKL0gbNeXn4MfSjch60Ce92L+E7zKCajOVu1nFtPquU8VeDIXp/w3BRRJjJYXoAwVmIoqw23PPB1ykGPk+9O2kIS1IFs5THubkPwyBYe9Z6a6v6cvgjRohH7k8waHYzfbON8g1BJS8vZkqVlPkklBRAcZoBxciPh3Q7PMxL2OXvM/Z0OWGHJyj4Wf5pXW+dXstjgAXZr0UhfQ== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5247.namprd12.prod.outlook.com (2603:10b6:5:39b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.15; Wed, 11 Aug 2021 06:54:38 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00%9]) with mapi id 15.20.4394.023; Wed, 11 Aug 2021 06:54:38 +0000 From: Matan Azrad To: Akhil Goyal , "dev@dpdk.org" CC: "anoobj@marvell.com" , "radu.nicolau@intel.com" , "declan.doherty@intel.com" , "hemant.agrawal@nxp.com" , "konstantin.ananyev@intel.com" , NBU-Contact-Thomas Monjalon , "roy.fan.zhang@intel.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "ajit.khaparde@broadcom.com" , "pablo.de.lara.guarch@intel.com" , "fiona.trahe@intel.com" , "adwivedi@marvell.com" , "michaelsh@marvell.com" , "rnagadheeraj@marvell.com" , "jianjay.zhou@huawei.com" Thread-Topic: [PATCH v2 2/4] cryptodev: change valid dev API Thread-Index: AQHXjiENSKcE3qNrUEiNBqQtZ/h5sqtt3s3g Date: Wed, 11 Aug 2021 06:54:38 +0000 Message-ID: References: <20210805200236.1180289-1-gakhil@marvell.com> <20210810195020.1423013-1-gakhil@marvell.com> <20210810195020.1423013-3-gakhil@marvell.com> In-Reply-To: <20210810195020.1423013-3-gakhil@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 314f8595-0ae4-4bdb-1d6b-08d95c94e327 x-ms-traffictypediagnostic: DM4PR12MB5247: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:962; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k9w0gT7/1ltLRQE34UJ7Up/HXElITYfvmpu+TaKSdMSsC3XOI6AlIZwUKWWXNTQN3TsAcikP9YeLRWwqsKyPR3fVdaNg3YpSI9h5Ce0jjzkVjaxzuk/ymMtnIPNy4ip6WDuSnhYNOnD7/yj0dPR7x+TV4nlUI6XW0iqM8B//PWTlOQTOWdNl6cfLSdqTcuSFzTljE14klRb9dkReMUgdIoAZ/+wVHaLiZzrLixth+1MUoTTJ73QqBbtdsG+Ymux07C+s5WRD2MdDiXeClqZYzfTe0BlHBasuo64+59m0IdS1fU/deMwCelVxFuOad+ifJUZb4/OeEuyoRtud9V7OJcDwU5Hx0/olK+NnS/jkEoEA+nS/67uCyWvdyQTSIVV/85fRNVibl4hjQehOXSQH8dmRI6oC9A4KtQnswIMHumP+c7El9wQxGhv4fWbi5TPF9C74xGepcU/Cz4MMifq9ghFPr8+xyuCqOq1n1uVI7KgfA3DD8jZlP4kYLlaRAZf2QKvFD+jFPj2fGipB0GeZVGb09oSYuCDR3sj9bUWVab+1AnMu+n9/VSD6hj+wVG12y9BWP+e3GfR54sgfFnxdACgUG9nVCmpd2qTQAA2vfP44qNj2+XgnDew/GrAVQLLZ0rqV/JubMG71Mp/GN96ZWDzWc3pKcYSK9m5q7HalM27eyDQ5TWSmUm603Asj8ThNpL/+KnAB4FTiSKsZPrXghw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(136003)(396003)(39860400002)(366004)(30864003)(86362001)(83380400001)(7696005)(186003)(71200400001)(2906002)(76116006)(5660300002)(66476007)(66446008)(54906003)(66946007)(33656002)(4326008)(66556008)(8936002)(7416002)(52536014)(122000001)(478600001)(8676002)(55016002)(64756008)(26005)(9686003)(316002)(38100700002)(110136005)(38070700005)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?b2q/ItBavTnNLVki1wdXVlecgz+sHHuYtUTydUpfkJjkFhFSaXHn8/oK98zd?= =?us-ascii?Q?qfxN47nSQazq+beDFJNGncDNPKu8j2WDa4YYmj1jy8M2tKtiVk/YKf7lMP5N?= =?us-ascii?Q?7J5YlG4jIRpNQhKUFYc/Nm5P4xh1H11Ph0RIDy2qHFySXTO+rQAdLnfA6f0M?= =?us-ascii?Q?WBbqoTmwZtbhiyC+Xa4tHiGLhjLV5IbGVTrsUQJ7vjMwaibCmR8Te8exOv7y?= =?us-ascii?Q?IQsVe/zhw3QC0rmVlzWjovEKBnTmSZtqTX6qizILB6+UKdCazw0XNTFG5YWK?= =?us-ascii?Q?PXAJDoobBUYWLIt1UvQBUaEzjVQXRYAyy55Fe7LHRZm5x/ujWsUuvqPVpsKV?= =?us-ascii?Q?xTdq5Sc68Vt+v4hmbg3SIM2yMg8lL6cZep6CgVfpp4qvta9X05lIDS8xOykB?= =?us-ascii?Q?/+SB216fWGkhBdbJ3SJtjnJEMGKK7vBFCd+C/y/ib45VDPid98qgvtQvoe3l?= =?us-ascii?Q?YPIXLjna14O8BCufiK03PsXEEfyNjx4vPnfy8rYLLLP8CZrjMB1UthTrwDhp?= =?us-ascii?Q?l3fMHx1IRZnFxb4cvRlM2NMidLbynF5Nw2BORLvm1Rxi/56WN8ZDrpdmatAT?= =?us-ascii?Q?Ev2WHMqQWcUrjWKmeZSgubATBdqc7Ahre9iSDKj727k0gyy0UiVqF6q3rYhf?= =?us-ascii?Q?YOZ+14JpEeTIxaNkQNJsK1Tet1ErD8X/Bd3rSoO4KBKX+gJzih2JiypXcs+f?= =?us-ascii?Q?tBXv4MTaBiKYih3wERZuMjmy4woUdcOD5jEaaNskFUSH04+qGVUibimrs9dz?= =?us-ascii?Q?vqOMij6Dg23RovE00/SeqUcumDKbX0OTkrT5widC3IcTFSZbLRXq76rQ1Y96?= =?us-ascii?Q?FAtyzH3K0krbym8pMyjgu0xmbovCLwPk8GAkV8KZAzlDVLSZgc5WsVd+jikb?= =?us-ascii?Q?AO1fcm74/dk+Tom6MdRISQZuEXoeUf5JAgqtcOfmBzCO3MB9ZLs9dWu9cyMc?= =?us-ascii?Q?SRNDRED4+XuY/bbqwPHEHV6SXif7FyA+f383SE6WW7ONUgaQXHIXxq8yrDrU?= =?us-ascii?Q?oETLe0xZ0W3STxIQciWIqK6tMo9k0PXaUr7b2SbEyhFHQJpkOU7ZePpCL8C1?= =?us-ascii?Q?LNkjEt3e10eNlznI2CEe9gONiGG9LQi28eg9PAAc4qFhnfDJmMm0W+cLciHT?= =?us-ascii?Q?wk1KrOyHvlAlJKd/Q87knEzDjoJ9Ww2TFCCMZJYr+4Ua1x8O6qsMu6vYh1FT?= =?us-ascii?Q?LX4R/4NdFAoN55X8A4WY/l5WC+1sYqgtdc2opae8hJLVRxyDB492cP1hnvkP?= =?us-ascii?Q?mLPuvOo7SrJbRt5Cvg0SpymCHduJGHV7QPA0jmlZL8JgTACmvPilDyIhP2gp?= =?us-ascii?Q?BIc=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 314f8595-0ae4-4bdb-1d6b-08d95c94e327 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2021 06:54:38.4437 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UCT8LQFgLJl9j4P74g9o7TNXSr6sDdprafhGaV1/+yJ5uSgcL7fzzVByZBr+BLYvoPH9h3JysbTv4vdC2QIxxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5247 Subject: Re: [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API 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" From: Akhil Goyal > The API rte_cryptodev_pmd_is_valid_dev, can be used by the application as > well as PMD to check whether the device is valid or not. Hence, _pmd is > removed from the API. > The applications and drivers which use this API are also updated. >=20 > Signed-off-by: Akhil Goyal Agree. What's about updating the release notes on this change? Matan > --- > .../net/softnic/rte_eth_softnic_cryptodev.c | 2 +- > examples/fips_validation/main.c | 2 +- > examples/ip_pipeline/cryptodev.c | 3 +- > lib/cryptodev/rte_cryptodev.c | 50 +++++++++---------- > lib/cryptodev/rte_cryptodev.h | 11 ++++ > lib/cryptodev/rte_cryptodev_pmd.h | 11 ---- > lib/cryptodev/version.map | 2 +- > lib/eventdev/rte_event_crypto_adapter.c | 4 +- > lib/eventdev/rte_eventdev.c | 2 +- > lib/pipeline/rte_table_action.c | 2 +- > 10 files changed, 44 insertions(+), 45 deletions(-) >=20 > diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c > b/drivers/net/softnic/rte_eth_softnic_cryptodev.c > index a1a4ca5650..8e278801c5 100644 > --- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c > +++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c > @@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p, >=20 > dev_id =3D (uint32_t)status; > } else { > - if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) =3D=3D= 0) > + if (rte_cryptodev_is_valid_dev(params->dev_id) =3D=3D 0) > return NULL; >=20 > dev_id =3D params->dev_id; diff --git > a/examples/fips_validation/main.c b/examples/fips_validation/main.c index > c175fe6ac2..e892078f0e 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg) > } >=20 >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) { > + if (!rte_cryptodev_is_valid_dev(cryptodev_id)) { > RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n"= , > cryptodev_id, arg); > return -1; > diff --git a/examples/ip_pipeline/cryptodev.c > b/examples/ip_pipeline/cryptodev.c > index b0d9f3d217..9997d97456 100644 > --- a/examples/ip_pipeline/cryptodev.c > +++ b/examples/ip_pipeline/cryptodev.c > @@ -6,7 +6,6 @@ > #include >=20 > #include > -#include > #include >=20 > #include "cryptodev.h" > @@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct > cryptodev_params *params) >=20 > dev_id =3D (uint32_t)status; > } else { > - if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) =3D=3D= 0) > + if (rte_cryptodev_is_valid_dev(params->dev_id) =3D=3D 0) > return NULL; >=20 > dev_id =3D params->dev_id; diff --git a/lib/cryptodev/rte= _cryptodev.c > b/lib/cryptodev/rte_cryptodev.c index 447aa9d519..37502b9b3c 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id) > } >=20 > unsigned int > -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id) > +rte_cryptodev_is_valid_dev(uint8_t dev_id) > { > struct rte_cryptodev *dev =3D NULL; >=20 > @@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) > + if (!rte_cryptodev_is_valid_dev(dev_id)) > return -1; >=20 > dev =3D rte_cryptodev_pmd_get_dev(dev_id); > @@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct > rte_cryptodev_config *config) > struct rte_cryptodev *dev; > int diag; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id) >=20 > CDEV_LOG_DEBUG("Start dev_id=3D%" PRIu8, dev_id); >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return; > } > @@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id) > struct rte_cryptodev *dev; > int retval; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -1; > } > @@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, > uint16_t queue_pair_id) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, > uint16_t queue_pair_id, { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id, > return NULL; > } >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > rte_errno =3D ENODEV; > return NULL; > @@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t > dev_id, > return -EINVAL; > } >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > return -ENODEV; > } > @@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id, > return NULL; > } >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > rte_errno =3D ENODEV; > return NULL; > @@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t > dev_id, > return -EINVAL; > } >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > return -ENODEV; > } > @@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct > rte_cryptodev_stats *stats) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > return -ENODEV; > } > @@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return; > } > @@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct > rte_cryptodev_info *dev_info) { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%d", dev_id); > return; > } > @@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id, > if (!cb_fn) > return -EINVAL; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id, > if (!cb_fn) > return -EINVAL; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id, > uint8_t index; > int ret; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id, > uint8_t index; > int ret; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id, > struct rte_cryptodev *dev; > uint8_t driver_id; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t > dev_id, { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > CDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, dev_id); > return -EINVAL; > } > @@ -2079,7 +2079,7 @@ > rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) > struct rte_cryptodev *dev; > unsigned int priv_sess_size; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) > + if (!rte_cryptodev_is_valid_dev(dev_id)) > return 0; >=20 > dev =3D rte_cryptodev_pmd_get_dev(dev_id); > @@ -2099,7 +2099,7 @@ > rte_cryptodev_asym_get_private_session_size(uint8_t dev_id) > unsigned int header_size =3D sizeof(void *) * nb_drivers; > unsigned int priv_sess_size; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) > + if (!rte_cryptodev_is_valid_dev(dev_id)) > return 0; >=20 > dev =3D rte_cryptodev_pmd_get_dev(dev_id); > @@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t > dev_id, { > struct rte_cryptodev *dev; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { > + if (!rte_cryptodev_is_valid_dev(dev_id)) { > sym_crypto_fill_status(vec, EINVAL); > return 0; > } > @@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t > dev_id) > int32_t size =3D sizeof(struct rte_crypto_raw_dp_ctx); > int32_t priv_size; >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) > + if (!rte_cryptodev_is_valid_dev(dev_id)) > return -EINVAL; >=20 > dev =3D rte_cryptodev_pmd_get_dev(dev_id); > diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.= h > index 11f4e6fdbf..bb01f0f195 100644 > --- a/lib/cryptodev/rte_cryptodev.h > +++ b/lib/cryptodev/rte_cryptodev.h > @@ -1368,6 +1368,17 @@ __rte_experimental unsigned int > rte_cryptodev_asym_get_private_session_size(uint8_t dev_id); >=20 > +/** > + * Validate if the crypto device index is valid attached crypto device. > + * > + * @param dev_id Crypto device index. > + * > + * @return > + * - If the device index is valid (1) or not (0). > + */ > +unsigned int > +rte_cryptodev_is_valid_dev(uint8_t dev_id); > + > /** > * Provide driver identifier. > * > diff --git a/lib/cryptodev/rte_cryptodev_pmd.h > b/lib/cryptodev/rte_cryptodev_pmd.h > index 1274436870..dd2a4940a2 100644 > --- a/lib/cryptodev/rte_cryptodev_pmd.h > +++ b/lib/cryptodev/rte_cryptodev_pmd.h > @@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id); struct > rte_cryptodev * rte_cryptodev_pmd_get_named_dev(const char *name); >=20 > -/** > - * Validate if the crypto device index is valid attached crypto device. > - * > - * @param dev_id Crypto device index. > - * > - * @return > - * - If the device index is valid (1) or not (0). > - */ > -unsigned int > -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id); > - > /** > * The pool of rte_cryptodev structures. > */ > diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map index > 9f04737aed..593199bba6 100644 > --- a/lib/cryptodev/version.map > +++ b/lib/cryptodev/version.map > @@ -25,6 +25,7 @@ DPDK_21 { > rte_cryptodev_get_feature_name; > rte_cryptodev_get_sec_ctx; > rte_cryptodev_info_get; > + rte_cryptodev_is_valid_dev; > rte_cryptodev_name_get; > rte_cryptodev_pmd_allocate; > rte_cryptodev_pmd_callback_process; > @@ -33,7 +34,6 @@ DPDK_21 { > rte_cryptodev_pmd_destroy; > rte_cryptodev_pmd_get_dev; > rte_cryptodev_pmd_get_named_dev; > - rte_cryptodev_pmd_is_valid_dev; > rte_cryptodev_pmd_parse_input_args; > rte_cryptodev_pmd_release_device; > rte_cryptodev_queue_pair_count; > diff --git a/lib/eventdev/rte_event_crypto_adapter.c > b/lib/eventdev/rte_event_crypto_adapter.c > index e1d38d383d..2d38389858 100644 > --- a/lib/eventdev/rte_event_crypto_adapter.c > +++ b/lib/eventdev/rte_event_crypto_adapter.c > @@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t > id, >=20 > EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) { > + if (!rte_cryptodev_is_valid_dev(cdev_id)) { > RTE_EDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, cdev_id); > return -EINVAL; > } > @@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t > id, uint8_t cdev_id, >=20 > EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); >=20 > - if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) { > + if (!rte_cryptodev_is_valid_dev(cdev_id)) { > RTE_EDEV_LOG_ERR("Invalid dev_id=3D%" PRIu8, cdev_id); > return -EINVAL; > } > diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c > index 594dd5e759..cb0ed7b620 100644 > --- a/lib/eventdev/rte_eventdev.c > +++ b/lib/eventdev/rte_eventdev.c > @@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, > uint8_t cdev_id, > struct rte_cryptodev *cdev; >=20 > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > - if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) > + if (!rte_cryptodev_is_valid_dev(cdev_id)) > return -EINVAL; >=20 > dev =3D &rte_eventdevs[dev_id]; > diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_act= ion.c > index 98f3438774..54721ed96a 100644 > --- a/lib/pipeline/rte_table_action.c > +++ b/lib/pipeline/rte_table_action.c > @@ -1732,7 +1732,7 @@ struct sym_crypto_data { static int > sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg) { > - if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id)) > + if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id)) > return -EINVAL; > if (cfg->mp_create =3D=3D NULL || cfg->mp_init =3D=3D NULL) > return -EINVAL; > -- > 2.25.1