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 B567CA034F; Fri, 8 Oct 2021 10:17:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B5F440140; Fri, 8 Oct 2021 10:17:00 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 8904B40042 for ; Fri, 8 Oct 2021 10:16:58 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="213602648" X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="213602648" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 01:16:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,357,1624345200"; d="scan'208";a="484928459" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga007.fm.intel.com with ESMTP; 08 Oct 2021 01:16:56 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 8 Oct 2021 01:16:56 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 8 Oct 2021 01:16:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 8 Oct 2021 01:16:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ov0xerDkJ3PQe3uxjvr33BsfWfMjnevvNCLA9ulDoSq04iDo3OwvMwUxVntSgnTimrJ2/DmNJLuC8xONybV2rJAUAXLi8ieaSRbU5EDQogJ1EDYUbDvK7a4C5jM2Iq4110rAAu6t1MAUqh6oyNMj/TxjprmeBVB8iKahb4TazjYmog0vuYZfPhjx9KwBU13yNtFkay3rl13QQRmxJ/iJXzRVPxniGaycwbfslGV1OXcfrCOidCSjphKmwaWEt5zzQ/ZFgKw0IOgc2S/ow/KWy86mfBT5JNaPYDhT7QLlk3Q1xzTtXpDUCTNmZOcuQNJWtSYv3qcEKaPLvF+NJP/ifg== 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=QbplKii54X1j1AnSfh6RATgooiPFl6uTxJxmfcFAwgw=; b=cIkswdusrci+rhO5XRqL2K4qn3zmXVxmRX/EN2e5yiJhqsSyqoLC+BzqyzkW3xz/y/NE7/Wyigg2jeBVVEpTNMkpicKsuvWGgk2rQBVzddYyaAMGcU5CdtJ/QsVUp8jzqhVZ3DqCE4zcvgEOro7orTMOCxpanN60x6wq9j13PlUwrJOkum1/jDYBVKhNkfTs5/Dw1/OG4bQJU2kBFWnrLrRDj9rrEYxT0xacfGK2aaMb6zllXzdPf9xU+nBsVJYLiehnZd38wAv36fWiueNXMgEnlm46t/dMFYvc5PAjS13hZnZco6OL3pmFDPcpcS5jK0OCZPXycyJ4qkaeRIkr1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QbplKii54X1j1AnSfh6RATgooiPFl6uTxJxmfcFAwgw=; b=TvhJKcQhJP0uiiTCF6MmyDPJ+LLZ7kvnbgVqY/oWKvO0YKYLN4pZsrcti1ARyeDKfKL2gpFA57j5HXc3fF2UbLKPK/J+aNA9EiWWfazu7m5XNjieJ2gwKb4Nm67Mzk5ksH7f/JDiuJTspcv/5I9T/9Gbee2QH34Rpw6OMCFr2L8= Received: from BYAPR11MB2901.namprd11.prod.outlook.com (2603:10b6:a03:91::23) by BY5PR11MB4401.namprd11.prod.outlook.com (2603:10b6:a03:1be::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Fri, 8 Oct 2021 08:16:47 +0000 Received: from BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::954c:3fe0:a7af:7c96]) by BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::954c:3fe0:a7af:7c96%3]) with mapi id 15.20.4566.022; Fri, 8 Oct 2021 08:16:47 +0000 From: "Xu, Rosen" To: Xueming Li , "dev@dpdk.org" CC: "Yigit, Ferruh" , Andrew Rybchenko , "Singh, Aman Deep" , Thomas Monjalon , "John W. Linville" , "Loftus, Ciara" , "Zhang, Qi Z" , Hemant Agrawal , Sachin Saxena , Gagandeep Singh , "Richardson, Bruce" , Maxime Coquelin , "Xia, Chenbo" Thread-Topic: [PATCH v7 1/2] ethdev: make queue release callback optional Thread-Index: AQHXuqP4UPK0ecdPREmT0VN6FPa84qvIw9yQ Date: Fri, 8 Oct 2021 08:16:47 +0000 Message-ID: References: <20210727034134.20556-1-xuemingl@nvidia.com> <20211006111822.437298-1-xuemingl@nvidia.com> <20211006111822.437298-2-xuemingl@nvidia.com> In-Reply-To: <20211006111822.437298-2-xuemingl@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDliNmU0NmMtOGUyMi00YmZmLTg4NGYtZjg0MzRjNDMyZjc3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibUd3c3p2VGdrZU92cG1vWXFXeG5qMUpGcHVtRXJSdkdFcTFVcXladXlJUkN0QVZ0b1N5cHB0MXJlWld4YkF1USJ9 x-ctpclassification: CTP_NT authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4ab1f9f3-0483-4b0a-1977-08d98a33f933 x-ms-traffictypediagnostic: BY5PR11MB4401: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:126; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GRO2z7AC5/E4f3C0KLmB6lm9DSd0qC3wpBPeeIOesQZRQeBE0p9cdsQIwFEoBddnFUz7NdaYM1zTFhMbhfRC/ZLNihoupcN0TujGJz23Ubz9e7yulrFgB7c0gDg4KsuQVa3VSeCpI4pC8Q6XFa+qCmxAhN1ZrWJ4BVZ/BMEj7YSKOIv4Ku36S9WivTv2U8ZpIEmNZby8gxy8oAT5ASMQodYHu9MPp7vZXXBCwUmqzDpToBs724+UrMvZt+RF887flWr/BNXEZ9TYX194k+nH821fTxiqgpighVpKl3zsrmVhpeRUxr+HJ1GtB+A+sW7lzOrnYvwGv9wtk4zFQfoFerXVxBH3CqeMJBURB9pBfsuNtPb4TJdjEdH/e1em77DRRY8vlXBCUejwBSLWqLm5e9rSTmOukWIyvjCKt2vlzwYvju5ngUTdwOafBLibiq9HBjJl6ENLXgXseXkpeKx6I+e3tyv5RUvYUZpPfYY3vuOsoDPtg/Nj5iTI44/slZ5yS8OWHniABrMmoI+tsn+6zIbpdssRLiqgOf+ShmbO/53GKGT3DiWwCfSb0zyWITAJStkAWINrtaq+MTINtOYlk6oy7yTQFRzF2uMJTvDWyJrZcR6+nQHngVu/Fg5r/HbtbdNzs8f94S/HsAwOS6iccbmMj6RicnXy+Uz4qQayRww3fShjcxketMKWgKT3r1YkUtdyIf+u0SlM+1h78NS3Hw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2901.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(30864003)(66556008)(54906003)(66476007)(8676002)(110136005)(186003)(508600001)(66446008)(26005)(66946007)(64756008)(38100700002)(55016002)(76116006)(53546011)(71200400001)(6506007)(7696005)(2906002)(5660300002)(86362001)(9686003)(107886003)(4326008)(122000001)(52536014)(38070700005)(33656002)(8936002)(316002)(83380400001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ykCsvCL1motYZiqAPP72+3wjqx0knse5IZ/cWZNrsmFrb39atECYbbg1L5zb?= =?us-ascii?Q?e+lNjMwHLjhfpXzGKkcFXvgp+wVaxv7pGpSG0n+/FWuJGMpjEsbgTyRPwf1B?= =?us-ascii?Q?3IHq9I73KZwd9+BGEmwaT1N3RJT3wPRbHIMN+CBtSMzYahfQcggrZQZ/y4t9?= =?us-ascii?Q?ZErf9pxxPueAXwvoApP35DV3aF4ltZa/dz8fTMkvgX7UNh9KUPrJXa4tfSoP?= =?us-ascii?Q?V8pjHd18xo9kPDnlto2k0Q1wMVDEi5RriIknW+AAvf8Giz2lvOyBoOmm4aRN?= =?us-ascii?Q?+7B8sJuooVMjQkNj13gOITcQNtLCrfEo+WvKo/Cvcxf+rh63yGK6MnYLOYx+?= =?us-ascii?Q?AmhfRO9xvqDCZfhZlV1a71/dKLT/EyER3v6EREBraitcKSFXAKuB33AprRDh?= =?us-ascii?Q?NAITqZLhelYzpkReCwTNvdcJFbSJk737FG3gVS9iKXcyVgkOdHkmHOIokV33?= =?us-ascii?Q?uBNwafCGuHxwKor+Jnw0sY0KLozjgOeUniNU3rxjA39jSqGlZdwSrkLYOg3t?= =?us-ascii?Q?YCTuzN3fdGu2HojRw39NG4NhNgVXhndy8M4hOq3L248TGuZlhBemm05oZ0hj?= =?us-ascii?Q?Siv9w6/sVACD/uRyRx3h9P6F0Q5Il+DRwqAXt3+50ImIyMrGikpvB5xK3Ymy?= =?us-ascii?Q?6Bbaf983dkheIYKqRCemCPT3hLJibVcInJ1vZPAx3IMwzgy8VnIGG7cIjm19?= =?us-ascii?Q?wqAA1WBxtFWF7VMCmCMa0g06cjk+KBURBBfpgw2w9mZ6PYBb7+Dd2vdJAU7t?= =?us-ascii?Q?m1C0ovbElUSqyV4P9e1OcSKkvFwm6bwiH7gEe88p2Lc2Jy8To8MshmzSXcCx?= =?us-ascii?Q?ouKDCG0u1YEGLdwgCjYRFnxx2lFCFB/9KhByzl5cJ54KygXbR3RFrI0B7KWj?= =?us-ascii?Q?nVALs+tkNjbRaJ+12AJvz2VYeE01yuMVGu5riUHkwjMofnc7BIldN/+PFJxT?= =?us-ascii?Q?Z3hg53feO7mWBQUNDrLlXT38hRdPsT31bd/1KHqWQnIV87mjboiBcG2D+mQv?= =?us-ascii?Q?jYD2Cj6rtgjwXYmipr6IQF1S7hCjnx3NANwbnQs0ldnkvz08V/LJABtFKEwS?= =?us-ascii?Q?cY3M0z436SKd2iFDIwcWY/PVd8BeOGBTyG/N3MqZmU/uMgfbvaji0ig/gY/B?= =?us-ascii?Q?TcF4uXA3h5x6yqTBOz/VzYfnBJ3Q3q4vEYYjfNSgRl/u+htCLxj6EZbddtF3?= =?us-ascii?Q?6oCuS93EXkoGWaVoZL26ljoV/ZgZ2IlNMqns9G/6CJ8gREYsupzVbg77Xs4/?= =?us-ascii?Q?kN6Yznj1CbltIwTW+3QiQ85WkVJGmp7aWYdCbcHLet9oSetIxgXwVc06VOdK?= =?us-ascii?Q?nNi4a0Hr1OtkLlGTipGn6dtv?= 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: BYAPR11MB2901.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ab1f9f3-0483-4b0a-1977-08d98a33f933 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2021 08:16:47.6038 (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: l0Il6KVMAo5UaF6+2Fr6VxioK9aGKA1C3Ky7qJytiBvSi5SbWOE+kjAqoIwPsQOPsLCoqWscG4HsJ4I9qcaGjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4401 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v7 1/2] ethdev: make queue release callback optional X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi > -----Original Message----- > From: Xueming Li > Sent: Wednesday, October 06, 2021 19:18 > To: dev@dpdk.org > Cc: xuemingl@nvidia.com; Yigit, Ferruh ; Andrew > Rybchenko ; Singh, Aman Deep > ; Thomas Monjalon ; > John W. Linville ; Loftus, Ciara > ; Zhang, Qi Z ; Hemant > Agrawal ; Sachin Saxena > ; Xu, Rosen ; > Gagandeep Singh ; Richardson, Bruce > ; Maxime Coquelin > ; Xia, Chenbo > Subject: [PATCH v7 1/2] ethdev: make queue release callback optional >=20 > Some drivers don't need Rx and Tx queue release callback, make them > optional. Clean up empty queue release callbacks for some drivers. >=20 > Signed-off-by: Xueming Li > Reviewed-by: Andrew Rybchenko > Acked-by: Ferruh Yigit > Acked-by: Thomas Monjalon > --- > app/test/virtual_pmd.c | 12 ---- > drivers/net/af_packet/rte_eth_af_packet.c | 7 -- > drivers/net/af_xdp/rte_eth_af_xdp.c | 7 -- > drivers/net/dpaa/dpaa_ethdev.c | 13 ---- > drivers/net/dpaa2/dpaa2_ethdev.c | 7 -- > drivers/net/ipn3ke/ipn3ke_representor.c | 12 ---- > drivers/net/kni/rte_eth_kni.c | 7 -- > drivers/net/pcap/pcap_ethdev.c | 7 -- > drivers/net/pfe/pfe_ethdev.c | 14 ---- > drivers/net/ring/rte_eth_ring.c | 4 -- > drivers/net/virtio/virtio_ethdev.c | 8 --- > lib/ethdev/rte_ethdev.c | 86 ++++++++++------------- > 12 files changed, 36 insertions(+), 148 deletions(-) >=20 > diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index > 7036f401ed9..7e15b47eb0f 100644 > --- a/app/test/virtual_pmd.c > +++ b/app/test/virtual_pmd.c > @@ -163,16 +163,6 @@ virtual_ethdev_tx_queue_setup_fail(struct > rte_eth_dev *dev __rte_unused, > return -1; > } >=20 > -static void > -virtual_ethdev_rx_queue_release(void *q __rte_unused) -{ -} > - > -static void > -virtual_ethdev_tx_queue_release(void *q __rte_unused) -{ -} > - > static int > virtual_ethdev_link_update_success(struct rte_eth_dev *bonded_eth_dev, > int wait_to_complete __rte_unused) > @@ -243,8 +233,6 @@ static const struct eth_dev_ops > virtual_ethdev_default_dev_ops =3D { > .dev_infos_get =3D virtual_ethdev_info_get, > .rx_queue_setup =3D virtual_ethdev_rx_queue_setup_success, > .tx_queue_setup =3D virtual_ethdev_tx_queue_setup_success, > - .rx_queue_release =3D virtual_ethdev_rx_queue_release, > - .tx_queue_release =3D virtual_ethdev_tx_queue_release, > .link_update =3D virtual_ethdev_link_update_success, > .mac_addr_set =3D virtual_ethdev_mac_address_set, > .stats_get =3D virtual_ethdev_stats_get, diff --git > a/drivers/net/af_packet/rte_eth_af_packet.c > b/drivers/net/af_packet/rte_eth_af_packet.c > index fcd80903995..c73d2ec5c86 100644 > --- a/drivers/net/af_packet/rte_eth_af_packet.c > +++ b/drivers/net/af_packet/rte_eth_af_packet.c > @@ -427,11 +427,6 @@ eth_dev_close(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > -eth_queue_release(void *q __rte_unused) -{ -} > - > static int > eth_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) @@ -594,8 +589,6 @@ s= tatic > const struct eth_dev_ops ops =3D { > .promiscuous_disable =3D eth_dev_promiscuous_disable, > .rx_queue_setup =3D eth_rx_queue_setup, > .tx_queue_setup =3D eth_tx_queue_setup, > - .rx_queue_release =3D eth_queue_release, > - .tx_queue_release =3D eth_queue_release, > .link_update =3D eth_link_update, > .stats_get =3D eth_stats_get, > .stats_reset =3D eth_stats_reset, > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 9bea0a895a3..a619dd218d0 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -989,11 +989,6 @@ eth_dev_close(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > -eth_queue_release(void *q __rte_unused) -{ -} > - > static int > eth_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) > @@ -1474,8 +1469,6 @@ static const struct eth_dev_ops ops =3D { > .promiscuous_disable =3D eth_dev_promiscuous_disable, > .rx_queue_setup =3D eth_rx_queue_setup, > .tx_queue_setup =3D eth_tx_queue_setup, > - .rx_queue_release =3D eth_queue_release, > - .tx_queue_release =3D eth_queue_release, > .link_update =3D eth_link_update, > .stats_get =3D eth_stats_get, > .stats_reset =3D eth_stats_reset, > diff --git a/drivers/net/dpaa/dpaa_ethdev.c > b/drivers/net/dpaa/dpaa_ethdev.c index 36d8f9249df..2c12956ff6b 100644 > --- a/drivers/net/dpaa/dpaa_ethdev.c > +++ b/drivers/net/dpaa/dpaa_ethdev.c > @@ -1233,12 +1233,6 @@ dpaa_eth_eventq_detach(const struct > rte_eth_dev *dev, > return 0; > } >=20 > -static > -void dpaa_eth_rx_queue_release(void *rxq __rte_unused) -{ > - PMD_INIT_FUNC_TRACE(); > -} > - > static > int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, > uint16_t nb_desc __rte_unused, > @@ -1272,11 +1266,6 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev > *dev, uint16_t queue_idx, > return 0; > } >=20 > -static void dpaa_eth_tx_queue_release(void *txq __rte_unused) -{ > - PMD_INIT_FUNC_TRACE(); > -} > - > static uint32_t > dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) > { @@ -1571,8 +1560,6 @@ static struct eth_dev_ops dpaa_devops =3D { >=20 > .rx_queue_setup =3D dpaa_eth_rx_queue_setup, > .tx_queue_setup =3D dpaa_eth_tx_queue_setup, > - .rx_queue_release =3D dpaa_eth_rx_queue_release, > - .tx_queue_release =3D dpaa_eth_tx_queue_release, > .rx_burst_mode_get =3D dpaa_dev_rx_burst_mode_get, > .tx_burst_mode_get =3D dpaa_dev_tx_burst_mode_get, > .rxq_info_get =3D dpaa_rxq_info_get, > diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c > b/drivers/net/dpaa2/dpaa2_ethdev.c > index c12169578e2..48ffbf6c214 100644 > --- a/drivers/net/dpaa2/dpaa2_ethdev.c > +++ b/drivers/net/dpaa2/dpaa2_ethdev.c > @@ -1004,12 +1004,6 @@ dpaa2_dev_rx_queue_release(void *q > __rte_unused) > } > } >=20 > -static void > -dpaa2_dev_tx_queue_release(void *q __rte_unused) -{ > - PMD_INIT_FUNC_TRACE(); > -} > - > static uint32_t > dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) > { @@ -2427,7 +2421,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops =3D { > .rx_queue_setup =3D dpaa2_dev_rx_queue_setup, > .rx_queue_release =3D dpaa2_dev_rx_queue_release, > .tx_queue_setup =3D dpaa2_dev_tx_queue_setup, > - .tx_queue_release =3D dpaa2_dev_tx_queue_release, > .rx_burst_mode_get =3D dpaa2_dev_rx_burst_mode_get, > .tx_burst_mode_get =3D dpaa2_dev_tx_burst_mode_get, > .flow_ctrl_get =3D dpaa2_flow_ctrl_get, > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index 589d9fa5877..694435a4ae2 100644 > --- a/drivers/net/ipn3ke/ipn3ke_representor.c > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c > @@ -288,11 +288,6 @@ ipn3ke_rpst_rx_queue_setup(__rte_unused struct > rte_eth_dev *dev, > return 0; > } >=20 > -static void > -ipn3ke_rpst_rx_queue_release(__rte_unused void *rxq) -{ -} > - > static int > ipn3ke_rpst_tx_queue_setup(__rte_unused struct rte_eth_dev *dev, > __rte_unused uint16_t queue_idx, __rte_unused uint16_t nb_desc, > @@ -302,11 +297,6 @@ ipn3ke_rpst_tx_queue_setup(__rte_unused struct > rte_eth_dev *dev, > return 0; > } >=20 > -static void > -ipn3ke_rpst_tx_queue_release(__rte_unused void *txq) -{ -} > - > /* Statistics collected by each port, VSI, VEB, and S-channel */ struct > ipn3ke_rpst_eth_stats { > uint64_t tx_bytes; /* gotc */ > @@ -2865,9 +2855,7 @@ static const struct eth_dev_ops > ipn3ke_rpst_dev_ops =3D { > .tx_queue_start =3D ipn3ke_rpst_tx_queue_start, > .tx_queue_stop =3D ipn3ke_rpst_tx_queue_stop, > .rx_queue_setup =3D ipn3ke_rpst_rx_queue_setup, > - .rx_queue_release =3D ipn3ke_rpst_rx_queue_release, > .tx_queue_setup =3D ipn3ke_rpst_tx_queue_setup, > - .tx_queue_release =3D ipn3ke_rpst_tx_queue_release, >=20 > .dev_set_link_up =3D ipn3ke_rpst_dev_set_link_up, > .dev_set_link_down =3D ipn3ke_rpst_dev_set_link_down, > diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.= c > index 871d11c4133..cb9f7c8e820 100644 > --- a/drivers/net/kni/rte_eth_kni.c > +++ b/drivers/net/kni/rte_eth_kni.c > @@ -284,11 +284,6 @@ eth_kni_tx_queue_setup(struct rte_eth_dev *dev, > return 0; > } >=20 > -static void > -eth_kni_queue_release(void *q __rte_unused) -{ -} > - > static int > eth_kni_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) > @@ -362,8 +357,6 @@ static const struct eth_dev_ops eth_kni_ops =3D { > .dev_infos_get =3D eth_kni_dev_info, > .rx_queue_setup =3D eth_kni_rx_queue_setup, > .tx_queue_setup =3D eth_kni_tx_queue_setup, > - .rx_queue_release =3D eth_kni_queue_release, > - .tx_queue_release =3D eth_kni_queue_release, > .link_update =3D eth_kni_link_update, > .stats_get =3D eth_kni_stats_get, > .stats_reset =3D eth_kni_stats_reset, > diff --git a/drivers/net/pcap/pcap_ethdev.c > b/drivers/net/pcap/pcap_ethdev.c index 3566aea0105..d695c5eef7b 100644 > --- a/drivers/net/pcap/pcap_ethdev.c > +++ b/drivers/net/pcap/pcap_ethdev.c > @@ -857,11 +857,6 @@ eth_dev_close(struct rte_eth_dev *dev) > return 0; > } >=20 > -static void > -eth_queue_release(void *q __rte_unused) -{ -} > - > static int > eth_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) > @@ -1006,8 +1001,6 @@ static const struct eth_dev_ops ops =3D { > .tx_queue_start =3D eth_tx_queue_start, > .rx_queue_stop =3D eth_rx_queue_stop, > .tx_queue_stop =3D eth_tx_queue_stop, > - .rx_queue_release =3D eth_queue_release, > - .tx_queue_release =3D eth_queue_release, > .link_update =3D eth_link_update, > .stats_get =3D eth_stats_get, > .stats_reset =3D eth_stats_reset, > diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c > index feec4d10a26..4c7f568bf42 100644 > --- a/drivers/net/pfe/pfe_ethdev.c > +++ b/drivers/net/pfe/pfe_ethdev.c > @@ -494,18 +494,6 @@ pfe_rx_queue_setup(struct rte_eth_dev *dev, > uint16_t queue_idx, > return 0; > } >=20 > -static void > -pfe_rx_queue_release(void *q __rte_unused) -{ > - PMD_INIT_FUNC_TRACE(); > -} > - > -static void > -pfe_tx_queue_release(void *q __rte_unused) -{ > - PMD_INIT_FUNC_TRACE(); > -} > - > static int > pfe_tx_queue_setup(struct rte_eth_dev *dev, > uint16_t queue_idx, > @@ -759,9 +747,7 @@ static const struct eth_dev_ops ops =3D { > .dev_configure =3D pfe_eth_configure, > .dev_infos_get =3D pfe_eth_info, > .rx_queue_setup =3D pfe_rx_queue_setup, > - .rx_queue_release =3D pfe_rx_queue_release, > .tx_queue_setup =3D pfe_tx_queue_setup, > - .tx_queue_release =3D pfe_tx_queue_release, > .dev_supported_ptypes_get =3D pfe_supported_ptypes_get, > .link_update =3D pfe_eth_link_update, > .promiscuous_enable =3D pfe_promiscuous_enable, > diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_r= ing.c > index 1faf38a714c..0440019e07e 100644 > --- a/drivers/net/ring/rte_eth_ring.c > +++ b/drivers/net/ring/rte_eth_ring.c > @@ -225,8 +225,6 @@ eth_mac_addr_add(struct rte_eth_dev *dev > __rte_unused, > return 0; > } >=20 > -static void > -eth_queue_release(void *q __rte_unused) { ; } static int > eth_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) { return 0; } @@ -272,8 > +270,6 @@ static const struct eth_dev_ops ops =3D { > .dev_infos_get =3D eth_dev_info, > .rx_queue_setup =3D eth_rx_queue_setup, > .tx_queue_setup =3D eth_tx_queue_setup, > - .rx_queue_release =3D eth_queue_release, > - .tx_queue_release =3D eth_queue_release, > .link_update =3D eth_link_update, > .stats_get =3D eth_stats_get, > .stats_reset =3D eth_stats_reset, > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > index b60eeb24abe..6aa36b3f394 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -370,12 +370,6 @@ virtio_set_multiple_queues(struct rte_eth_dev *dev, > uint16_t nb_queues) > return 0; > } >=20 > -static void > -virtio_dev_queue_release(void *queue __rte_unused) -{ > - /* do nothing */ > -} > - > static uint16_t > virtio_get_nr_vq(struct virtio_hw *hw) > { > @@ -981,9 +975,7 @@ static const struct eth_dev_ops virtio_eth_dev_ops = =3D > { > .rx_queue_setup =3D virtio_dev_rx_queue_setup, > .rx_queue_intr_enable =3D virtio_dev_rx_queue_intr_enable, > .rx_queue_intr_disable =3D virtio_dev_rx_queue_intr_disable, > - .rx_queue_release =3D virtio_dev_queue_release, > .tx_queue_setup =3D virtio_dev_tx_queue_setup, > - .tx_queue_release =3D virtio_dev_queue_release, > /* collect stats per queue */ > .queue_stats_mapping_set =3D virtio_dev_queue_stats_mapping_set, > .vlan_filter_set =3D virtio_vlan_filter_set, > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index > daf5ca92422..4439ad336e2 100644 > --- a/lib/ethdev/rte_ethdev.c > +++ b/lib/ethdev/rte_ethdev.c > @@ -889,6 +889,32 @@ eth_err(uint16_t port_id, int ret) > return ret; > } >=20 > +static void > +eth_dev_rxq_release(struct rte_eth_dev *dev, uint16_t qid) { > + void **rxq =3D dev->data->rx_queues; > + > + if (rxq[qid] =3D=3D NULL) > + return; > + > + if (dev->dev_ops->rx_queue_release !=3D NULL) > + (*dev->dev_ops->rx_queue_release)(rxq[qid]); > + rxq[qid] =3D NULL; > +} > + > +static void > +eth_dev_txq_release(struct rte_eth_dev *dev, uint16_t qid) { > + void **txq =3D dev->data->tx_queues; > + > + if (txq[qid] =3D=3D NULL) > + return; > + > + if (dev->dev_ops->tx_queue_release !=3D NULL) > + (*dev->dev_ops->tx_queue_release)(txq[qid]); > + txq[qid] =3D NULL; > +} > + > static int > eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues) > { @@ -905,12 +931,10 @@ eth_dev_rx_queue_config(struct rte_eth_dev > *dev, uint16_t nb_queues) > return -(ENOMEM); > } > } else if (dev->data->rx_queues !=3D NULL && nb_queues !=3D 0) { /* re- > configure */ > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >rx_queue_release, -ENOTSUP); > + for (i =3D nb_queues; i < old_nb_queues; i++) > + eth_dev_rxq_release(dev, i); >=20 > rxq =3D dev->data->rx_queues; > - > - for (i =3D nb_queues; i < old_nb_queues; i++) > - (*dev->dev_ops->rx_queue_release)(rxq[i]); > rxq =3D rte_realloc(rxq, sizeof(rxq[0]) * nb_queues, > RTE_CACHE_LINE_SIZE); > if (rxq =3D=3D NULL) > @@ -925,12 +949,8 @@ eth_dev_rx_queue_config(struct rte_eth_dev *dev, > uint16_t nb_queues) > dev->data->rx_queues =3D rxq; >=20 > } else if (dev->data->rx_queues !=3D NULL && nb_queues =3D=3D 0) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >rx_queue_release, -ENOTSUP); > - > - rxq =3D dev->data->rx_queues; > - > for (i =3D nb_queues; i < old_nb_queues; i++) > - (*dev->dev_ops->rx_queue_release)(rxq[i]); > + eth_dev_rxq_release(dev, i); >=20 > rte_free(dev->data->rx_queues); > dev->data->rx_queues =3D NULL; > @@ -1145,12 +1165,10 @@ eth_dev_tx_queue_config(struct rte_eth_dev > *dev, uint16_t nb_queues) > return -(ENOMEM); > } > } else if (dev->data->tx_queues !=3D NULL && nb_queues !=3D 0) { /* re- > configure */ > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >tx_queue_release, -ENOTSUP); > + for (i =3D nb_queues; i < old_nb_queues; i++) > + eth_dev_txq_release(dev, i); >=20 > txq =3D dev->data->tx_queues; > - > - for (i =3D nb_queues; i < old_nb_queues; i++) > - (*dev->dev_ops->tx_queue_release)(txq[i]); > txq =3D rte_realloc(txq, sizeof(txq[0]) * nb_queues, > RTE_CACHE_LINE_SIZE); > if (txq =3D=3D NULL) > @@ -1165,12 +1183,8 @@ eth_dev_tx_queue_config(struct rte_eth_dev > *dev, uint16_t nb_queues) > dev->data->tx_queues =3D txq; >=20 > } else if (dev->data->tx_queues !=3D NULL && nb_queues =3D=3D 0) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >tx_queue_release, -ENOTSUP); > - > - txq =3D dev->data->tx_queues; > - > for (i =3D nb_queues; i < old_nb_queues; i++) > - (*dev->dev_ops->tx_queue_release)(txq[i]); > + eth_dev_txq_release(dev, i); >=20 > rte_free(dev->data->tx_queues); > dev->data->tx_queues =3D NULL; > @@ -2006,7 +2020,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, > uint16_t rx_queue_id, > struct rte_eth_dev *dev; > struct rte_eth_dev_info dev_info; > struct rte_eth_rxconf local_conf; > - void **rxq; >=20 > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev =3D &rte_eth_devices[port_id]; > @@ -2110,13 +2123,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, > uint16_t rx_queue_id, > RTE_ETH_QUEUE_STATE_STOPPED)) > return -EBUSY; >=20 > - rxq =3D dev->data->rx_queues; > - if (rxq[rx_queue_id]) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >rx_queue_release, > - -ENOTSUP); > - (*dev->dev_ops->rx_queue_release)(rxq[rx_queue_id]); > - rxq[rx_queue_id] =3D NULL; > - } > + eth_dev_rxq_release(dev, rx_queue_id); >=20 > if (rx_conf =3D=3D NULL) > rx_conf =3D &dev_info.default_rxconf; > @@ -2189,7 +2196,6 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, > uint16_t rx_queue_id, > int ret; > struct rte_eth_dev *dev; > struct rte_eth_hairpin_cap cap; > - void **rxq; > int i; > int count; >=20 > @@ -2246,13 +2252,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t > port_id, uint16_t rx_queue_id, > } > if (dev->data->dev_started) > return -EBUSY; > - rxq =3D dev->data->rx_queues; > - if (rxq[rx_queue_id] !=3D NULL) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >rx_queue_release, > - -ENOTSUP); > - (*dev->dev_ops->rx_queue_release)(rxq[rx_queue_id]); > - rxq[rx_queue_id] =3D NULL; > - } > + eth_dev_rxq_release(dev, rx_queue_id); > ret =3D (*dev->dev_ops->rx_hairpin_queue_setup)(dev, rx_queue_id, > nb_rx_desc, conf); > if (ret =3D=3D 0) > @@ -2269,7 +2269,6 @@ rte_eth_tx_queue_setup(uint16_t port_id, > uint16_t tx_queue_id, > struct rte_eth_dev *dev; > struct rte_eth_dev_info dev_info; > struct rte_eth_txconf local_conf; > - void **txq; > int ret; >=20 > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); @@ - > 2314,13 +2313,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t > tx_queue_id, > RTE_ETH_QUEUE_STATE_STOPPED)) > return -EBUSY; >=20 > - txq =3D dev->data->tx_queues; > - if (txq[tx_queue_id]) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >tx_queue_release, > - -ENOTSUP); > - (*dev->dev_ops->tx_queue_release)(txq[tx_queue_id]); > - txq[tx_queue_id] =3D NULL; > - } > + eth_dev_txq_release(dev, tx_queue_id); >=20 > if (tx_conf =3D=3D NULL) > tx_conf =3D &dev_info.default_txconf; > @@ -2368,7 +2361,6 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, > uint16_t tx_queue_id, { > struct rte_eth_dev *dev; > struct rte_eth_hairpin_cap cap; > - void **txq; > int i; > int count; > int ret; > @@ -2426,13 +2418,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t > port_id, uint16_t tx_queue_id, > } > if (dev->data->dev_started) > return -EBUSY; > - txq =3D dev->data->tx_queues; > - if (txq[tx_queue_id] !=3D NULL) { > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops- > >tx_queue_release, > - -ENOTSUP); > - (*dev->dev_ops->tx_queue_release)(txq[tx_queue_id]); > - txq[tx_queue_id] =3D NULL; > - } > + eth_dev_txq_release(dev, tx_queue_id); > ret =3D (*dev->dev_ops->tx_hairpin_queue_setup) > (dev, tx_queue_id, nb_tx_desc, conf); > if (ret =3D=3D 0) > -- > 2.33.0 Reviewed-by: Rosen Xu