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 556F043817; Thu, 4 Jan 2024 14:35:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F02E84064A; Thu, 4 Jan 2024 14:35:48 +0100 (CET) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by mails.dpdk.org (Postfix) with ESMTP id DCF5D402C7 for ; Thu, 4 Jan 2024 14:35:46 +0100 (CET) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-42836658198so2379721cf.0 for ; Thu, 04 Jan 2024 05:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704375346; x=1704980146; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=S+t00KbvIqOhqi0SGxHeDpp9lfIApZLnIKTLBqebylA=; b=l7e2CyCbHc5aErnESs/q76ZN24cE4Yn1l5KKJuVvg/upLRzqD+zFnFC3dkAe9TXCNp 96nN7J29TYmQAHaj3zE/AjTF3nyaHnvbtq0JUgiByfrrC4E0QkpvTBU3Y1TNL8BEA91M 4WUqGB30psYBTTOCbebDBd2kK1Hov87jSiyGKD8PGr3hMfqMGNHpjbUvfVhu3zQ85mXP BXQp82+oilARDPH7y1rTphweOWA5n6HwXYBnbdWoOrjgRmPosbFtvrCnqaxVvVizGHLM SzMY6IaQ/QH6D2W9nHtvxyVUpn7G55gIs019GnzRrNAArByfi20/Pi18qTpwAvgCgPF6 l6hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704375346; x=1704980146; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S+t00KbvIqOhqi0SGxHeDpp9lfIApZLnIKTLBqebylA=; b=uS3hoEZ47+Gkd1Hf37kOk/YPenDhKLtrhgzi1qxub6ofiPm7id3aa/irD1W+Kyaw97 O52iuTGwOVylQOtH/IRsPAVPDbcqVP5rjdVlXHoLiF/a2NmyhacijN3d1koRee/OH/Q4 0HroZPW0wpJJwpAlufAm2A6TP6ctX/Insih140SPbesIy11d85j/gDLP6yAcuYn7I8tj LJ//hf4uf2n+QkFpzPfavieHWHWtsq3R+TFeeVEgCffIe+JOuLa/U0bt5mt+yaHcd4CR 7AYOAcbRTzga8OOqsE1yRNrQQqLRgGOWV9X9L6IITQXW+jBc+fKW49O6HkwA4uokgII/ 4SPA== X-Gm-Message-State: AOJu0YwZ08W9nrqtFywY9lg/c5m2RbOUJw+8B7CO/a8yYIbkm+gczzvf D4HD4JoQwn5gh5DPtYJPwBPLlS/rU0XSp8Ay5bQ= X-Google-Smtp-Source: AGHT+IEAf54jdP6XDLpguEJlc1D9jvniYYE+X3jOkWpop2Bl285hur+z6QI5W0mBNCNYnxk00+4lqKa3XMerHfR3RXo= X-Received: by 2002:a05:622a:164c:b0:427:89da:d0df with SMTP id y12-20020a05622a164c00b0042789dad0dfmr719089qtj.116.1704375346101; Thu, 04 Jan 2024 05:35:46 -0800 (PST) MIME-Version: 1.0 References: <20231219172948.3909749-1-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Thu, 4 Jan 2024 19:05:19 +0530 Message-ID: Subject: Re: [dpdk-dev] [RFC] ethdev: support Tx queue free descriptor query To: "Dumitrescu, Cristian" Cc: "jerinj@marvell.com" , "dev@dpdk.org" , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , "ferruh.yigit@xilinx.com" , "ajit.khaparde@broadcom.com" , "aboyer@pensando.io" , "Xing, Beilei" , "Richardson, Bruce" , "chas3@att.com" , "chenbo.xia@intel.com" , "Loftus, Ciara" , "dsinghrawat@marvell.com" , "Czeck, Ed" , "evgenys@amazon.com" , "grive@u256.net" , "g.singh@nxp.com" , "zhouguoyang@huawei.com" , "Wang, Haiyue" , "hkalra@marvell.com" , "heinrich.kuhn@corigine.com" , "hemant.agrawal@nxp.com" , "hyonkim@cisco.com" , "igorch@amazon.com" , "irusskikh@marvell.com" , "jgrajcia@cisco.com" , "Singh, Jasvinder" , "jianwang@trustnetic.com" , "jiawenwu@trustnetic.com" , "Wu, Jingjing" , "johndale@cisco.com" , "john.miller@atomicrules.com" , "linville@tuxdriver.com" , "Wiles, Keith" , "kirankumark@marvell.com" , "oulijun@huawei.com" , "lironh@marvell.com" , "longli@microsoft.com" , "mw@semihalf.com" , "spinler@cesnet.cz" , "matan@nvidia.com" , "Peters, Matt" , "maxime.coquelin@redhat.com" , "mk@semihalf.com" , "humin29@huawei.com" , "pnalla@marvell.com" , "ndabilpuram@marvell.com" , "Yang, Qiming" , "Zhang, Qi Z" , "radhac@marvell.com" , "rahul.lakkireddy@chelsio.com" , "rmody@marvell.com" , "Xu, Rosen" , "sachin.saxena@oss.nxp.com" , "skoteshwar@marvell.com" , "shshaikh@marvell.com" , "shaibran@amazon.com" , "Siegel, Shepard" , "asomalap@amd.com" , "somnath.kotur@broadcom.com" , "sthemmin@microsoft.com" , "Webster, Steven" , "skori@marvell.com" , "mtetsuyah@gmail.com" , "vburru@marvell.com" , "viacheslavo@nvidia.com" , "Wang, Xiao W" , "cloud.wangxiaoyun@huawei.com" , "yisen.zhuang@huawei.com" , "Wang, Yong" , "xuanziyang2@huawei.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, Jan 4, 2024 at 6:46=E2=80=AFPM Dumitrescu, Cristian wrote: > > > > > -----Original Message----- > > From: jerinj@marvell.com > > Sent: Tuesday, December 19, 2023 5:30 PM > > To: dev@dpdk.org; Thomas Monjalon ; Ferruh Yigit > > ; Andrew Rybchenko > > Cc: ferruh.yigit@xilinx.com; ajit.khaparde@broadcom.com; > > aboyer@pensando.io; Xing, Beilei ; Richardson, B= ruce > > ; chas3@att.com; chenbo.xia@intel.com; Loft= us, > > Ciara ; dsinghrawat@marvell.com; Czeck, Ed > > ; evgenys@amazon.com; grive@u256.net; > > g.singh@nxp.com; zhouguoyang@huawei.com; Wang, Haiyue > > ; hkalra@marvell.com; heinrich.kuhn@corigine.com= ; > > hemant.agrawal@nxp.com; hyonkim@cisco.com; igorch@amazon.com; > > irusskikh@marvell.com; jgrajcia@cisco.com; Singh, Jasvinder > > ; jianwang@trustnetic.com; > > jiawenwu@trustnetic.com; Wu, Jingjing ; > > johndale@cisco.com; john.miller@atomicrules.com; linville@tuxdriver.com= ; > > Wiles, Keith ; kirankumark@marvell.com; > > oulijun@huawei.com; lironh@marvell.com; longli@microsoft.com; > > mw@semihalf.com; spinler@cesnet.cz; matan@nvidia.com; Peters, Matt > > ; maxime.coquelin@redhat.com; > > mk@semihalf.com; humin29@huawei.com; pnalla@marvell.com; > > ndabilpuram@marvell.com; Yang, Qiming ; Zhang, Q= i Z > > ; radhac@marvell.com; rahul.lakkireddy@chelsio.co= m; > > rmody@marvell.com; Xu, Rosen ; > > sachin.saxena@oss.nxp.com; skoteshwar@marvell.com; shshaikh@marvell.com= ; > > shaibran@amazon.com; Siegel, Shepard ; > > asomalap@amd.com; somnath.kotur@broadcom.com; > > sthemmin@microsoft.com; Webster, Steven ; > > skori@marvell.com; mtetsuyah@gmail.com; vburru@marvell.com; > > viacheslavo@nvidia.com; Wang, Xiao W ; > > cloud.wangxiaoyun@huawei.com; yisen.zhuang@huawei.com; Wang, Yong > > ; xuanziyang2@huawei.com; Dumitrescu, Cristian > > ; Jerin Jacob > > Subject: [dpdk-dev] [RFC] ethdev: support Tx queue free descriptor quer= y > > > > From: Jerin Jacob > > > > Introduce a new API to retrieve the number of available free descriptor= s > > in a Tx queue. Applications can leverage this API in the fast path to > > inspect the Tx queue occupancy and take appropriate actions based on th= e > > available free descriptors. > > > > A notable use case could be implementing Random Early Discard (RED) > > in software based on Tx queue occupancy. > > > > Signed-off-by: Jerin Jacob > > --- > > doc/guides/nics/features.rst | 10 ++++ > > doc/guides/nics/features/default.ini | 1 + > > lib/ethdev/ethdev_trace_points.c | 3 ++ > > lib/ethdev/rte_ethdev.h | 78 ++++++++++++++++++++++++++++ > > lib/ethdev/rte_ethdev_core.h | 7 ++- > > lib/ethdev/rte_ethdev_trace_fp.h | 8 +++ > > 6 files changed, 106 insertions(+), 1 deletion(-) > > Hi Jerin, Hi Cristian, > > I think having an API to get the number of free descriptors per queue is = a good idea. Why have it only for TX queues and not for RX queues as well? I see no harm in adding for Rx as well. I think, it is better to have separate API for each instead of adding argument as it is fast path API. If so, we could add a new API when there is any PMD implementation or need for this. > > Regards, > Cristian