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 0D12AA0542; Tue, 6 Sep 2022 10:24:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A87C340143; Tue, 6 Sep 2022 10:24:29 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 2D6B1400D6 for ; Tue, 6 Sep 2022 10:24:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662452668; x=1693988668; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Cv58/1R8oPHBmGTd//s7rYodA1wxqxv4xobCByIevfE=; b=mhhkVknEpSo0MMhUMwd+f8ktHc1Kh3CwaG7qVZwyBEw3k4ZiHVzPDeHI kBiCpTPIyzCMgFQ5ee7GDxnH9fKZ919xQZqqnXRmzTvaK+jowRC6DDcp3 fvpfENcCWsF2I7NtyUig+z3fk7JxztapOksGyw2+qVEs/Qw78bb9/7/E7 0mg/wCCwi8nLnkD5L5X3OtzL1LKO8P1oisr8LMhlrDw2hpygo99SbaYPh Yxo5zkeJ/T4HuWHv7+BRJzMhM2SD/bxL3iO7Uj7FtD7IA0X0osCAc5z8o uJGgBjUxsGvbBsOFmAncOa+lxy6KO5TtqnSB2uLLndwUZbIzO3rRyJbrd g==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="276275285" X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="276275285" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 01:24:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="565010787" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 06 Sep 2022 01:24:26 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 6 Sep 2022 01:24:26 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2375.31; Tue, 6 Sep 2022 01:24:25 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 6 Sep 2022 01:24:25 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 6 Sep 2022 01:24:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nrv4aUUXzLzF6vacGBXYt6kNkwbZ6WkIVkyaSH+ZrQ/fVsEGoT0PE3rY3FIbRnjUW4VzCs9fEHn+MGgVT/svT+r0+BWBLJ1CQkxMB/jfzO5zzybYyLDlmwESy5h73VziMGB4edQb14GufPWufAlmmUZAKMwWl6lSkuKS3MW1u5E4FfkVO8rgz0rPWxgRRf4o7TBDgBzgrDGG7c+QyQEPyPAWrSe7TM3tyxQLvBeOwD9D2MoR1Jn5P55p+FISyQkdr8mn3hM/EMInZKQIbqOv9T61A7N24aC9kle7jRsDoWZWWqRu2LvzedKoo0y50pHm6p0TdkFK4Rs3Ga8p1HoBxw== 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=alQsxzIMMkRn3EoLgPeyhGhVJRmiDZIQP+YVOBcZHls=; b=KSf08gS4ZkXbuWzAuVpe1x8Rr2OXRhgadk7qSBnV0cIY4S29OAgme7LP5PcxF8z4tP+353DPh/3kpUdVerV+fuaERkSZTLmFmdYMpqZX9MOAxVbHud7H6Y+opowQozPREBMAjtpDC7guZ+oD5nCsinT03FRdPukKaoREVHvqzEetm2fnocVkFYWDDMq4RCPXYFaVDIlVTljWLKV4gCtHW8Bu5m53AoE7hES5k+YAhQ9ajpcp63sIpxhRSWLQRZP5aNEllyuqP9oiCvyEZ+rXPqVz/sImdfiyydULSIEVPyPImdnR04gnCnDgUq7ovEnAGwpCpF0bZZBF98+/92zVQg== 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 Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by DM6PR11MB4266.namprd11.prod.outlook.com (2603:10b6:5:1da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.17; Tue, 6 Sep 2022 08:24:20 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::48:7f55:58c5:3343]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::48:7f55:58c5:3343%6]) with mapi id 15.20.5588.018; Tue, 6 Sep 2022 08:24:20 +0000 From: "Jayatheerthan, Jay" To: David Marchand , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Richardson, Bruce" , Ray Kinsella , "Zhang, Roy Fan" , Ashish Gupta , "Yang, Qiming" , "Wu, Wenjun1" , Shijith Thotton , Srisivasubramanian Srinivasan , "Xu, Rosen" , "Zhang, Tianfei" , Sachin Saxena , "Hemant Agrawal" , Akhil Goyal , "Chengwen Feng" , "Laatz, Kevin" , Ferruh Yigit , Andrew Rybchenko , "Gujjar, Abhinandan S" , Jerin Jacob , "Matz, Olivier" , Ori Kam , "Maxime Coquelin" , "Xia, Chenbo" Subject: RE: [PATCH v5 08/27] eal: deprecate RTE_FUNC_PTR_* macros Thread-Topic: [PATCH v5 08/27] eal: deprecate RTE_FUNC_PTR_* macros Thread-Index: AQHYwQKc2zL31QNepE6eDcv781Kqb63SEc3Q Date: Tue, 6 Sep 2022 08:24:19 +0000 Message-ID: References: <20220628144643.1213026-1-david.marchand@redhat.com> <20220905083540.2506490-1-david.marchand@redhat.com> <20220905083540.2506490-9-david.marchand@redhat.com> In-Reply-To: <20220905083540.2506490-9-david.marchand@redhat.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.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d3a1f010-7806-4338-9046-08da8fe13244 x-ms-traffictypediagnostic: DM6PR11MB4266:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TMWRq8KEcVYoI1gPog/TNXasmoP+cEEhHRzsdoNWZP0iuyrduJRcef2kPNIrcDXGWF4KE/D0DPPZREcU2lPhmds7hELfkxo8jAMWbHd6ig2uXgGew+BJbVHGNv19bN8olrdSAbJcc8Vf6MXmgRS58IVStwYpTOE3z3sEgDaD5OsEUz4y9DbzVR3iFWA8HvJzrBeinRmSED1Fs0nQcm0cfy5X4dYLo4YoPO3Oaph7+HDa+kgGHSfucx5f44pZfQmcEI6nmehsVTck8XzSUOx+gauf2m2eiWvUBOj0gekY/ZJwELjnT0Uo2/TMiGEoU2bxAufSJuKrPZtGM03YK7yrrmJIweE29YN7no2yYjFwBs6Xqrj12DsVIiqs0TuF0fxAWv0NAZFoxe8KbnL/feP5w+NGem8ajZAAq4guz7dOnsP2ybXZp5LKBI2POSWWn9eEDX5y2I6LDzL7Dsw3/XodUB8ge1wIpiBwBdXFnkVhZeCfcwxPfL5b9l1q5iD9plDzhs0+d+1eiZRs1Flt5No0wLHY8mVnsegNQSvpACSOcnbEMUFru4DQ2D7UHCMEJHu9LfjWhBdK4BG/KZ+ba1v7K0BoQIi2BH5PMU1jW9hz25/ejV1O/uw9I3kWquTUwiIelPn5fhLhxCedXhkPw7jT1JtVGlBXzOnZKpzgGhGsToXMTAFrH4QvELWxveucV1YdLptEKqn2x1a98TT8RvHT6JCOq2GL3JOZB3Uq85mYRPfCEZeARB01EV2Co0t0sBcffY00q8ji3+c1dWKApvsSgQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(346002)(396003)(366004)(376002)(39860400002)(38070700005)(66556008)(76116006)(66946007)(66446008)(54906003)(2906002)(110136005)(66476007)(478600001)(122000001)(33656002)(86362001)(82960400001)(38100700002)(316002)(53546011)(41300700001)(186003)(71200400001)(26005)(7696005)(6506007)(107886003)(9686003)(8676002)(4326008)(64756008)(7416002)(5660300002)(52536014)(55016003)(8936002)(30864003)(83380400001)(579004)(559001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?T/8S8qE711+YZof9W5mpazInyMNmVpDLQoZl43A2WLvYlpGw7Q4b/XneOp3m?= =?us-ascii?Q?6cxzn5Ijtb24NaY05hiVOl3GzzGc02CUTOkbOKwTDTPnQ2fTtFdoFTHHls6P?= =?us-ascii?Q?CqpcAkZcAkLueRcAj1VN+nQegFXSQKuoa+2qzYNxtMkrDJ0P76HmKkPPacyF?= =?us-ascii?Q?CiDzCADDc8XTDVCWdCxV6qbk+7YvOk2nVpcZNVNxoJhPryRQZ22tX67M1WEe?= =?us-ascii?Q?95fQEovCYVijyaW/2JZJunNS6CWa7X+jGurXaO2LswkYJkwmk32oYGJTzSG9?= =?us-ascii?Q?pFzgC90DVsTYpu14pRd76cqb7uKXafp20lO5jky15UyofVLCv5GmS9CYiSHu?= =?us-ascii?Q?IKhFg6b96Q+6m4Y5GpbO+vrnu3rw3kocjK8W/osbi18NIc82qjFg9o7QYOTw?= =?us-ascii?Q?Zp/tGSmRLB0QsN0IFaOlbaJzk70KcoCM+NQUxPKTnWzOKkk/9HP2qikEzHpt?= =?us-ascii?Q?8bOS2OUgkguyQpCsADu/SrRslPyYRXD7Kl2kxynfer3wJRRrRDN97dWJv8P3?= =?us-ascii?Q?4G9W+isFUBJNCBugddm82H2SuTQjI/mnsauwGdlLBIlfRCQ0Vdmqm+PBUj2N?= =?us-ascii?Q?jqW4dd+JVNcYgr0JnFFWR5PJHQW2Stf9h4c+gJkucit8+Pf8/0Z075NmqzsG?= =?us-ascii?Q?7uPHUxYyc13ilIQ2Xu5XvBxlRZCUrBikrWuU+ruwngDKad4SS6y2NT9QMYNN?= =?us-ascii?Q?+WjLz+z1FdyPUvZBvGHAiHA9EiWHtexkVgauu62mW0XYlV0a/TUjtBa27MQQ?= =?us-ascii?Q?pLCPIwwOAQBk5ZqmJqHdvJ92v+LfwcoFJw1cTKZpZIE/GyTCRIJ9jkUGog0z?= =?us-ascii?Q?5NxZUKLVfWzUwEb/wO7MemIChJ42m7Z1ylqJIBVJpQzqyJm7Op+Bj6bTn1AT?= =?us-ascii?Q?EXl7A5DSkEvXRi6ZIy8mo3DCDj/XBPkfTQZ+/fr6edPBZYJptdoYzigflJT1?= =?us-ascii?Q?bm4LzdGr0Tqbpdpu+78uc23oQTEVW8fvkhtMCFlV+lY/VNZtQlM1P9wsx6iT?= =?us-ascii?Q?VKgTRpsmiRdQCRbpwsjDgR56AYMOzt4zgvjuxgZLPfpuk/1DqD04mf53v2un?= =?us-ascii?Q?c2SUII0lcFdUtd0m+D03F/fhISsehUAXqXzdjeW+WNQtHR1Bz+Bs0XT60UOe?= =?us-ascii?Q?65w/D7TpPDXR2W+W2YuOAaad1I6GqUo0cOBfDBbMbH/9c+66TciHuNhWMK7e?= =?us-ascii?Q?2ShZ82g7aTyytHUwnTNDgJpW6to5f5cGJiJavSD1goiGtlx2ESnb6+wJskPC?= =?us-ascii?Q?ZAAYWnjxLVwD9vImib/ojJJ88WTMPdFmPRxZ6UeLKMWXItYm6KScOwOdIlKF?= =?us-ascii?Q?Q42gh8wPdIQ9eybP8ZQnWsxPft6LPQve9Osg+Xzl2GBdXH7YeqbMZFGwRhHt?= =?us-ascii?Q?f4u/FBHVBomvO3iGuFJ5HxPH/Bswbrwkns54fp6FRoF7a7ESW/fbCaWOz9Ek?= =?us-ascii?Q?zydvxZmjE12sfTLZXt/pces1jSeq+Bf84lgXW3BR3/G9jUvGTd+rGtRH93Wg?= =?us-ascii?Q?HtnVX4DAdy9e466KXqsKvaMvpO+43YD0pgyTsgsk6NBqqy6zGo/wnQuFrmZo?= =?us-ascii?Q?1xznLhoG8/rHkqP5c1fgM7SsA/PVhV90kkG6JBpFpTmbyOb0mVkbBNuZIrwR?= =?us-ascii?Q?xQ=3D=3D?= 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: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3a1f010-7806-4338-9046-08da8fe13244 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2022 08:24:19.9489 (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: FTUrbPKd+g4vsNj9v9VIqd6gp7LqNNodV+xQFR8ykjYC97MV8uySV0399zb/T5ZOnVnJv/rsrV+mHywBgzDMBrQU797yTKmYvRUmsYGSVIY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4266 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: David Marchand > Sent: Monday, September 5, 2022 2:05 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Richardson, Bruce ; = Ray Kinsella ; Zhang, Roy Fan > ; Ashish Gupta ; Yang,= Qiming ; Wu, Wenjun1 > ; Shijith Thotton ; Srisivasu= bramanian Srinivasan ; Xu, > Rosen ; Zhang, Tianfei ; Sac= hin Saxena ; Hemant Agrawal > ; Akhil Goyal ; Chengwen Feng= ; Laatz, Kevin > ; Ferruh Yigit ; Andrew R= ybchenko ; Gujjar, > Abhinandan S ; Jerin Jacob ; Jayatheerthan, Jay ; > Matz, Olivier ; Ori Kam ; Maxim= e Coquelin ; Xia, Chenbo > > Subject: [PATCH v5 08/27] eal: deprecate RTE_FUNC_PTR_* macros >=20 > Those macros have no real value and are easily replaced with a simple > if() block. >=20 > Existing users have been converted using a new cocci script. > Deprecate them. >=20 > Signed-off-by: David Marchand > --- > devtools/cocci/func_or_ret.cocci | 12 + > doc/guides/rel_notes/deprecation.rst | 4 + > doc/guides/rel_notes/release_22_11.rst | 4 + > drivers/common/qat/qat_device.c | 8 +- > drivers/common/qat/qat_qp.c | 31 +- > drivers/compress/qat/qat_comp_pmd.c | 4 +- > .../scheduler/rte_cryptodev_scheduler.c | 6 +- > drivers/crypto/scheduler/scheduler_pmd_ops.c | 6 +- > drivers/net/ixgbe/rte_pmd_ixgbe.c | 3 +- > drivers/net/liquidio/lio_ethdev.c | 3 +- > drivers/raw/ifpga/ifpga_rawdev.c | 6 +- > drivers/raw/skeleton/skeleton_rawdev.c | 21 +- > lib/compressdev/rte_compressdev.c | 47 +-- > lib/cryptodev/rte_cryptodev.c | 43 ++- > lib/dmadev/rte_dmadev.c | 21 +- > lib/dmadev/rte_dmadev.h | 21 +- > lib/eal/include/rte_dev.h | 7 +- > lib/ethdev/ethdev_driver.c | 18 +- > lib/ethdev/ethdev_pci.h | 3 +- > lib/ethdev/rte_ethdev.c | 276 ++++++++++++------ > lib/ethdev/rte_ethdev.h | 9 +- > lib/eventdev/rte_event_crypto_adapter.c | 10 +- > lib/eventdev/rte_event_eth_rx_adapter.c | 13 +- Looks good to me. Acked-by: Jay Jayatheerthan > lib/eventdev/rte_eventdev.c | 62 ++-- > lib/mempool/rte_mempool_ops.c | 3 +- > lib/rawdev/rte_rawdev.c | 75 +++-- > lib/regexdev/rte_regexdev.c | 59 ++-- > lib/regexdev/rte_regexdev.h | 6 +- > lib/security/rte_security.c | 6 +- > lib/vhost/vdpa.c | 9 +- > lib/vhost/vhost_user.c | 6 +- > 31 files changed, 517 insertions(+), 285 deletions(-) > create mode 100644 devtools/cocci/func_or_ret.cocci >=20 > diff --git a/devtools/cocci/func_or_ret.cocci b/devtools/cocci/func_or_re= t.cocci > new file mode 100644 > index 0000000000..f23d60cc4e > --- /dev/null > +++ b/devtools/cocci/func_or_ret.cocci > @@ -0,0 +1,12 @@ > +@@ > +expression cond, ret; > +@@ > +-RTE_FUNC_PTR_OR_ERR_RET(cond, ret); > ++if (cond =3D=3D NULL) > ++ return ret; > +@@ > +expression cond; > +@@ > +-RTE_FUNC_PTR_OR_RET(cond); > ++if (cond =3D=3D NULL) > ++ return; > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/= deprecation.rst > index dba252067c..5b4ffc992d 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -14,6 +14,10 @@ Deprecation Notices > * kvargs: The function ``rte_kvargs_process`` will get a new parameter > for returning key match count. It will ease handling of no-match case. >=20 > +* eal: RTE_FUNC_PTR_OR_* macros have been marked deprecated and will be = removed > + in the future. Applications can use ``devtools/cocci/func_or_ret.cocci= `` > + to update their code. > + > * eal: The function ``rte_eal_remote_launch`` will return new error code= s > after read or write error on the pipe, instead of calling ``rte_panic`= `. >=20 > diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_note= s/release_22_11.rst > index 3cea3aa8eb..225a380de0 100644 > --- a/doc/guides/rel_notes/release_22_11.rst > +++ b/doc/guides/rel_notes/release_22_11.rst > @@ -84,6 +84,10 @@ API Changes > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >=20 > +* eal: RTE_FUNC_PTR_OR_* macros have been marked deprecated and will be = removed > + in the future. Applications can use ``devtools/cocci/func_or_ret.cocci= `` > + to update their code. > + > * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed= . >=20 >=20 > diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_dev= ice.c > index db4b087d2b..30e5cdb573 100644 > --- a/drivers/common/qat/qat_device.c > +++ b/drivers/common/qat/qat_device.c > @@ -58,8 +58,8 @@ qat_pci_get_extra_size(enum qat_device_gen qat_dev_gen) > { > struct qat_dev_hw_spec_funcs *ops_hw =3D > qat_dev_hw_spec[qat_dev_gen]; > - RTE_FUNC_PTR_OR_ERR_RET(ops_hw->qat_dev_get_extra_size, > - -ENOTSUP); > + if (ops_hw->qat_dev_get_extra_size =3D=3D NULL) > + return -ENOTSUP; > return ops_hw->qat_dev_get_extra_size(); > } >=20 > @@ -381,8 +381,8 @@ static int qat_pci_probe(struct rte_pci_driver *pci_d= rv __rte_unused, > return -ENODEV; >=20 > ops_hw =3D qat_dev_hw_spec[qat_pci_dev->qat_dev_gen]; > - RTE_FUNC_PTR_OR_ERR_RET(ops_hw->qat_dev_reset_ring_pairs, > - -ENOTSUP); > + if (ops_hw->qat_dev_reset_ring_pairs =3D=3D NULL) > + return -ENOTSUP; > if (ops_hw->qat_dev_reset_ring_pairs(qat_pci_dev)) { > QAT_LOG(ERR, > "Cannot reset ring pairs, does pf driver supports pf2vf comms?" > diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c > index 08ac91eac4..8674eccdca 100644 > --- a/drivers/common/qat/qat_qp.c > +++ b/drivers/common/qat/qat_qp.c > @@ -370,8 +370,8 @@ adf_queue_arb_enable(struct qat_pci_device *qat_dev, = struct qat_queue *txq, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_adf_arb_enable, > - -ENOTSUP); > + if (ops->qat_qp_adf_arb_enable =3D=3D NULL) > + return -ENOTSUP; > ops->qat_qp_adf_arb_enable(txq, base_addr, lock); > return 0; > } > @@ -383,8 +383,8 @@ adf_queue_arb_disable(enum qat_device_gen qat_dev_gen= , struct qat_queue *txq, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_adf_arb_disable, > - -ENOTSUP); > + if (ops->qat_qp_adf_arb_disable =3D=3D NULL) > + return -ENOTSUP; > ops->qat_qp_adf_arb_disable(txq, base_addr, lock); > return 0; > } > @@ -396,8 +396,8 @@ qat_qp_build_ring_base(struct qat_pci_device *qat_dev= , void *io_addr, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_build_ring_base, > - -ENOTSUP); > + if (ops->qat_qp_build_ring_base =3D=3D NULL) > + return -ENOTSUP; > ops->qat_qp_build_ring_base(io_addr, queue); > return 0; > } > @@ -409,8 +409,8 @@ qat_qps_per_service(struct qat_pci_device *qat_dev, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_rings_per_service, > - -ENOTSUP); > + if (ops->qat_qp_rings_per_service =3D=3D NULL) > + return -ENOTSUP; > return ops->qat_qp_rings_per_service(qat_dev, service); > } >=20 > @@ -421,7 +421,8 @@ qat_qp_get_hw_data(struct qat_pci_device *qat_dev, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_get_hw_data, NULL); > + if (ops->qat_qp_get_hw_data =3D=3D NULL) > + return NULL; > return ops->qat_qp_get_hw_data(qat_dev, service, qp_id); > } >=20 > @@ -431,8 +432,8 @@ qat_read_qp_config(struct qat_pci_device *qat_dev) > struct qat_dev_hw_spec_funcs *ops_hw =3D > qat_dev_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops_hw->qat_dev_read_config, > - -ENOTSUP); > + if (ops_hw->qat_dev_read_config =3D=3D NULL) > + return -ENOTSUP; > return ops_hw->qat_dev_read_config(qat_dev); > } >=20 > @@ -442,8 +443,8 @@ adf_configure_queues(struct qat_qp *qp, enum qat_devi= ce_gen qat_dev_gen) > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_adf_configure_queues, > - -ENOTSUP); > + if (ops->qat_qp_adf_configure_queues =3D=3D NULL) > + return -ENOTSUP; > ops->qat_qp_adf_configure_queues(qp); > return 0; > } > @@ -483,8 +484,8 @@ qat_qp_csr_setup(struct qat_pci_device *qat_dev, > struct qat_qp_hw_spec_funcs *ops =3D > qat_qp_hw_spec[qat_dev->qat_dev_gen]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->qat_qp_csr_setup, > - -ENOTSUP); > + if (ops->qat_qp_csr_setup =3D=3D NULL) > + return -ENOTSUP; > ops->qat_qp_csr_setup(qat_dev, io_addr, qp); > return 0; > } > diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/q= at_comp_pmd.c > index dc8db84a68..6fb8cf69be 100644 > --- a/drivers/compress/qat/qat_comp_pmd.c > +++ b/drivers/compress/qat/qat_comp_pmd.c > @@ -25,8 +25,8 @@ qat_comp_capabilities_info qat_comp_get_capa_info( >=20 > if (qat_dev_gen >=3D QAT_N_GENS) > return ret; > - RTE_FUNC_PTR_OR_ERR_RET(qat_comp_gen_dev_ops[qat_dev_gen] > - .qat_comp_get_capabilities, ret); > + if (qat_comp_gen_dev_ops[qat_dev_gen].qat_comp_get_capabilities =3D=3D = NULL) > + return ret; > return qat_comp_gen_dev_ops[qat_dev_gen] > .qat_comp_get_capabilities(qat_dev); > } > diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers= /crypto/scheduler/rte_cryptodev_scheduler.c > index 1e0c4fe464..258d6f8c43 100644 > --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c > @@ -541,7 +541,8 @@ rte_cryptodev_scheduler_option_set(uint8_t scheduler_= id, >=20 > sched_ctx =3D dev->data->dev_private; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*sched_ctx->ops.option_set, -ENOTSUP); > + if (*sched_ctx->ops.option_set =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*sched_ctx->ops.option_set)(dev, option_type, option); > } > @@ -571,7 +572,8 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_= id, >=20 > sched_ctx =3D dev->data->dev_private; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*sched_ctx->ops.option_get, -ENOTSUP); > + if (*sched_ctx->ops.option_get =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*sched_ctx->ops.option_get)(dev, option_type, option); > } > diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypt= o/scheduler/scheduler_pmd_ops.c > index f3a1bd626c..83ae6b6be9 100644 > --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c > +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c > @@ -160,7 +160,8 @@ scheduler_pmd_start(struct rte_cryptodev *dev) > return -1; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*sched_ctx->ops.worker_attach, -ENOTSUP); > + if (*sched_ctx->ops.worker_attach =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D 0; i < sched_ctx->nb_workers; i++) { > uint8_t worker_dev_id =3D sched_ctx->workers[i].dev_id; > @@ -171,7 +172,8 @@ scheduler_pmd_start(struct rte_cryptodev *dev) > } > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*sched_ctx->ops.scheduler_start, -ENOTSUP); > + if (*sched_ctx->ops.scheduler_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if ((*sched_ctx->ops.scheduler_start)(dev) < 0) { > CR_SCHED_LOG(ERR, "Scheduler start failed"); > diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pm= d_ixgbe.c > index 9729f8575f..89fe3a828a 100644 > --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c > @@ -291,7 +291,8 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint1= 6_t vf, uint8_t on) > if (on > 1) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_strip_queue_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_strip_queue_set =3D=3D NULL) > + return -ENOTSUP; >=20 > /* The PF has 128 queue pairs and in SRIOV configuration > * those queues will be assigned to VF's, so RXDCTL > diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio= _ethdev.c > index 90ffe31b9f..ebcfbb1a5c 100644 > --- a/drivers/net/liquidio/lio_ethdev.c > +++ b/drivers/net/liquidio/lio_ethdev.c > @@ -281,7 +281,8 @@ lio_dev_xstats_reset(struct rte_eth_dev *eth_dev) > } >=20 > /* clear stored per queue stats */ > - RTE_FUNC_PTR_OR_ERR_RET(*eth_dev->dev_ops->stats_reset, 0); > + if (*eth_dev->dev_ops->stats_reset =3D=3D NULL) > + return 0; > return (*eth_dev->dev_ops->stats_reset)(eth_dev); > } >=20 > diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_r= awdev.c > index 78a7123528..3b616c45ff 100644 > --- a/drivers/raw/ifpga/ifpga_rawdev.c > +++ b/drivers/raw/ifpga/ifpga_rawdev.c > @@ -713,7 +713,8 @@ ifpga_rawdev_configure(const struct rte_rawdev *dev, > { > IFPGA_RAWDEV_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > return config ? 0 : 1; > } > @@ -726,7 +727,8 @@ ifpga_rawdev_start(struct rte_rawdev *dev) >=20 > IFPGA_RAWDEV_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > adapter =3D ifpga_rawdev_get_priv(dev); > if (!adapter) > diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleto= n/skeleton_rawdev.c > index 16ecae3d92..72d3b69d75 100644 > --- a/drivers/raw/skeleton/skeleton_rawdev.c > +++ b/drivers/raw/skeleton/skeleton_rawdev.c > @@ -76,7 +76,8 @@ static int skeleton_rawdev_configure(const struct rte_r= awdev *dev, >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > if (config =3D=3D NULL || config_size !=3D sizeof(*skeldev_conf)) { > SKELETON_PMD_ERR("Invalid configuration"); > @@ -106,7 +107,8 @@ static int skeleton_rawdev_start(struct rte_rawdev *d= ev) >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); >=20 > @@ -169,7 +171,8 @@ static int skeleton_rawdev_close(struct rte_rawdev *d= ev) >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); >=20 > @@ -212,7 +215,8 @@ static int skeleton_rawdev_reset(struct rte_rawdev *d= ev) >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); >=20 > @@ -295,7 +299,8 @@ static int skeleton_rawdev_queue_release(struct rte_r= awdev *dev, >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); >=20 > @@ -317,7 +322,8 @@ static uint16_t skeleton_rawdev_queue_count(struct rt= e_rawdev *dev) >=20 > SKELETON_PMD_FUNC_TRACE(); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); > return skeldev->num_queues; > @@ -468,7 +474,8 @@ static int skeleton_rawdev_firmware_status_get(struct= rte_rawdev *dev, >=20 > skeldev =3D skeleton_rawdev_get_priv(dev); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + if (dev =3D=3D NULL) > + return -EINVAL; >=20 > if (status_info) > memcpy(status_info, &skeldev->fw.firmware_state, > diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_comp= ressdev.c > index 22c438f2dd..5ddbc3f9c0 100644 > --- a/lib/compressdev/rte_compressdev.c > +++ b/lib/compressdev/rte_compressdev.c > @@ -315,7 +315,8 @@ rte_compressdev_queue_pairs_config(struct rte_compres= sdev *dev, >=20 > memset(&dev_info, 0, sizeof(struct rte_compressdev_info)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->dev_infos_get)(dev, &dev_info); >=20 > if ((dev_info.max_nb_queue_pairs !=3D 0) && > @@ -344,8 +345,8 @@ rte_compressdev_queue_pairs_config(struct rte_compres= sdev *dev, >=20 > qp =3D dev->data->queue_pairs; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_release, > - -ENOTSUP); > + if (*dev->dev_ops->queue_pair_release =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D nb_qpairs; i < old_nb_queues; i++) { > ret =3D (*dev->dev_ops->queue_pair_release)(dev, i); > @@ -395,8 +396,8 @@ rte_compressdev_queue_pairs_release(struct rte_compre= ssdev *dev) > COMPRESSDEV_LOG(DEBUG, "Free %d queues pairs on device %u", > dev->data->nb_queue_pairs, dev->data->dev_id); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_release, > - -ENOTSUP); > + if (*dev->dev_ops->queue_pair_release =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D 0; i < num_qps; i++) { > ret =3D (*dev->dev_ops->queue_pair_release)(dev, i); > @@ -430,7 +431,8 @@ rte_compressdev_configure(uint8_t dev_id, struct rte_= compressdev_config *config) > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > /* Setup new number of queue pairs and reconfigure device. */ > diag =3D rte_compressdev_queue_pairs_config(dev, config->nb_queue_pairs= , > @@ -460,7 +462,8 @@ rte_compressdev_start(uint8_t dev_id) >=20 > dev =3D &rte_comp_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP); > + if (*dev->dev_ops->dev_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started !=3D 0) { > COMPRESSDEV_LOG(ERR, > @@ -489,7 +492,8 @@ rte_compressdev_stop(uint8_t dev_id) >=20 > dev =3D &rte_comp_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop); > + if (*dev->dev_ops->dev_stop =3D=3D NULL) > + return; >=20 > if (dev->data->dev_started =3D=3D 0) { > COMPRESSDEV_LOG(ERR, > @@ -527,7 +531,8 @@ rte_compressdev_close(uint8_t dev_id) > if (retval < 0) > return retval; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > retval =3D (*dev->dev_ops->dev_close)(dev); >=20 > if (retval < 0) > @@ -565,7 +570,8 @@ rte_compressdev_queue_pair_setup(uint8_t dev_id, uint= 16_t queue_pair_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_setup, -ENOTSUP); > + if (*dev->dev_ops->queue_pair_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*dev->dev_ops->queue_pair_setup)(dev, queue_pair_id, > max_inflight_ops, socket_id); > @@ -611,7 +617,8 @@ rte_compressdev_stats_get(uint8_t dev_id, struct rte_= compressdev_stats *stats) > dev =3D &rte_comp_devices[dev_id]; > memset(stats, 0, sizeof(*stats)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP); > + if (*dev->dev_ops->stats_get =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->stats_get)(dev, stats); > return 0; > } > @@ -628,7 +635,8 @@ rte_compressdev_stats_reset(uint8_t dev_id) >=20 > dev =3D &rte_comp_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset); > + if (*dev->dev_ops->stats_reset =3D=3D NULL) > + return; > (*dev->dev_ops->stats_reset)(dev); > } >=20 > @@ -647,7 +655,8 @@ rte_compressdev_info_get(uint8_t dev_id, struct rte_c= ompressdev_info *dev_info) >=20 > memset(dev_info, 0, sizeof(struct rte_compressdev_info)); >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return; > (*dev->dev_ops->dev_infos_get)(dev, dev_info); >=20 > dev_info->driver_name =3D dev->device->driver->name; > @@ -666,7 +675,8 @@ rte_compressdev_private_xform_create(uint8_t dev_id, > if (xform =3D=3D NULL || priv_xform =3D=3D NULL || dev =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->private_xform_create, -ENOTSUP); > + if (*dev->dev_ops->private_xform_create =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->private_xform_create)(dev, xform, priv_xform); > if (ret < 0) { > COMPRESSDEV_LOG(ERR, > @@ -689,7 +699,8 @@ rte_compressdev_private_xform_free(uint8_t dev_id, vo= id *priv_xform) > if (dev =3D=3D NULL || priv_xform =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->private_xform_free, -ENOTSUP); > + if (*dev->dev_ops->private_xform_free =3D=3D NULL) > + return -ENOTSUP; > ret =3D dev->dev_ops->private_xform_free(dev, priv_xform); > if (ret < 0) { > COMPRESSDEV_LOG(ERR, > @@ -714,7 +725,8 @@ rte_compressdev_stream_create(uint8_t dev_id, > if (xform =3D=3D NULL || dev =3D=3D NULL || stream =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stream_create, -ENOTSUP); > + if (*dev->dev_ops->stream_create =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->stream_create)(dev, xform, stream); > if (ret < 0) { > COMPRESSDEV_LOG(ERR, > @@ -738,7 +750,8 @@ rte_compressdev_stream_free(uint8_t dev_id, void *str= eam) > if (dev =3D=3D NULL || stream =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stream_free, -ENOTSUP); > + if (*dev->dev_ops->stream_free =3D=3D NULL) > + return -ENOTSUP; > ret =3D dev->dev_ops->stream_free(dev, stream); > if (ret < 0) { > COMPRESSDEV_LOG(ERR, > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.= c > index 42f3221052..6250302f3b 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -978,7 +978,8 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev= *dev, uint16_t nb_qpairs, >=20 > memset(&dev_info, 0, sizeof(struct rte_cryptodev_info)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->dev_infos_get)(dev, &dev_info); >=20 > if (nb_qpairs > (dev_info.max_nb_queue_pairs)) { > @@ -1007,8 +1008,8 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptod= ev *dev, uint16_t nb_qpairs, >=20 > qp =3D dev->data->queue_pairs; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_release, > - -ENOTSUP); > + if (*dev->dev_ops->queue_pair_release =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D nb_qpairs; i < old_nb_queues; i++) { > ret =3D (*dev->dev_ops->queue_pair_release)(dev, i); > @@ -1041,7 +1042,8 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_= cryptodev_config *config) > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > rte_spinlock_lock(&rte_cryptodev_callback_lock); > cryptodev_cb_cleanup(dev); > @@ -1083,7 +1085,8 @@ rte_cryptodev_start(uint8_t dev_id) >=20 > dev =3D &rte_crypto_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP); > + if (*dev->dev_ops->dev_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started !=3D 0) { > CDEV_LOG_ERR("Device with dev_id=3D%" PRIu8 " already started", > @@ -1116,7 +1119,8 @@ rte_cryptodev_stop(uint8_t dev_id) >=20 > dev =3D &rte_crypto_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop); > + if (*dev->dev_ops->dev_stop =3D=3D NULL) > + return; >=20 > if (dev->data->dev_started =3D=3D 0) { > CDEV_LOG_ERR("Device with dev_id=3D%" PRIu8 " already stopped", > @@ -1163,7 +1167,8 @@ rte_cryptodev_close(uint8_t dev_id) > } > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > retval =3D (*dev->dev_ops->dev_close)(dev); > rte_cryptodev_trace_close(dev_id, retval); >=20 > @@ -1262,7 +1267,8 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint= 16_t queue_pair_id, > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_setup, -ENOTSUP); > + if (*dev->dev_ops->queue_pair_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > rte_cryptodev_trace_queue_pair_setup(dev_id, queue_pair_id, qp_conf); > return (*dev->dev_ops->queue_pair_setup)(dev, queue_pair_id, qp_conf, > @@ -1557,7 +1563,8 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_= cryptodev_stats *stats) > dev =3D &rte_crypto_devices[dev_id]; > memset(stats, 0, sizeof(*stats)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP); > + if (*dev->dev_ops->stats_get =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->stats_get)(dev, stats); > return 0; > } > @@ -1574,7 +1581,8 @@ rte_cryptodev_stats_reset(uint8_t dev_id) >=20 > dev =3D &rte_crypto_devices[dev_id]; >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset); > + if (*dev->dev_ops->stats_reset =3D=3D NULL) > + return; > (*dev->dev_ops->stats_reset)(dev); > } >=20 > @@ -1592,7 +1600,8 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_c= ryptodev_info *dev_info) >=20 > memset(dev_info, 0, sizeof(struct rte_cryptodev_info)); >=20 > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return; > (*dev->dev_ops->dev_infos_get)(dev, dev_info); >=20 > dev_info->driver_name =3D dev->device->driver->name; > @@ -1739,7 +1748,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id, > if (index >=3D sess->nb_drivers) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP)= ; > + if (*dev->dev_ops->sym_session_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > if (sess->sess_data[index].refcnt =3D=3D 0) { > ret =3D dev->dev_ops->sym_session_configure(dev, xforms, > @@ -1968,7 +1978,8 @@ rte_cryptodev_asym_session_create(uint8_t dev_id, > /* Clear device session pointer.*/ > memset(sess->sess_private_data, 0, session_priv_data_sz + sess->user_da= ta_sz); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->asym_session_configure, -ENOTSUP= ); > + if (*dev->dev_ops->asym_session_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > if (sess->sess_private_data[0] =3D=3D 0) { > ret =3D dev->dev_ops->asym_session_configure(dev, xforms, sess); > @@ -2007,7 +2018,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id, > if (--sess->sess_data[driver_id].refcnt !=3D 0) > return -EBUSY; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP); > + if (*dev->dev_ops->sym_session_clear =3D=3D NULL) > + return -ENOTSUP; >=20 > dev->dev_ops->sym_session_clear(dev, sess); >=20 > @@ -2054,7 +2066,8 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, voi= d *sess) > if (dev =3D=3D NULL || sess =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->asym_session_clear, -ENOTSUP); > + if (*dev->dev_ops->asym_session_clear =3D=3D NULL) > + return -ENOTSUP; >=20 > dev->dev_ops->asym_session_clear(dev, sess); >=20 > diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c > index 174d4c40ae..d575c14493 100644 > --- a/lib/dmadev/rte_dmadev.c > +++ b/lib/dmadev/rte_dmadev.c > @@ -420,7 +420,8 @@ rte_dma_info_get(int16_t dev_id, struct rte_dma_info = *dev_info) > if (!rte_dma_is_valid(dev_id) || dev_info =3D=3D NULL) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_info_get, -ENOTSUP); > + if (*dev->dev_ops->dev_info_get =3D=3D NULL) > + return -ENOTSUP; > memset(dev_info, 0, sizeof(struct rte_dma_info)); > ret =3D (*dev->dev_ops->dev_info_get)(dev, dev_info, > sizeof(struct rte_dma_info)); > @@ -472,7 +473,8 @@ rte_dma_configure(int16_t dev_id, const struct rte_dm= a_conf *dev_conf) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->dev_configure)(dev, dev_conf, > sizeof(struct rte_dma_conf)); > if (ret =3D=3D 0) > @@ -555,7 +557,8 @@ rte_dma_close(int16_t dev_id) > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->dev_close)(dev); > if (ret =3D=3D 0) > dma_release(dev); > @@ -648,7 +651,8 @@ rte_dma_vchan_setup(int16_t dev_id, uint16_t vchan, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vchan_setup, -ENOTSUP); > + if (*dev->dev_ops->vchan_setup =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->vchan_setup)(dev, vchan, conf, > sizeof(struct rte_dma_vchan_conf)); > } > @@ -668,7 +672,8 @@ rte_dma_stats_get(int16_t dev_id, uint16_t vchan, str= uct rte_dma_stats *stats) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP); > + if (*dev->dev_ops->stats_get =3D=3D NULL) > + return -ENOTSUP; > memset(stats, 0, sizeof(struct rte_dma_stats)); > return (*dev->dev_ops->stats_get)(dev, vchan, stats, > sizeof(struct rte_dma_stats)); > @@ -689,7 +694,8 @@ rte_dma_stats_reset(int16_t dev_id, uint16_t vchan) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset, -ENOTSUP); > + if (*dev->dev_ops->stats_reset =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->stats_reset)(dev, vchan); > } >=20 > @@ -706,7 +712,8 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, = enum rte_dma_vchan_status * > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vchan_status, -ENOTSUP); > + if (*dev->dev_ops->vchan_status =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->vchan_status)(dev, vchan, status); > } >=20 > diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h > index e7f992b734..e61d71959e 100644 > --- a/lib/dmadev/rte_dmadev.h > +++ b/lib/dmadev/rte_dmadev.h > @@ -860,7 +860,8 @@ rte_dma_copy(int16_t dev_id, uint16_t vchan, rte_iova= _t src, rte_iova_t dst, > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id) || length =3D=3D 0) > return -EINVAL; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->copy, -ENOTSUP); > + if (*obj->copy =3D=3D NULL) > + return -ENOTSUP; > #endif >=20 > return (*obj->copy)(obj->dev_private, vchan, src, dst, length, flags); > @@ -911,7 +912,8 @@ rte_dma_copy_sg(int16_t dev_id, uint16_t vchan, struc= t rte_dma_sge *src, > if (!rte_dma_is_valid(dev_id) || src =3D=3D NULL || dst =3D=3D NULL || > nb_src =3D=3D 0 || nb_dst =3D=3D 0) > return -EINVAL; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->copy_sg, -ENOTSUP); > + if (*obj->copy_sg =3D=3D NULL) > + return -ENOTSUP; > #endif >=20 > return (*obj->copy_sg)(obj->dev_private, vchan, src, dst, nb_src, > @@ -957,7 +959,8 @@ rte_dma_fill(int16_t dev_id, uint16_t vchan, uint64_t= pattern, > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id) || length =3D=3D 0) > return -EINVAL; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->fill, -ENOTSUP); > + if (*obj->fill =3D=3D NULL) > + return -ENOTSUP; > #endif >=20 > return (*obj->fill)(obj->dev_private, vchan, pattern, dst, length, > @@ -990,7 +993,8 @@ rte_dma_submit(int16_t dev_id, uint16_t vchan) > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id)) > return -EINVAL; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->submit, -ENOTSUP); > + if (*obj->submit =3D=3D NULL) > + return -ENOTSUP; > #endif >=20 > return (*obj->submit)(obj->dev_private, vchan); > @@ -1033,7 +1037,8 @@ rte_dma_completed(int16_t dev_id, uint16_t vchan, c= onst uint16_t nb_cpls, > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id) || nb_cpls =3D=3D 0) > return 0; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->completed, 0); > + if (*obj->completed =3D=3D NULL) > + return 0; > #endif >=20 > /* Ensure the pointer values are non-null to simplify drivers. > @@ -1095,7 +1100,8 @@ rte_dma_completed_status(int16_t dev_id, uint16_t v= chan, > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id) || nb_cpls =3D=3D 0 || status =3D=3D NULL= ) > return 0; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->completed_status, 0); > + if (*obj->completed_status =3D=3D NULL) > + return 0; > #endif >=20 > if (last_idx =3D=3D NULL) > @@ -1129,7 +1135,8 @@ rte_dma_burst_capacity(int16_t dev_id, uint16_t vch= an) > #ifdef RTE_DMADEV_DEBUG > if (!rte_dma_is_valid(dev_id)) > return 0; > - RTE_FUNC_PTR_OR_ERR_RET(*obj->burst_capacity, 0); > + if (*obj->burst_capacity =3D=3D NULL) > + return 0; > #endif > return (*obj->burst_capacity)(obj->dev_private, vchan); > } > diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h > index e6ff1218f9..2743c09320 100644 > --- a/lib/eal/include/rte_dev.h > +++ b/lib/eal/include/rte_dev.h > @@ -20,6 +20,7 @@ extern "C" { > #include >=20 > #include > +#include > #include > #include >=20 > @@ -37,12 +38,14 @@ typedef void (*rte_dev_event_cb_fn)(const char *devic= e_name, > void *cb_arg); >=20 > /* Macros to check for invalid function pointers */ > -#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \ > +#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) RTE_DEPRECATED(RTE_FUNC_PT= R_OR_ERR_RET) \ > +do { \ > if ((func) =3D=3D NULL) \ > return retval; \ > } while (0) >=20 > -#define RTE_FUNC_PTR_OR_RET(func) do { \ > +#define RTE_FUNC_PTR_OR_RET(func) RTE_DEPRECATED(RTE_FUNC_PTR_OR_RET) \ > +do { \ > if ((func) =3D=3D NULL) \ > return; \ > } while (0) > diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c > index a285f213f0..24a3969225 100644 > --- a/lib/ethdev/ethdev_driver.c > +++ b/lib/ethdev/ethdev_driver.c > @@ -264,7 +264,8 @@ rte_eth_dev_create(struct rte_device *device, const c= har *name, > struct rte_eth_dev *ethdev; > int retval; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*ethdev_init, -EINVAL); > + if (*ethdev_init =3D=3D NULL) > + return -EINVAL; >=20 > if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > ethdev =3D rte_eth_dev_allocate(name); > @@ -328,7 +329,8 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev, > if (!ethdev) > return -ENODEV; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL); > + if (*ethdev_uninit =3D=3D NULL) > + return -EINVAL; >=20 > ret =3D ethdev_uninit(ethdev); > if (ret) > @@ -558,8 +560,8 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, ui= nt16_t cur_queue, >=20 > /* No need to check the validity again. */ > dev =3D &rte_eth_devices[cur_port]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_queue_peer_bind, > - -ENOTSUP); > + if (*dev->dev_ops->hairpin_queue_peer_bind =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*dev->dev_ops->hairpin_queue_peer_bind)(dev, cur_queue, > peer_info, direction); > @@ -573,8 +575,8 @@ rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, = uint16_t cur_queue, >=20 > /* No need to check the validity again. */ > dev =3D &rte_eth_devices[cur_port]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_queue_peer_unbind, > - -ENOTSUP); > + if (*dev->dev_ops->hairpin_queue_peer_unbind =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*dev->dev_ops->hairpin_queue_peer_unbind)(dev, cur_queue, > direction); > @@ -594,8 +596,8 @@ rte_eth_hairpin_queue_peer_update(uint16_t peer_port,= uint16_t peer_queue, >=20 > /* No need to check the validity again. */ > dev =3D &rte_eth_devices[peer_port]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_queue_peer_update, > - -ENOTSUP); > + if (*dev->dev_ops->hairpin_queue_peer_update =3D=3D NULL) > + return -ENOTSUP; >=20 > return (*dev->dev_ops->hairpin_queue_peer_update)(dev, peer_queue, > cur_info, peer_info, direction); > diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h > index 0549842709..a268507801 100644 > --- a/lib/ethdev/ethdev_pci.h > +++ b/lib/ethdev/ethdev_pci.h > @@ -130,7 +130,8 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *= pci_dev, > if (!eth_dev) > return -ENOMEM; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL); > + if (*dev_init =3D=3D NULL) > + return -EINVAL; > ret =3D dev_init(eth_dev); > if (ret) > rte_eth_dev_release_port(eth_dev); > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c > index 1979dc0850..9d6f460726 100644 > --- a/lib/ethdev/rte_ethdev.c > +++ b/lib/ethdev/rte_ethdev.c > @@ -719,7 +719,8 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t= rx_queue_id) > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_start, -ENOTSUP); > + if (*dev->dev_ops->rx_queue_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (rte_eth_dev_is_rx_hairpin_queue(dev, rx_queue_id)) { > RTE_ETHDEV_LOG(INFO, > @@ -751,7 +752,8 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t = rx_queue_id) > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_stop, -ENOTSUP); > + if (*dev->dev_ops->rx_queue_stop =3D=3D NULL) > + return -ENOTSUP; >=20 > if (rte_eth_dev_is_rx_hairpin_queue(dev, rx_queue_id)) { > RTE_ETHDEV_LOG(INFO, > @@ -790,7 +792,8 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t= tx_queue_id) > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_start, -ENOTSUP); > + if (*dev->dev_ops->tx_queue_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (rte_eth_dev_is_tx_hairpin_queue(dev, tx_queue_id)) { > RTE_ETHDEV_LOG(INFO, > @@ -822,7 +825,8 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t = tx_queue_id) > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_stop, -ENOTSUP); > + if (*dev->dev_ops->tx_queue_stop =3D=3D NULL) > + return -ENOTSUP; >=20 > if (rte_eth_dev_is_tx_hairpin_queue(dev, tx_queue_id)) { > RTE_ETHDEV_LOG(INFO, > @@ -1077,7 +1081,8 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb= _rx_q, uint16_t nb_tx_q, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started) { > RTE_ETHDEV_LOG(ERR, > @@ -1447,7 +1452,8 @@ rte_eth_dev_start(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP); > + if (*dev->dev_ops->dev_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_configured =3D=3D 0) { > RTE_ETHDEV_LOG(INFO, > @@ -1493,7 +1499,8 @@ rte_eth_dev_start(uint16_t port_id) > } >=20 > if (dev->data->dev_conf.intr_conf.lsc =3D=3D 0) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); > + if (*dev->dev_ops->link_update =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->link_update)(dev, 0); > } >=20 > @@ -1513,7 +1520,8 @@ rte_eth_dev_stop(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_stop, -ENOTSUP); > + if (*dev->dev_ops->dev_stop =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started =3D=3D 0) { > RTE_ETHDEV_LOG(INFO, > @@ -1541,7 +1549,8 @@ rte_eth_dev_set_link_up(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_up, -ENOTSUP); > + if (*dev->dev_ops->dev_set_link_up =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->dev_set_link_up)(dev)); > } >=20 > @@ -1553,7 +1562,8 @@ rte_eth_dev_set_link_down(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_set_link_down, -ENOTSUP); > + if (*dev->dev_ops->dev_set_link_down =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->dev_set_link_down)(dev)); > } >=20 > @@ -1579,7 +1589,8 @@ rte_eth_dev_close(uint16_t port_id) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > *lasterr =3D (*dev->dev_ops->dev_close)(dev); > if (*lasterr !=3D 0) > lasterr =3D &binerr; > @@ -1599,7 +1610,8 @@ rte_eth_dev_reset(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_reset, -ENOTSUP); > + if (*dev->dev_ops->dev_reset =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D rte_eth_dev_stop(port_id); > if (ret !=3D 0) { > @@ -1624,7 +1636,8 @@ rte_eth_dev_is_removed(uint16_t port_id) > if (dev->state =3D=3D RTE_ETH_DEV_REMOVED) > return 1; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->is_removed, 0); > + if (*dev->dev_ops->is_removed =3D=3D NULL) > + return 0; >=20 > ret =3D dev->dev_ops->is_removed(dev); > if (ret !=3D 0) > @@ -1725,7 +1738,8 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t r= x_queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_setup, -ENOTSUP); > + if (*dev->dev_ops->rx_queue_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D rte_eth_dev_info_get(port_id, &dev_info); > if (ret !=3D 0) > @@ -1928,8 +1942,8 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, ui= nt16_t rx_queue_id, > ret =3D rte_eth_dev_hairpin_capability_get(port_id, &cap); > if (ret !=3D 0) > return ret; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_hairpin_queue_setup, > - -ENOTSUP); > + if (*dev->dev_ops->rx_hairpin_queue_setup =3D=3D NULL) > + return -ENOTSUP; > /* if nb_rx_desc is zero use max number of desc from the driver. */ > if (nb_rx_desc =3D=3D 0) > nb_rx_desc =3D cap.max_nb_desc; > @@ -1990,7 +2004,8 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t t= x_queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_setup, -ENOTSUP); > + if (*dev->dev_ops->tx_queue_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D rte_eth_dev_info_get(port_id, &dev_info); > if (ret !=3D 0) > @@ -2094,8 +2109,8 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, ui= nt16_t tx_queue_id, > ret =3D rte_eth_dev_hairpin_capability_get(port_id, &cap); > if (ret !=3D 0) > return ret; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_hairpin_queue_setup, > - -ENOTSUP); > + if (*dev->dev_ops->tx_hairpin_queue_setup =3D=3D NULL) > + return -ENOTSUP; > /* if nb_rx_desc is zero use max number of desc from the driver. */ > if (nb_tx_desc =3D=3D 0) > nb_tx_desc =3D cap.max_nb_desc; > @@ -2152,7 +2167,8 @@ rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_= port) > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_bind, -ENOTSUP); > + if (*dev->dev_ops->hairpin_bind =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->hairpin_bind)(dev, rx_port); > if (ret !=3D 0) > RTE_ETHDEV_LOG(ERR, "Failed to bind hairpin Tx %d" > @@ -2176,7 +2192,8 @@ rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t r= x_port) > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_unbind, -ENOTSUP); > + if (*dev->dev_ops->hairpin_unbind =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->hairpin_unbind)(dev, rx_port); > if (ret !=3D 0) > RTE_ETHDEV_LOG(ERR, "Failed to unbind hairpin Tx %d" > @@ -2210,8 +2227,8 @@ rte_eth_hairpin_get_peer_ports(uint16_t port_id, ui= nt16_t *peer_ports, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_get_peer_ports, > - -ENOTSUP); > + if (*dev->dev_ops->hairpin_get_peer_ports =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D (*dev->dev_ops->hairpin_get_peer_ports)(dev, peer_ports, > len, direction); > @@ -2282,7 +2299,8 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t = queue_id, uint32_t free_cnt) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_done_cleanup, -ENOTSUP); > + if (*dev->dev_ops->tx_done_cleanup =3D=3D NULL) > + return -ENOTSUP; >=20 > /* Call driver to free pending mbufs. */ > ret =3D (*dev->dev_ops->tx_done_cleanup)(dev->data->tx_queues[queue_id]= , > @@ -2302,7 +2320,8 @@ rte_eth_promiscuous_enable(uint16_t port_id) > if (dev->data->promiscuous =3D=3D 1) > return 0; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->promiscuous_enable, -ENOTSUP); > + if (*dev->dev_ops->promiscuous_enable =3D=3D NULL) > + return -ENOTSUP; >=20 > diag =3D (*dev->dev_ops->promiscuous_enable)(dev); > dev->data->promiscuous =3D (diag =3D=3D 0) ? 1 : 0; > @@ -2322,7 +2341,8 @@ rte_eth_promiscuous_disable(uint16_t port_id) > if (dev->data->promiscuous =3D=3D 0) > return 0; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->promiscuous_disable, -ENOTSUP); > + if (*dev->dev_ops->promiscuous_disable =3D=3D NULL) > + return -ENOTSUP; >=20 > dev->data->promiscuous =3D 0; > diag =3D (*dev->dev_ops->promiscuous_disable)(dev); > @@ -2355,7 +2375,8 @@ rte_eth_allmulticast_enable(uint16_t port_id) > if (dev->data->all_multicast =3D=3D 1) > return 0; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->allmulticast_enable, -ENOTSUP); > + if (*dev->dev_ops->allmulticast_enable =3D=3D NULL) > + return -ENOTSUP; > diag =3D (*dev->dev_ops->allmulticast_enable)(dev); > dev->data->all_multicast =3D (diag =3D=3D 0) ? 1 : 0; >=20 > @@ -2374,7 +2395,8 @@ rte_eth_allmulticast_disable(uint16_t port_id) > if (dev->data->all_multicast =3D=3D 0) > return 0; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->allmulticast_disable, -ENOTSUP); > + if (*dev->dev_ops->allmulticast_disable =3D=3D NULL) > + return -ENOTSUP; > dev->data->all_multicast =3D 0; > diag =3D (*dev->dev_ops->allmulticast_disable)(dev); > if (diag !=3D 0) > @@ -2411,7 +2433,8 @@ rte_eth_link_get(uint16_t port_id, struct rte_eth_l= ink *eth_link) > if (dev->data->dev_conf.intr_conf.lsc && dev->data->dev_started) > rte_eth_linkstatus_get(dev, eth_link); > else { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); > + if (*dev->dev_ops->link_update =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->link_update)(dev, 1); > *eth_link =3D dev->data->dev_link; > } > @@ -2436,7 +2459,8 @@ rte_eth_link_get_nowait(uint16_t port_id, struct rt= e_eth_link *eth_link) > if (dev->data->dev_conf.intr_conf.lsc && dev->data->dev_started) > rte_eth_linkstatus_get(dev, eth_link); > else { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); > + if (*dev->dev_ops->link_update =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->link_update)(dev, 0); > *eth_link =3D dev->data->dev_link; > } > @@ -2513,7 +2537,8 @@ rte_eth_stats_get(uint16_t port_id, struct rte_eth_= stats *stats) >=20 > memset(stats, 0, sizeof(*stats)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP); > + if (*dev->dev_ops->stats_get =3D=3D NULL) > + return -ENOTSUP; > stats->rx_nombuf =3D dev->data->rx_mbuf_alloc_failed; > return eth_err(port_id, (*dev->dev_ops->stats_get)(dev, stats)); > } > @@ -2527,7 +2552,8 @@ rte_eth_stats_reset(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset, -ENOTSUP); > + if (*dev->dev_ops->stats_reset =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->stats_reset)(dev); > if (ret !=3D 0) > return eth_err(port_id, ret); > @@ -3043,7 +3069,8 @@ eth_dev_set_queue_stats_mapping(uint16_t port_id, u= int16_t queue_id, > if (stat_idx >=3D RTE_ETHDEV_QUEUE_STAT_CNTRS) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_stats_mapping_set, -ENOTSU= P); > + if (*dev->dev_ops->queue_stats_mapping_set =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_stats_mapping_set) (dev, queue_id, stat_id= x, is_rx); > } >=20 > @@ -3080,7 +3107,8 @@ rte_eth_dev_fw_version_get(uint16_t port_id, char *= fw_version, size_t fw_size) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fw_version_get, -ENOTSUP); > + if (*dev->dev_ops->fw_version_get =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->fw_version_get)(dev, > fw_version, fw_size)); > } > @@ -3121,7 +3149,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_e= th_dev_info *dev_info) > RTE_ETHER_CRC_LEN; > dev_info->max_mtu =3D UINT16_MAX; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return -ENOTSUP; > diag =3D (*dev->dev_ops->dev_infos_get)(dev, dev_info); > if (diag !=3D 0) { > /* Cleanup already filled in device information */ > @@ -3182,7 +3211,8 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, = uint32_t ptype_mask, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0); > + if (*dev->dev_ops->dev_supported_ptypes_get =3D=3D NULL) > + return 0; > all_ptypes =3D (*dev->dev_ops->dev_supported_ptypes_get)(dev); >=20 > if (!all_ptypes) > @@ -3360,7 +3390,8 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu) >=20 > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mtu_set, -ENOTSUP); > + if (*dev->dev_ops->mtu_set =3D=3D NULL) > + return -ENOTSUP; >=20 > /* > * Check if the device supports dev_infos_get, if it does not > @@ -3413,7 +3444,8 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t = vlan_id, int on) > port_id, vlan_id); > return -EINVAL; > } > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_filter_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_filter_set =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D (*dev->dev_ops->vlan_filter_set)(dev, vlan_id, on); > if (ret =3D=3D 0) { > @@ -3448,7 +3480,8 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_i= d, uint16_t rx_queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_strip_queue_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_strip_queue_set =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on); >=20 > return 0; > @@ -3464,7 +3497,8 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id, > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_tpid_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_tpid_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->vlan_tpid_set)(dev, vlan_type, > tpid)); > } > @@ -3549,7 +3583,8 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int = offload_mask) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_offload_set =3D=3D NULL) > + return -ENOTSUP; > dev->data->dev_conf.rxmode.offloads =3D dev_offloads; > ret =3D (*dev->dev_ops->vlan_offload_set)(dev, mask); > if (ret) { > @@ -3594,7 +3629,8 @@ rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_= t pvid, int on) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_pvid_set, -ENOTSUP); > + if (*dev->dev_ops->vlan_pvid_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->vlan_pvid_set)(dev, pvid, on)); > } >=20 > @@ -3613,7 +3649,8 @@ rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct = rte_eth_fc_conf *fc_conf) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_get, -ENOTSUP); > + if (*dev->dev_ops->flow_ctrl_get =3D=3D NULL) > + return -ENOTSUP; > memset(fc_conf, 0, sizeof(*fc_conf)); > return eth_err(port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf)); > } > @@ -3638,7 +3675,8 @@ rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct = rte_eth_fc_conf *fc_conf) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->flow_ctrl_set, -ENOTSUP); > + if (*dev->dev_ops->flow_ctrl_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf)); > } >=20 > @@ -3899,7 +3937,8 @@ rte_eth_dev_rss_reta_update(uint16_t port_id, > return -ENOTSUP; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->reta_update, -ENOTSUP); > + if (*dev->dev_ops->reta_update =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->reta_update)(dev, reta_conf, > reta_size)); > } > @@ -3927,7 +3966,8 @@ rte_eth_dev_rss_reta_query(uint16_t port_id, > if (ret < 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->reta_query, -ENOTSUP); > + if (*dev->dev_ops->reta_query =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->reta_query)(dev, reta_conf, > reta_size)); > } > @@ -3971,7 +4011,8 @@ rte_eth_dev_rss_hash_update(uint16_t port_id, > return -ENOTSUP; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP); > + if (*dev->dev_ops->rss_hash_update =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev, > rss_conf)); > } > @@ -3992,7 +4033,8 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_conf_get, -ENOTSUP); > + if (*dev->dev_ops->rss_hash_conf_get =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, > rss_conf)); > } > @@ -4018,7 +4060,8 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_port_add, -ENOTSUP); > + if (*dev->dev_ops->udp_tunnel_port_add =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, > udp_tunnel)); > } > @@ -4044,7 +4087,8 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id= , > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->udp_tunnel_port_del, -ENOTSUP); > + if (*dev->dev_ops->udp_tunnel_port_del =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, > udp_tunnel)); > } > @@ -4057,7 +4101,8 @@ rte_eth_led_on(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_led_on, -ENOTSUP); > + if (*dev->dev_ops->dev_led_on =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->dev_led_on)(dev)); > } >=20 > @@ -4069,7 +4114,8 @@ rte_eth_led_off(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_led_off, -ENOTSUP); > + if (*dev->dev_ops->dev_led_off =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->dev_led_off)(dev)); > } >=20 > @@ -4091,7 +4137,8 @@ rte_eth_fec_get_capability(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fec_get_capability, -ENOTSUP); > + if (*dev->dev_ops->fec_get_capability =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->fec_get_capability)(dev, speed_fec_capa, num); >=20 > return ret; > @@ -4112,7 +4159,8 @@ rte_eth_fec_get(uint16_t port_id, uint32_t *fec_cap= a) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fec_get, -ENOTSUP); > + if (*dev->dev_ops->fec_get =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->fec_get)(dev, fec_capa)); > } >=20 > @@ -4124,7 +4172,8 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa= ) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fec_set, -ENOTSUP); > + if (*dev->dev_ops->fec_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa)); > } >=20 > @@ -4173,7 +4222,8 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct r= te_ether_addr *addr, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_add, -ENOTSUP); > + if (*dev->dev_ops->mac_addr_add =3D=3D NULL) > + return -ENOTSUP; >=20 > if (rte_is_zero_ether_addr(addr)) { > RTE_ETHDEV_LOG(ERR, "Port %u: Cannot add NULL MAC address\n", > @@ -4231,7 +4281,8 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struc= t rte_ether_addr *addr) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_remove, -ENOTSUP); > + if (*dev->dev_ops->mac_addr_remove =3D=3D NULL) > + return -ENOTSUP; >=20 > index =3D eth_dev_get_mac_addr_index(port_id, addr); > if (index =3D=3D 0) { > @@ -4273,7 +4324,8 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, = struct rte_ether_addr *addr) > if (!rte_is_valid_assigned_ether_addr(addr)) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_set, -ENOTSUP); > + if (*dev->dev_ops->mac_addr_set =3D=3D NULL) > + return -ENOTSUP; >=20 > ret =3D (*dev->dev_ops->mac_addr_set)(dev, addr); > if (ret < 0) > @@ -4359,7 +4411,8 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, str= uct rte_ether_addr *addr, > } > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->uc_hash_table_set, -ENOTSUP); > + if (*dev->dev_ops->uc_hash_table_set =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->uc_hash_table_set)(dev, addr, on); > if (ret =3D=3D 0) { > /* Update address in NIC data structure */ > @@ -4382,7 +4435,8 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id,= uint8_t on) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->uc_all_hash_table_set, -ENOTSUP)= ; > + if (*dev->dev_ops->uc_all_hash_table_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, > on)); > } > @@ -4418,7 +4472,8 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, = uint16_t queue_idx, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_queue_rate_limit, -ENOTSUP); > + if (*dev->dev_ops->set_queue_rate_limit =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->set_queue_rate_limit)(dev, > queue_idx, tx_rate)); > } > @@ -4444,7 +4499,8 @@ int rte_eth_rx_avail_thresh_set(uint16_t port_id, u= int16_t queue_id, > port_id); > return -EINVAL; > } > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_avail_thresh_set, -ENOT= SUP); > + if (*dev->dev_ops->rx_queue_avail_thresh_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_set)(dev, > queue_id, avail_thresh)); > } > @@ -4462,7 +4518,8 @@ int rte_eth_rx_avail_thresh_query(uint16_t port_id,= uint16_t *queue_id, > if (*queue_id >=3D dev->data->nb_rx_queues) > *queue_id =3D 0; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_avail_thresh_query, -EN= OTSUP); > + if (*dev->dev_ops->rx_queue_avail_thresh_query =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rx_queue_avail_thresh_query)(de= v, > queue_id, avail_thresh)); > } > @@ -4736,7 +4793,8 @@ rte_eth_dev_rx_intr_enable(uint16_t port_id, > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP); > + if (*dev->dev_ops->rx_queue_intr_enable =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queu= e_id)); > } >=20 > @@ -4754,7 +4812,8 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id, > if (ret !=3D 0) > return ret; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP)= ; > + if (*dev->dev_ops->rx_queue_intr_disable =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->rx_queue_intr_disable)(dev, que= ue_id)); > } >=20 > @@ -5018,7 +5077,8 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_= t queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rxq_info_get, -ENOTSUP); > + if (*dev->dev_ops->rxq_info_get =3D=3D NULL) > + return -ENOTSUP; >=20 > memset(qinfo, 0, sizeof(*qinfo)); > dev->dev_ops->rxq_info_get(dev, queue_id, qinfo); > @@ -5063,7 +5123,8 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_= t queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->txq_info_get, -ENOTSUP); > + if (*dev->dev_ops->txq_info_get =3D=3D NULL) > + return -ENOTSUP; >=20 > memset(qinfo, 0, sizeof(*qinfo)); > dev->dev_ops->txq_info_get(dev, queue_id, qinfo); > @@ -5093,7 +5154,8 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_= t queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_burst_mode_get, -ENOTSUP); > + if (*dev->dev_ops->rx_burst_mode_get =3D=3D NULL) > + return -ENOTSUP; > memset(mode, 0, sizeof(*mode)); > return eth_err(port_id, > dev->dev_ops->rx_burst_mode_get(dev, queue_id, mode)); > @@ -5120,7 +5182,8 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_= t queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_burst_mode_get, -ENOTSUP); > + if (*dev->dev_ops->tx_burst_mode_get =3D=3D NULL) > + return -ENOTSUP; > memset(mode, 0, sizeof(*mode)); > return eth_err(port_id, > dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode)); > @@ -5147,7 +5210,8 @@ rte_eth_get_monitor_addr(uint16_t port_id, uint16_t= queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_monitor_addr, -ENOTSUP); > + if (*dev->dev_ops->get_monitor_addr =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, > dev->dev_ops->get_monitor_addr(dev->data->rx_queues[queue_id], pmc)); > } > @@ -5162,7 +5226,8 @@ rte_eth_dev_set_mc_addr_list(uint16_t port_id, > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_mc_addr_list, -ENOTSUP); > + if (*dev->dev_ops->set_mc_addr_list =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, dev->dev_ops->set_mc_addr_list(dev, > mc_addr_set, nb_mc_addr)); > } > @@ -5175,7 +5240,8 @@ rte_eth_timesync_enable(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_enable, -ENOTSUP); > + if (*dev->dev_ops->timesync_enable =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_enable)(dev)); > } >=20 > @@ -5187,7 +5253,8 @@ rte_eth_timesync_disable(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_disable, -ENOTSUP); > + if (*dev->dev_ops->timesync_disable =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_disable)(dev)); > } >=20 > @@ -5207,7 +5274,8 @@ rte_eth_timesync_read_rx_timestamp(uint16_t port_id= , struct timespec *timestamp, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_read_rx_timestamp, -ENO= TSUP); > + if (*dev->dev_ops->timesync_read_rx_timestamp =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_read_rx_timestamp) > (dev, timestamp, flags)); > } > @@ -5228,7 +5296,8 @@ rte_eth_timesync_read_tx_timestamp(uint16_t port_id= , > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_read_tx_timestamp, -ENO= TSUP); > + if (*dev->dev_ops->timesync_read_tx_timestamp =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_read_tx_timestamp) > (dev, timestamp)); > } > @@ -5241,7 +5310,8 @@ rte_eth_timesync_adjust_time(uint16_t port_id, int6= 4_t delta) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_adjust_time, -ENOTSUP); > + if (*dev->dev_ops->timesync_adjust_time =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_adjust_time)(dev, delt= a)); > } >=20 > @@ -5260,7 +5330,8 @@ rte_eth_timesync_read_time(uint16_t port_id, struct= timespec *timestamp) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_read_time, -ENOTSUP); > + if (*dev->dev_ops->timesync_read_time =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_read_time)(dev, > timestamp)); > } > @@ -5280,7 +5351,8 @@ rte_eth_timesync_write_time(uint16_t port_id, const= struct timespec *timestamp) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timesync_write_time, -ENOTSUP); > + if (*dev->dev_ops->timesync_write_time =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->timesync_write_time)(dev, > timestamp)); > } > @@ -5299,7 +5371,8 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *cloc= k) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->read_clock, -ENOTSUP); > + if (*dev->dev_ops->read_clock =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->read_clock)(dev, clock)); > } >=20 > @@ -5318,7 +5391,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct r= te_dev_reg_info *info) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_reg, -ENOTSUP); > + if (*dev->dev_ops->get_reg =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->get_reg)(dev, info)); > } >=20 > @@ -5330,7 +5404,8 @@ rte_eth_dev_get_eeprom_length(uint16_t port_id) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_eeprom_length, -ENOTSUP); > + if (*dev->dev_ops->get_eeprom_length =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->get_eeprom_length)(dev)); > } >=20 > @@ -5349,7 +5424,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte= _dev_eeprom_info *info) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_eeprom, -ENOTSUP); > + if (*dev->dev_ops->get_eeprom =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->get_eeprom)(dev, info)); > } >=20 > @@ -5368,7 +5444,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte= _dev_eeprom_info *info) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_eeprom, -ENOTSUP); > + if (*dev->dev_ops->set_eeprom =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->set_eeprom)(dev, info)); > } >=20 > @@ -5388,7 +5465,8 @@ rte_eth_dev_get_module_info(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_info, -ENOTSUP); > + if (*dev->dev_ops->get_module_info =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->get_module_info)(dev, modinfo); > } >=20 > @@ -5422,7 +5500,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_eeprom, -ENOTSUP); > + if (*dev->dev_ops->get_module_eeprom =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->get_module_eeprom)(dev, info); > } >=20 > @@ -5444,7 +5523,8 @@ rte_eth_dev_get_dcb_info(uint16_t port_id, >=20 > memset(dcb_info, 0, sizeof(struct rte_eth_dcb_info)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_dcb_info, -ENOTSUP); > + if (*dev->dev_ops->get_dcb_info =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info)); > } >=20 > @@ -5500,7 +5580,8 @@ rte_eth_dev_hairpin_capability_get(uint16_t port_id= , > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_cap_get, -ENOTSUP); > + if (*dev->dev_ops->hairpin_cap_get =3D=3D NULL) > + return -ENOTSUP; > memset(cap, 0, sizeof(*cap)); > return eth_err(port_id, (*dev->dev_ops->hairpin_cap_get)(dev, cap)); > } > @@ -5775,7 +5856,8 @@ rte_eth_representor_info_get(uint16_t port_id, > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->representor_info_get, -ENOTSUP); > + if (*dev->dev_ops->representor_info_get =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info= )); > } >=20 > @@ -5799,7 +5881,8 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uin= t64_t *features) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_metadata_negotiate, -ENOTSUP)= ; > + if (*dev->dev_ops->rx_metadata_negotiate =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, > (*dev->dev_ops->rx_metadata_negotiate)(dev, features)); > } > @@ -5826,8 +5909,8 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_= id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->ip_reassembly_capability_get, > - -ENOTSUP); > + if (*dev->dev_ops->ip_reassembly_capability_get =3D=3D NULL) > + return -ENOTSUP; > memset(reassembly_capa, 0, sizeof(struct rte_eth_ip_reassembly_params))= ; >=20 > return eth_err(port_id, (*dev->dev_ops->ip_reassembly_capability_get) > @@ -5856,8 +5939,8 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->ip_reassembly_conf_get, > - -ENOTSUP); > + if (*dev->dev_ops->ip_reassembly_conf_get =3D=3D NULL) > + return -ENOTSUP; > memset(conf, 0, sizeof(struct rte_eth_ip_reassembly_params)); > return eth_err(port_id, > (*dev->dev_ops->ip_reassembly_conf_get)(dev, conf)); > @@ -5894,8 +5977,8 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->ip_reassembly_conf_set, > - -ENOTSUP); > + if (*dev->dev_ops->ip_reassembly_conf_set =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, > (*dev->dev_ops->ip_reassembly_conf_set)(dev, conf)); > } > @@ -5913,7 +5996,8 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE *file) > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_dev_priv_dump, -ENOTSUP); > + if (*dev->dev_ops->eth_dev_priv_dump =3D=3D NULL) > + return -ENOTSUP; > return eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file)); > } >=20 > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index de9e970d4d..41d37e41b5 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -5710,7 +5710,8 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t q= ueue_id) > qd =3D p->rxq.data[queue_id]; >=20 > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > - RTE_FUNC_PTR_OR_ERR_RET(*p->rx_queue_count, -ENOTSUP); > + if (*p->rx_queue_count =3D=3D NULL) > + return -ENOTSUP; > if (qd =3D=3D NULL) > return -EINVAL; >=20 > @@ -5784,7 +5785,8 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint= 16_t queue_id, > if (qd =3D=3D NULL) > return -ENODEV; > #endif > - RTE_FUNC_PTR_OR_ERR_RET(*p->rx_descriptor_status, -ENOTSUP); > + if (*p->rx_descriptor_status =3D=3D NULL) > + return -ENOTSUP; > return (*p->rx_descriptor_status)(qd, offset); > } >=20 > @@ -5854,7 +5856,8 @@ static inline int rte_eth_tx_descriptor_status(uint= 16_t port_id, > if (qd =3D=3D NULL) > return -ENODEV; > #endif > - RTE_FUNC_PTR_OR_ERR_RET(*p->tx_descriptor_status, -ENOTSUP); > + if (*p->tx_descriptor_status =3D=3D NULL) > + return -ENOTSUP; > return (*p->tx_descriptor_status)(qd, offset); > } >=20 > diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_e= vent_crypto_adapter.c > index 7c695176f4..4938b4ee07 100644 > --- a/lib/eventdev/rte_event_crypto_adapter.c > +++ b/lib/eventdev/rte_event_crypto_adapter.c > @@ -974,9 +974,8 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id, > adapter->mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW) || > (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW && > adapter->mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW)) { > - RTE_FUNC_PTR_OR_ERR_RET( > - *dev->dev_ops->crypto_adapter_queue_pair_add, > - -ENOTSUP); > + if (*dev->dev_ops->crypto_adapter_queue_pair_add =3D=3D NULL) > + return -ENOTSUP; > if (dev_info->qpairs =3D=3D NULL) { > dev_info->qpairs =3D > rte_zmalloc_socket(adapter->mem_name, > @@ -1076,9 +1075,8 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id,= uint8_t cdev_id, > if ((cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) || > (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW && > adapter->mode =3D=3D RTE_EVENT_CRYPTO_ADAPTER_OP_NEW)) { > - RTE_FUNC_PTR_OR_ERR_RET( > - *dev->dev_ops->crypto_adapter_queue_pair_del, > - -ENOTSUP); > + if (*dev->dev_ops->crypto_adapter_queue_pair_del =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->crypto_adapter_queue_pair_del)(dev, > dev_info->dev, > queue_pair_id); > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_e= vent_eth_rx_adapter.c > index bf8741d2ea..8e81cf774d 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -2655,8 +2655,8 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, > dev_info =3D &rx_adapter->eth_devices[eth_dev_id]; >=20 > if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_rx_adapter_queue_add, > - -ENOTSUP); > + if (*dev->dev_ops->eth_rx_adapter_queue_add =3D=3D NULL) > + return -ENOTSUP; > if (dev_info->rx_queue =3D=3D NULL) { > dev_info->rx_queue =3D > rte_zmalloc_socket(rx_adapter->mem_name, > @@ -2750,8 +2750,8 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint= 16_t eth_dev_id, > dev_info =3D &rx_adapter->eth_devices[eth_dev_id]; >=20 > if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_rx_adapter_queue_del, > - -ENOTSUP); > + if (*dev->dev_ops->eth_rx_adapter_queue_del =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->eth_rx_adapter_queue_del)(dev, > &rte_eth_devices[eth_dev_id], > rx_queue_id); > @@ -2861,9 +2861,8 @@ rte_event_eth_rx_adapter_vector_limits_get( > } >=20 > if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > - RTE_FUNC_PTR_OR_ERR_RET( > - *dev->dev_ops->eth_rx_adapter_vector_limits_get, > - -ENOTSUP); > + if (*dev->dev_ops->eth_rx_adapter_vector_limits_get =3D=3D NULL) > + return -ENOTSUP; > ret =3D dev->dev_ops->eth_rx_adapter_vector_limits_get( > dev, &rte_eth_devices[eth_port_id], limits); > } else { > diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c > index 1dc4f966be..79b905e9fc 100644 > --- a/lib/eventdev/rte_eventdev.c > +++ b/lib/eventdev/rte_eventdev.c > @@ -92,7 +92,8 @@ rte_event_dev_info_get(uint8_t dev_id, struct rte_event= _dev_info *dev_info) >=20 > memset(dev_info, 0, sizeof(struct rte_event_dev_info)); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->dev_infos_get)(dev, dev_info); >=20 > dev_info->dequeue_timeout_ns =3D dev->data->dev_conf.dequeue_timeout_ns= ; > @@ -216,7 +217,8 @@ event_dev_queue_config(struct rte_eventdev *dev, uint= 8_t nb_queues) >=20 > if (nb_queues !=3D 0) { > queues_cfg =3D dev->data->queues_cfg; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_release, -ENOTSUP); > + if (*dev->dev_ops->queue_release =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D nb_queues; i < old_nb_queues; i++) > (*dev->dev_ops->queue_release)(dev, i); > @@ -229,7 +231,8 @@ event_dev_queue_config(struct rte_eventdev *dev, uint= 8_t nb_queues) > sizeof(queues_cfg[0]) * new_qs); > } > } else { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_release, -ENOTSUP); > + if (*dev->dev_ops->queue_release =3D=3D NULL) > + return -ENOTSUP; >=20 > for (i =3D nb_queues; i < old_nb_queues; i++) > (*dev->dev_ops->queue_release)(dev, i); > @@ -254,7 +257,8 @@ event_dev_port_config(struct rte_eventdev *dev, uint8= _t nb_ports) > dev->data->dev_id); >=20 > if (nb_ports !=3D 0) { /* re-config */ > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP); > + if (*dev->dev_ops->port_release =3D=3D NULL) > + return -ENOTSUP; >=20 > ports =3D dev->data->ports; > ports_cfg =3D dev->data->ports_cfg; > @@ -279,7 +283,8 @@ event_dev_port_config(struct rte_eventdev *dev, uint8= _t nb_ports) > EVENT_QUEUE_SERVICE_PRIORITY_INVALID; > } > } else { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP); > + if (*dev->dev_ops->port_release =3D=3D NULL) > + return -ENOTSUP; >=20 > ports =3D dev->data->ports; > for (i =3D nb_ports; i < old_nb_ports; i++) { > @@ -303,8 +308,10 @@ rte_event_dev_configure(uint8_t dev_id, > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_eventdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_infos_get =3D=3D NULL) > + return -ENOTSUP; > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started) { > RTE_EDEV_LOG_ERR( > @@ -509,7 +516,8 @@ rte_event_queue_default_conf_get(uint8_t dev_id, uint= 8_t queue_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf, -ENOTSUP); > + if (*dev->dev_ops->queue_def_conf =3D=3D NULL) > + return -ENOTSUP; > memset(queue_conf, 0, sizeof(struct rte_event_queue_conf)); > (*dev->dev_ops->queue_def_conf)(dev, queue_id, queue_conf); > return 0; > @@ -595,11 +603,12 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue= _id, > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_setup, -ENOTSUP); > + if (*dev->dev_ops->queue_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > if (queue_conf =3D=3D NULL) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf, > - -ENOTSUP); > + if (*dev->dev_ops->queue_def_conf =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf); > queue_conf =3D &def_conf; > } > @@ -635,7 +644,8 @@ rte_event_port_default_conf_get(uint8_t dev_id, uint8= _t port_id, > return -EINVAL; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_def_conf, -ENOTSUP); > + if (*dev->dev_ops->port_def_conf =3D=3D NULL) > + return -ENOTSUP; > memset(port_conf, 0, sizeof(struct rte_event_port_conf)); > (*dev->dev_ops->port_def_conf)(dev, port_id, port_conf); > return 0; > @@ -706,11 +716,12 @@ rte_event_port_setup(uint8_t dev_id, uint8_t port_i= d, > return -EBUSY; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_setup, -ENOTSUP); > + if (*dev->dev_ops->port_setup =3D=3D NULL) > + return -ENOTSUP; >=20 > if (port_conf =3D=3D NULL) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_def_conf, > - -ENOTSUP); > + if (*dev->dev_ops->port_def_conf =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->port_def_conf)(dev, port_id, &def_conf); > port_conf =3D &def_conf; > } > @@ -896,7 +907,8 @@ rte_event_queue_attr_set(uint8_t dev_id, uint8_t queu= e_id, uint32_t attr_id, > return -ENOTSUP; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_attr_set, -ENOTSUP); > + if (*dev->dev_ops->queue_attr_set =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_attr_set)(dev, queue_id, attr_id, > attr_value); > } > @@ -1045,7 +1057,8 @@ rte_event_port_unlinks_in_progress(uint8_t dev_id, = uint8_t port_id) > * This allows PMDs which handle unlink synchronously to not implement > * this function at all. > */ > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_unlinks_in_progress, 0); > + if (*dev->dev_ops->port_unlinks_in_progress =3D=3D NULL) > + return 0; >=20 > return (*dev->dev_ops->port_unlinks_in_progress)(dev, > dev->data->ports[port_id]); > @@ -1087,7 +1100,8 @@ rte_event_dequeue_timeout_ticks(uint8_t dev_id, uin= t64_t ns, >=20 > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_eventdevs[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->timeout_ticks, -ENOTSUP); > + if (*dev->dev_ops->timeout_ticks =3D=3D NULL) > + return -ENOTSUP; >=20 > if (timeout_ticks =3D=3D NULL) > return -EINVAL; > @@ -1119,7 +1133,8 @@ rte_event_dev_dump(uint8_t dev_id, FILE *f) >=20 > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_eventdevs[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dump, -ENOTSUP); > + if (*dev->dev_ops->dump =3D=3D NULL) > + return -ENOTSUP; > if (f =3D=3D NULL) > return -EINVAL; >=20 > @@ -1285,7 +1300,8 @@ rte_event_dev_start(uint8_t dev_id) >=20 > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_eventdevs[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP); > + if (*dev->dev_ops->dev_start =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->data->dev_started !=3D 0) { > RTE_EDEV_LOG_ERR("Device with dev_id=3D%" PRIu8 "already started", > @@ -1331,7 +1347,8 @@ rte_event_dev_stop(uint8_t dev_id) >=20 > RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id); > dev =3D &rte_eventdevs[dev_id]; > - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop); > + if (*dev->dev_ops->dev_stop =3D=3D NULL) > + return; >=20 > if (dev->data->dev_started =3D=3D 0) { > RTE_EDEV_LOG_ERR("Device with dev_id=3D%" PRIu8 "already stopped", > @@ -1352,7 +1369,8 @@ rte_event_dev_close(uint8_t dev_id) >=20 > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_eventdevs[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; >=20 > /* Device must be stopped before it can be closed */ > if (dev->data->dev_started =3D=3D 1) { > diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.= c > index 2d36dee8f0..ac32c4bb72 100644 > --- a/lib/mempool/rte_mempool_ops.c > +++ b/lib/mempool/rte_mempool_ops.c > @@ -154,7 +154,8 @@ rte_mempool_ops_get_info(const struct rte_mempool *mp= , >=20 > ops =3D rte_mempool_get_ops(mp->ops_index); >=20 > - RTE_FUNC_PTR_OR_ERR_RET(ops->get_info, -ENOTSUP); > + if (ops->get_info =3D=3D NULL) > + return -ENOTSUP; > return ops->get_info(mp, info); > } >=20 > diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c > index 2f0a4f132e..e157d65332 100644 > --- a/lib/rawdev/rte_rawdev.c > +++ b/lib/rawdev/rte_rawdev.c > @@ -71,12 +71,14 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawde= v_info *dev_info, > int ret =3D 0; >=20 > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > - RTE_FUNC_PTR_OR_ERR_RET(dev_info, -EINVAL); > + if (dev_info =3D=3D NULL) > + return -EINVAL; >=20 > rawdev =3D &rte_rawdevs[dev_id]; >=20 > if (dev_info->dev_private !=3D NULL) { > - RTE_FUNC_PTR_OR_ERR_RET(*rawdev->dev_ops->dev_info_get, -ENOTSUP); > + if (*rawdev->dev_ops->dev_info_get =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*rawdev->dev_ops->dev_info_get)(rawdev, > dev_info->dev_private, > dev_private_size); > @@ -97,11 +99,13 @@ rte_rawdev_configure(uint16_t dev_id, struct rte_rawd= ev_info *dev_conf, > int diag; >=20 > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > - RTE_FUNC_PTR_OR_ERR_RET(dev_conf, -EINVAL); > + if (dev_conf =3D=3D NULL) > + return -EINVAL; >=20 > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; >=20 > if (dev->started) { > RTE_RDEV_ERR( > @@ -131,7 +135,8 @@ rte_rawdev_queue_conf_get(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf, -ENOTSUP); > + if (*dev->dev_ops->queue_def_conf =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_def_conf)(dev, queue_id, queue_conf, > queue_conf_size); > } > @@ -147,7 +152,8 @@ rte_rawdev_queue_setup(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_setup, -ENOTSUP); > + if (*dev->dev_ops->queue_setup =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_setup)(dev, queue_id, queue_conf, > queue_conf_size); > } > @@ -160,7 +166,8 @@ rte_rawdev_queue_release(uint16_t dev_id, uint16_t qu= eue_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_release, -ENOTSUP); > + if (*dev->dev_ops->queue_release =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_release)(dev, queue_id); > } >=20 > @@ -172,7 +179,8 @@ rte_rawdev_queue_count(uint16_t dev_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_count, -ENOTSUP); > + if (*dev->dev_ops->queue_count =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->queue_count)(dev); > } >=20 > @@ -186,7 +194,8 @@ rte_rawdev_get_attr(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->attr_get, -ENOTSUP); > + if (*dev->dev_ops->attr_get =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->attr_get)(dev, attr_name, attr_value); > } >=20 > @@ -200,7 +209,8 @@ rte_rawdev_set_attr(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->attr_set, -ENOTSUP); > + if (*dev->dev_ops->attr_set =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->attr_set)(dev, attr_name, attr_value); > } >=20 > @@ -215,7 +225,8 @@ rte_rawdev_enqueue_buffers(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->enqueue_bufs, -ENOTSUP); > + if (*dev->dev_ops->enqueue_bufs =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->enqueue_bufs)(dev, buffers, count, context); > } >=20 > @@ -230,7 +241,8 @@ rte_rawdev_dequeue_buffers(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dequeue_bufs, -ENOTSUP); > + if (*dev->dev_ops->dequeue_bufs =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dequeue_bufs)(dev, buffers, count, context); > } >=20 > @@ -242,7 +254,8 @@ rte_rawdev_dump(uint16_t dev_id, FILE *f) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dump, -ENOTSUP); > + if (*dev->dev_ops->dump =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dump)(dev, f); > } >=20 > @@ -251,7 +264,8 @@ xstats_get_count(uint16_t dev_id) > { > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get_names, -ENOTSUP); > + if (*dev->dev_ops->xstats_get_names =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->xstats_get_names)(dev, NULL, 0); > } >=20 > @@ -273,7 +287,8 @@ rte_rawdev_xstats_names_get(uint16_t dev_id, >=20 > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get_names, -ENOTSUP); > + if (*dev->dev_ops->xstats_get_names =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->xstats_get_names)(dev, xstats_names, size); > } >=20 > @@ -287,7 +302,8 @@ rte_rawdev_xstats_get(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -ENODEV); > const struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get, -ENOTSUP); > + if (*dev->dev_ops->xstats_get =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->xstats_get)(dev, ids, values, n); > } >=20 > @@ -306,7 +322,8 @@ rte_rawdev_xstats_by_name_get(uint16_t dev_id, > id =3D &temp; /* driver never gets a NULL value */ >=20 > /* implemented by driver */ > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_get_by_name, -ENOTSUP); > + if (*dev->dev_ops->xstats_get_by_name =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->xstats_get_by_name)(dev, name, id); > } >=20 > @@ -317,7 +334,8 @@ rte_rawdev_xstats_reset(uint16_t dev_id, > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->xstats_reset, -ENOTSUP); > + if (*dev->dev_ops->xstats_reset =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->xstats_reset)(dev, ids, nb_ids); > } >=20 > @@ -327,7 +345,8 @@ rte_rawdev_firmware_status_get(uint16_t dev_id, rte_r= awdev_obj_t status_info) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->firmware_status_get, -ENOTSUP); > + if (*dev->dev_ops->firmware_status_get =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->firmware_status_get)(dev, status_info); > } >=20 > @@ -337,7 +356,8 @@ rte_rawdev_firmware_version_get(uint16_t dev_id, rte_= rawdev_obj_t version_info) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->firmware_version_get, -ENOTSUP); > + if (*dev->dev_ops->firmware_version_get =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->firmware_version_get)(dev, version_info); > } >=20 > @@ -350,7 +370,8 @@ rte_rawdev_firmware_load(uint16_t dev_id, rte_rawdev_= obj_t firmware_image) > if (!firmware_image) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->firmware_load, -ENOTSUP); > + if (*dev->dev_ops->firmware_load =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->firmware_load)(dev, firmware_image); > } >=20 > @@ -360,7 +381,8 @@ rte_rawdev_firmware_unload(uint16_t dev_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->firmware_load, -ENOTSUP); > + if (*dev->dev_ops->firmware_load =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->firmware_unload)(dev); > } >=20 > @@ -370,7 +392,8 @@ rte_rawdev_selftest(uint16_t dev_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > struct rte_rawdev *dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_selftest, -ENOTSUP); > + if (*dev->dev_ops->dev_selftest =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dev_selftest)(dev_id); > } >=20 > @@ -435,7 +458,8 @@ rte_rawdev_close(uint16_t dev_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > /* Device must be stopped before it can be closed */ > if (dev->started =3D=3D 1) { > RTE_RDEV_ERR("Device %u must be stopped before closing", > @@ -454,7 +478,8 @@ rte_rawdev_reset(uint16_t dev_id) > RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_rawdevs[dev_id]; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_reset, -ENOTSUP); > + if (*dev->dev_ops->dev_reset =3D=3D NULL) > + return -ENOTSUP; > /* Reset is not dependent on state of the device */ > return (*dev->dev_ops->dev_reset)(dev); > } > diff --git a/lib/regexdev/rte_regexdev.c b/lib/regexdev/rte_regexdev.c > index 02a388bc5d..caec069182 100644 > --- a/lib/regexdev/rte_regexdev.c > +++ b/lib/regexdev/rte_regexdev.c > @@ -189,7 +189,8 @@ regexdev_info_get(uint8_t dev_id, struct rte_regexdev= _info *dev_info) > if (dev_info =3D=3D NULL) > return -EINVAL; > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_info_get, -ENOTSUP); > + if (*dev->dev_ops->dev_info_get =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dev_info_get)(dev, dev_info); >=20 > } > @@ -211,7 +212,8 @@ rte_regexdev_configure(uint8_t dev_id, const struct r= te_regexdev_config *cfg) > if (cfg =3D=3D NULL) > return -EINVAL; > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); > + if (*dev->dev_ops->dev_configure =3D=3D NULL) > + return -ENOTSUP; > if (dev->data->dev_started) { > RTE_REGEXDEV_LOG > (ERR, "Dev %u must be stopped to allow configuration\n", > @@ -301,7 +303,8 @@ rte_regexdev_queue_pair_setup(uint8_t dev_id, uint16_= t queue_pair_id, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_qp_setup, -ENOTSUP); > + if (*dev->dev_ops->dev_qp_setup =3D=3D NULL) > + return -ENOTSUP; > if (dev->data->dev_started) { > RTE_REGEXDEV_LOG > (ERR, "Dev %u must be stopped to allow configuration\n", > @@ -332,7 +335,8 @@ rte_regexdev_start(uint8_t dev_id) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP); > + if (*dev->dev_ops->dev_start =3D=3D NULL) > + return -ENOTSUP; > ret =3D (*dev->dev_ops->dev_start)(dev); > if (ret =3D=3D 0) > dev->data->dev_started =3D 1; > @@ -346,7 +350,8 @@ rte_regexdev_stop(uint8_t dev_id) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_stop, -ENOTSUP); > + if (*dev->dev_ops->dev_stop =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->dev_stop)(dev); > dev->data->dev_started =3D 0; > return 0; > @@ -359,7 +364,8 @@ rte_regexdev_close(uint8_t dev_id) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); > + if (*dev->dev_ops->dev_close =3D=3D NULL) > + return -ENOTSUP; > (*dev->dev_ops->dev_close)(dev); > dev->data->dev_started =3D 0; > dev->state =3D RTE_REGEXDEV_UNUSED; > @@ -374,7 +380,8 @@ rte_regexdev_attr_get(uint8_t dev_id, enum rte_regexd= ev_attr_id attr_id, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_attr_get, -ENOTSUP); > + if (*dev->dev_ops->dev_attr_get =3D=3D NULL) > + return -ENOTSUP; > if (attr_value =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d attribute value can't be NULL\n", > dev_id); > @@ -391,7 +398,8 @@ rte_regexdev_attr_set(uint8_t dev_id, enum rte_regexd= ev_attr_id attr_id, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_attr_set, -ENOTSUP); > + if (*dev->dev_ops->dev_attr_set =3D=3D NULL) > + return -ENOTSUP; > if (attr_value =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d attribute value can't be NULL\n", > dev_id); > @@ -409,7 +417,8 @@ rte_regexdev_rule_db_update(uint8_t dev_id, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_rule_db_update, -ENOTSUP); > + if (*dev->dev_ops->dev_rule_db_update =3D=3D NULL) > + return -ENOTSUP; > if (rules =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d rules can't be NULL\n", > dev_id); > @@ -425,8 +434,8 @@ rte_regexdev_rule_db_compile_activate(uint8_t dev_id) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_rule_db_compile_activate, > - -ENOTSUP); > + if (*dev->dev_ops->dev_rule_db_compile_activate =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dev_rule_db_compile_activate)(dev); > } >=20 > @@ -438,8 +447,8 @@ rte_regexdev_rule_db_import(uint8_t dev_id, const cha= r *rule_db, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_db_import, > - -ENOTSUP); > + if (*dev->dev_ops->dev_db_import =3D=3D NULL) > + return -ENOTSUP; > if (rule_db =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d rules can't be NULL\n", > dev_id); > @@ -455,8 +464,8 @@ rte_regexdev_rule_db_export(uint8_t dev_id, char *rul= e_db) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_db_export, > - -ENOTSUP); > + if (*dev->dev_ops->dev_db_export =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dev_db_export)(dev, rule_db); > } >=20 > @@ -468,8 +477,8 @@ rte_regexdev_xstats_names_get(uint8_t dev_id, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_xstats_names_get, > - -ENOTSUP); > + if (*dev->dev_ops->dev_xstats_names_get =3D=3D NULL) > + return -ENOTSUP; > if (xstats_map =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d xstats map can't be NULL\n", > dev_id); > @@ -486,7 +495,8 @@ rte_regexdev_xstats_get(uint8_t dev_id, const uint16_= t *ids, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_xstats_get, -ENOTSUP); > + if (*dev->dev_ops->dev_xstats_get =3D=3D NULL) > + return -ENOTSUP; > if (ids =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d ids can't be NULL\n", dev_id); > return -EINVAL; > @@ -506,8 +516,8 @@ rte_regexdev_xstats_by_name_get(uint8_t dev_id, const= char *name, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_xstats_by_name_get, > - -ENOTSUP); > + if (*dev->dev_ops->dev_xstats_by_name_get =3D=3D NULL) > + return -ENOTSUP; > if (name =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d name can't be NULL\n", dev_id); > return -EINVAL; > @@ -531,7 +541,8 @@ rte_regexdev_xstats_reset(uint8_t dev_id, const uint1= 6_t *ids, >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_xstats_reset, -ENOTSUP); > + if (*dev->dev_ops->dev_xstats_reset =3D=3D NULL) > + return -ENOTSUP; > if (ids =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d ids can't be NULL\n", dev_id); > return -EINVAL; > @@ -546,7 +557,8 @@ rte_regexdev_selftest(uint8_t dev_id) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_selftest, -ENOTSUP); > + if (*dev->dev_ops->dev_selftest =3D=3D NULL) > + return -ENOTSUP; > return (*dev->dev_ops->dev_selftest)(dev); > } >=20 > @@ -557,7 +569,8 @@ rte_regexdev_dump(uint8_t dev_id, FILE *f) >=20 > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > dev =3D &rte_regex_devices[dev_id]; > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_dump, -ENOTSUP); > + if (*dev->dev_ops->dev_dump =3D=3D NULL) > + return -ENOTSUP; > if (f =3D=3D NULL) { > RTE_REGEXDEV_LOG(ERR, "Dev %d file can't be NULL\n", dev_id); > return -EINVAL; > diff --git a/lib/regexdev/rte_regexdev.h b/lib/regexdev/rte_regexdev.h > index 3bce8090f6..6061e648b1 100644 > --- a/lib/regexdev/rte_regexdev.h > +++ b/lib/regexdev/rte_regexdev.h > @@ -1473,7 +1473,8 @@ rte_regexdev_enqueue_burst(uint8_t dev_id, uint16_t= qp_id, > struct rte_regexdev *dev =3D &rte_regex_devices[dev_id]; > #ifdef RTE_LIBRTE_REGEXDEV_DEBUG > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > - RTE_FUNC_PTR_OR_ERR_RET(*dev->enqueue, -ENOTSUP); > + if (*dev->enqueue =3D=3D NULL) > + return -ENOTSUP; > if (qp_id >=3D dev->data->dev_conf.nb_queue_pairs) { > RTE_REGEXDEV_LOG(ERR, "Invalid queue %d\n", qp_id); > return -EINVAL; > @@ -1532,7 +1533,8 @@ rte_regexdev_dequeue_burst(uint8_t dev_id, uint16_t= qp_id, > struct rte_regexdev *dev =3D &rte_regex_devices[dev_id]; > #ifdef RTE_LIBRTE_REGEXDEV_DEBUG > RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dequeue, -ENOTSUP); > + if (*dev->dequeue =3D=3D NULL) > + return -ENOTSUP; > if (qp_id >=3D dev->data->dev_conf.nb_queue_pairs) { > RTE_REGEXDEV_LOG(ERR, "Invalid queue %d\n", qp_id); > return -EINVAL; > diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c > index 4f5e4b4d49..1a2a408f0e 100644 > --- a/lib/security/rte_security.c > +++ b/lib/security/rte_security.c > @@ -131,7 +131,8 @@ __rte_security_set_pkt_metadata(struct rte_security_c= tx *instance, > RTE_PTR_OR_ERR_RET(instance, -EINVAL); > RTE_PTR_OR_ERR_RET(instance->ops, -EINVAL); > #endif > - RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->set_pkt_metadata, -ENOTSUP); > + if (*instance->ops->set_pkt_metadata =3D=3D NULL) > + return -ENOTSUP; > return instance->ops->set_pkt_metadata(instance->device, > sess, m, params); > } > @@ -145,7 +146,8 @@ __rte_security_get_userdata(struct rte_security_ctx *= instance, uint64_t md) > RTE_PTR_OR_ERR_RET(instance, NULL); > RTE_PTR_OR_ERR_RET(instance->ops, NULL); > #endif > - RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->get_userdata, NULL); > + if (*instance->ops->get_userdata =3D=3D NULL) > + return NULL; > if (instance->ops->get_userdata(instance->device, md, &userdata)) > return NULL; >=20 > diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c > index b2a2919fc0..a6ca785b29 100644 > --- a/lib/vhost/vdpa.c > +++ b/lib/vhost/vdpa.c > @@ -266,7 +266,8 @@ rte_vdpa_get_stats_names(struct rte_vdpa_device *dev, > if (!dev) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev->ops->get_stats_names, -ENOTSUP); > + if (dev->ops->get_stats_names =3D=3D NULL) > + return -ENOTSUP; >=20 > return dev->ops->get_stats_names(dev, stats_names, size); > } > @@ -278,7 +279,8 @@ rte_vdpa_get_stats(struct rte_vdpa_device *dev, uint1= 6_t qid, > if (!dev || !stats || !n) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev->ops->get_stats, -ENOTSUP); > + if (dev->ops->get_stats =3D=3D NULL) > + return -ENOTSUP; >=20 > return dev->ops->get_stats(dev, qid, stats, n); > } > @@ -289,7 +291,8 @@ rte_vdpa_reset_stats(struct rte_vdpa_device *dev, uin= t16_t qid) > if (!dev) > return -EINVAL; >=20 > - RTE_FUNC_PTR_OR_ERR_RET(dev->ops->reset_stats, -ENOTSUP); > + if (dev->ops->reset_stats =3D=3D NULL) > + return -ENOTSUP; >=20 > return dev->ops->reset_stats(dev, qid); > } > diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c > index 4ad28bac45..0ae059ad29 100644 > --- a/lib/vhost/vhost_user.c > +++ b/lib/vhost/vhost_user.c > @@ -3381,8 +3381,10 @@ int rte_vhost_host_notifier_ctrl(int vid, uint16_t= qid, bool enable) > q_last =3D qid; > } >=20 > - RTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_vfio_device_fd, -ENOTSUP); > - RTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_notify_area, -ENOTSUP); > + if (vdpa_dev->ops->get_vfio_device_fd =3D=3D NULL) > + return -ENOTSUP; > + if (vdpa_dev->ops->get_notify_area =3D=3D NULL) > + return -ENOTSUP; >=20 > vfio_device_fd =3D vdpa_dev->ops->get_vfio_device_fd(vid); > if (vfio_device_fd < 0) > -- > 2.37.2