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 BED10A0C41; Thu, 16 Sep 2021 10:09:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6ECA4003F; Thu, 16 Sep 2021 10:09:54 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by mails.dpdk.org (Postfix) with ESMTP id DB1184003E for ; Thu, 16 Sep 2021 10:09:52 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 35162580ECA; Thu, 16 Sep 2021 04:09:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 16 Sep 2021 04:09:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= bkpbl6N1sxCZ+ZjynfAjv2VhWE2TojkHLzXur3Sti1I=; b=Fv9tNvnlPz5tPr8H YKiR09d8Khmx8EWwgqlDW3syPJCNX+NQBx7QNeb8ra7P4s+5FM5XvFaX0uxxE0jj jkNIsefJq/l4RlJbsxt1S0aqGEU5k6M9jRdtT25pmWIDWE07iirkGEMs/qpmKugg /QbkZ0tX44kyQihO/NKadOOH/Wa7RY92uuYFyrjdH1u20qKTZgrco9q/GrjWwV5Q PgDY0VJinzTloSGWnsQ63DCIwFg56IRElX7nF7MebmCJ4XG4wPKtJzIZY7/6jIDB RITO2gnc2vwz80hrpbAa41egt/2m51+HZDssQ+VI9WBRoH51hm7WQ8HM13oL1sVs JvSq5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=bkpbl6N1sxCZ+ZjynfAjv2VhWE2TojkHLzXur3Sti 1I=; b=SlKdH1byZBY/j7dUwBGUkWW+7Md3k0rmZMJVBL/SeVkwMPsxWjVwFf9Pj YQPyBdAJFPsogs0N1JyeT15xCpt/1xTnRJeX0A0TzMAFXK8OmG1FRR78JEdYUHMK wnYpt3Gwy13DSxSLUMVIXtEgsjcl0GdtuHeTJCDOHsUHQVS3qgclXvOU3UH4BU0C 15p8uYNNLsyrXBBvSxmSTqCwqKcsSqg/Un5NTimdjmLpkryUqJ+bJHyUwoDSw6tk QTT9meUmhB1LrlpggEfPa7rsdjk2e+A9asTC4EGIFyFXJvWdiIiXCya+Mxhzhrg6 YKPONKSwQub7SjZERC+p793VDPW3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehfedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeeh teffvdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 04:09:43 -0400 (EDT) From: Thomas Monjalon To: xuemingl@nvidia.com Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , "Singh, Aman Deep" , "John W. Linville" , Ciara Loftus , Qi Zhang , Igor Russkikh , Steven Webster , Matt Peters , Somalapuram Amaranath , Rasesh Mody , Shahed Shaikh , Ajit Khaparde , Somnath Kotur , Chas Williams , "Min Hu (Connor)" , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Haiyue Wang , Marcin Wojtas , Michal Krawczyk , Shai Brandes , Evgeny Schemeilin , Igor Chauskin , Gagandeep Singh , John Daley , Hyong Youb Kim , Gaetan Rivet , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Yisen Zhuang , Lijun Ou , Beilei Xing , Jingjing Wu , Qiming Yang , Andrew Boyer , Rosen Xu , Shijith Thotton , Srisivasubramanian Srinivasan , Jakub Grajciar , Matan Azrad , Viacheslav Ovsiienko , Zyta Szpak , Liron Himi , Stephen Hemminger , Long Li , Martin Spinler , Heinrich Kuhn , Jiawen Wu , Tetsuya Mukawa , Harman Kalra , Jerin Jacob , Nalla Pradeep , Radha Mohan Chintakuntla , Veerasenareddy Burru , Devendra Singh Rawat , Bruce Richardson , Keith Wiles , Maciej Czekaj , Jian Wang , Maxime Coquelin , Chenbo Xia , Yong Wang Date: Thu, 16 Sep 2021 10:09:41 +0200 Message-ID: <16158406.yydg6pnXu9@thomas> In-Reply-To: <20210915130202.146589-1-xuemingl@nvidia.com> References: <20210727034134.20556-1-xuemingl@nvidia.com> <20210915130202.146589-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: change queue release callback 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" 15/09/2021 15:02, Xueming Li: > To align with other eth device queue configuration callbacks, cleanup > queue release callback API by changing RX and TX queue release callback > API parameter from queue object to device and queue index. Please split the explanation in multiple sentences, so it allows taking a breath while reading :) A good method is to start with explaining the status: most callbacks use queue ID queue release callbacks use queue object Then explain what is done: queue release callbacks are changed to use queue ID all drivers are adapted empty callbacks are removed in some drivers > This patch allows NULL callback to avoid defining empty callbacks. > > Signed-off-by: Xueming Li > Cc: Ferruh Yigit > Cc: Andrew Rybchenko > Cc: "Singh, Aman Deep" > --- > v2: included new NFP PMD driver > > This patch is a preparation of shared Rx queue feature since the rxq > object is subject to be used by PMD as shared rxq object which is shared > among rx queues in same share group: > https://mails.dpdk.org/archives/dev/2021-July/215575.html This note does not fully explain why using the queue ID helps. > --- a/lib/ethdev/ethdev_driver.h > +++ b/lib/ethdev/ethdev_driver.h > -typedef void (*eth_queue_release_t)(void *queue); > +typedef void (*eth_queue_release_t)(struct rte_eth_dev *dev, > + uint16_t rx_queue_id); > --- a/lib/ethdev/rte_ethdev.c > +++ b/lib/ethdev/rte_ethdev.c > - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_release, -ENOTSUP); Why removing this check? It is changing the behaviour. > - > + if (dev->dev_ops->rx_queue_release != NULL) > + for (i = nb_queues; i < old_nb_queues; i++) > + (*dev->dev_ops->rx_queue_release)(dev, i); > rxq = dev->data->rx_queues; > - > - for (i = nb_queues; i < old_nb_queues; i++) > - (*dev->dev_ops->rx_queue_release)(rxq[i]); > rxq = rte_realloc(rxq, sizeof(rxq[0]) * nb_queues, > RTE_CACHE_LINE_SIZE);