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 6BFB2A0C41; Wed, 6 Oct 2021 17:38:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 312924118E; Wed, 6 Oct 2021 17:38:15 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by mails.dpdk.org (Postfix) with ESMTP id E379B41175 for ; Wed, 6 Oct 2021 17:38:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ilscIHXBeJgsA80A1TP0d941fCJ7xVPnNmlS+C9XA8zNhJQdcptGwvNJGcwxb+hBhlRHSruJTntkF8zOgIWCZnDnIz6ZpZ9FeotFdFcvsphYIDOPXa9d0EN+6zEsqm/0Kc/F8BxSpFuuLeGVctWlX9HYGeCJKmK6yH14sgq3jFp9gsjcI72xF1QJyDciKUFuSYOoFt3Ju4rK6+pBBJBcfgDQXQnzOLfGhCYtku2VjvNQgPTRhMK8vE+z8d9CNjW1OCwfrJsGaC4pH0HUT+KksExKd6VR27HiX8ak7xhsXc93pkDxSlbsvAhzKR3SXE5BWkpmOdx+RwLPq6/+f2f0WQ== 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=pXsqGMNqxswRw/2iVq1N/fLIsK+SW6M5SUX8hePdVQA=; b=j8C5XLkAuM1puWvLj7YqJkHFe5wFru/wEl9jkpqgIPmqtfSYnzdM2590lhS4ZE211q5AXJWu7dghb1iZWEt1HJVPhxTFA+atEdxwn7g6fmK+4wBAnCbOp0rTiahj0eNd/QjNV65bIgXXfqYeJI2zJ/XnbuJ8P8ltY3kb1/yzVtknexA23hz0aUgXoA2oKGiEKg16XRul/X/UxRzpAHX309Qc6FK94ws/6DxESYCWSA213Gw+4AHDE7C6rzxp03Mm2Rf6yzHZvuEBtsNGK7/HkPugR1wqtrUUWMcGdONmn65s/v2Cn4FrKLTt2Y7Pm10vrqhPMqHFRyNNzYR6d6D2Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pXsqGMNqxswRw/2iVq1N/fLIsK+SW6M5SUX8hePdVQA=; b=hDJ7IHkvrzIepqUxkVcInrEywaE7D/rFFgTj3a799ntmM6TpaNN+1IAXZk34f5Sr93Qtq/QZVM07Jv9Te2NAviEkJBSyCCGrd+7vRE68hzdkeYVhz47J27uTKyCXRRPvPpXQjUm1nrReAJnC/X/IoEVQgmTPtP8Ni2+7w9x5K6k= Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8775.eurprd04.prod.outlook.com (2603:10a6:10:2e2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Wed, 6 Oct 2021 15:38:12 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4566.022; Wed, 6 Oct 2021 15:38:12 +0000 From: Hemant Agrawal To: Xueming Li , "dev@dpdk.org" CC: Ferruh Yigit , Andrew Rybchenko , Singh Aman Deep , Thomas Monjalon , "John W. Linville" , Ciara Loftus , Qi Zhang , "Sachin Saxena (OSS)" , Rosen Xu , Gagandeep Singh , Bruce Richardson , Maxime Coquelin , Chenbo Xia Thread-Topic: [PATCH v7 1/2] ethdev: make queue release callback optional Thread-Index: AQHXuqPyULtj9RXuXUuGiSHMsRKPeKvGGtdA Date: Wed, 6 Oct 2021 15:38:12 +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: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b5f57715-8bc9-4c0b-f3de-08d988df4eb5 x-ms-traffictypediagnostic: DU2PR04MB8775: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1850; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GXsm7iDykZfUs8pec4a0JWx7iXeYohDb1BUqQRJCuJP3dxEUKqxgKgLV8Yn6qt3XvIt7uxUTZKVJNIQN8tTgAqT/exnS7cpJmpC+Yq6CG/RQCh/0iKdYRnErz1FhAxqc276Oe8bd6wMHV7k5CqwqEQZrYdBQ3R7XbqOCVBuvc4yB27YeCOkfBAGt37bvnJiDj69kGDnEWzyrXjmcP0UGb7NIacYVnmqpw0OrrkBdUQnFykOAkvmYCQzn4Y1RUa3tdeOq4fVs+NcFn6DSGh1NJgcT9YxvsIWKkqyVaBRTs4RVED02E8YrFRV3bJleSdwfPVlyIULqH+I8mb+OMW/RqzY+IgZECZkH/T5Tx6v8ik7a2/zeKxjvfpUpDr/TUX+ybthKuSK6RtJnqepFP0hmOA4UwQ6F9ePMtsXCGU05myQaxbKkIhTjzKeTuv6I3sJ4k2EoF2W1svOZfOjyAtLfJjbsCHsfZARw+E3Pke5d1nHkd5+0oT18EVGmaCNkx1VVJJr9Ns5bKemnH9no2qUTHBhHvtGPdmLqrIaXT29Ee4t5uyD3NoAK5PE/o/nuL/3IdtNtnkSe1CC+4h7Zzrlild7GUJQqMzC7QvCXLrTyV0lhiLLVrLQ6i7d+WJxDix9QS1FqzcGlaCoTJJak9KwfJ+Eq6YVVqeeJWF44hItZsfi+oqov4rzD0jPFRWshiAomzj3IBdvjHwOXJgVgDuLZXw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(71200400001)(83380400001)(110136005)(7696005)(2906002)(508600001)(44832011)(52536014)(38070700005)(66946007)(66476007)(66556008)(66446008)(54906003)(6506007)(64756008)(7416002)(5660300002)(86362001)(55016002)(55236004)(9686003)(26005)(33656002)(316002)(4326008)(76116006)(8676002)(122000001)(53546011)(186003)(8936002)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TcBiXieHY9cO5bfCKq15b3LEoJUyHDFYWgNsp85yFELY+cnJ/G5QOCwc5Z65?= =?us-ascii?Q?YN9H9fT4S0kzGAAiuR9GKZrgle9wcmHwa3svoF5ehVwWe1pSyMi4iRqZfqRP?= =?us-ascii?Q?bXPQsZD7gIj2ZQAzoH3T2VceoIfkbD6hcQaWCwRBhDFPQRcrXy7rm6GGNhXA?= =?us-ascii?Q?WkT4XCCMZfLXrPp2cCTiYYssZ8JNOe+s9k5suEEeqak6cMnKIK++88Dk7lGD?= =?us-ascii?Q?jTMy8joSIJ3JG0xivGNvRz1CAlkz/Pjxmy/kZeUP6XBv+9qrp+Y/4+o3oVI6?= =?us-ascii?Q?r9KquPsSAAC/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?= =?us-ascii?Q?cSLnl3tjvDfl6JYjBsaYQ1nJQ9lvQhT6ijIVCqMfFx5WbF5yLjdKHF5Vvo8e?= =?us-ascii?Q?rjBjqEp4vstZloklelk36CZqz6gjYmTNK29/3veDJF8Ts+mrLfiP8NoLCZo2?= =?us-ascii?Q?nv7Cb0nLkcAIPxqyHcAAD4H2?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5f57715-8bc9-4c0b-f3de-08d988df4eb5 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2021 15:38:12.8630 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oiOLS9YC2lkfS1nPtaPohsmPKvTdWbz+j2Xn6rGMBFmG5hmvZpc1Iz5DwouKiqwx2zO0pIyQHiIHCGJ51ZZoCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8775 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" Acked-by: Hemant Agrawal > -----Original Message----- > From: Xueming Li > Sent: Wednesday, October 6, 2021 4:48 PM > To: dev@dpdk.org > Cc: xuemingl@nvidia.com; Ferruh Yigit ; Andrew > Rybchenko ; Singh Aman Deep > ; Thomas Monjalon ; > John W. Linville ; Ciara Loftus > ; Qi Zhang ; Hemant > Agrawal ; Sachin Saxena (OSS) > ; Rosen Xu ; > Gagandeep Singh ; Bruce Richardson > ; Maxime Coquelin > ; Chenbo Xia > Subject: [PATCH v7 1/2] ethdev: make queue release callback optional > Importance: High >=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, [Hemant]=20 Acked-by: Hemant Agrawal