[dpdk-dev] [RFC] ethdev: support Tx queue free descriptor query

Jerin Jacob jerinjacobk at gmail.com
Thu Jan 4 14:35:19 CET 2024


On Thu, Jan 4, 2024 at 6:46 PM Dumitrescu, Cristian
<cristian.dumitrescu at intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: jerinj at marvell.com <jerinj at marvell.com>
> > Sent: Tuesday, December 19, 2023 5:30 PM
> > To: dev at dpdk.org; Thomas Monjalon <thomas at monjalon.net>; Ferruh Yigit
> > <ferruh.yigit at amd.com>; Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> > Cc: ferruh.yigit at xilinx.com; ajit.khaparde at broadcom.com;
> > aboyer at pensando.io; Xing, Beilei <beilei.xing at intel.com>; Richardson, Bruce
> > <bruce.richardson at intel.com>; chas3 at att.com; chenbo.xia at intel.com; Loftus,
> > Ciara <ciara.loftus at intel.com>; dsinghrawat at marvell.com; Czeck, Ed
> > <ed.czeck at atomicrules.com>; evgenys at amazon.com; grive at u256.net;
> > g.singh at nxp.com; zhouguoyang at huawei.com; Wang, Haiyue
> > <haiyue.wang at intel.com>; hkalra at marvell.com; heinrich.kuhn at corigine.com;
> > hemant.agrawal at nxp.com; hyonkim at cisco.com; igorch at amazon.com;
> > irusskikh at marvell.com; jgrajcia at cisco.com; Singh, Jasvinder
> > <jasvinder.singh at intel.com>; jianwang at trustnetic.com;
> > jiawenwu at trustnetic.com; Wu, Jingjing <jingjing.wu at intel.com>;
> > johndale at cisco.com; john.miller at atomicrules.com; linville at tuxdriver.com;
> > Wiles, Keith <keith.wiles at intel.com>; kirankumark at marvell.com;
> > oulijun at huawei.com; lironh at marvell.com; longli at microsoft.com;
> > mw at semihalf.com; spinler at cesnet.cz; matan at nvidia.com; Peters, Matt
> > <matt.peters at windriver.com>; maxime.coquelin at redhat.com;
> > mk at semihalf.com; humin29 at huawei.com; pnalla at marvell.com;
> > ndabilpuram at marvell.com; Yang, Qiming <qiming.yang at intel.com>; Zhang, Qi Z
> > <qi.z.zhang at intel.com>; radhac at marvell.com; rahul.lakkireddy at chelsio.com;
> > rmody at marvell.com; Xu, Rosen <rosen.xu at intel.com>;
> > sachin.saxena at oss.nxp.com; skoteshwar at marvell.com; shshaikh at marvell.com;
> > shaibran at amazon.com; Siegel, Shepard <shepard.siegel at atomicrules.com>;
> > asomalap at amd.com; somnath.kotur at broadcom.com;
> > sthemmin at microsoft.com; Webster, Steven <steven.webster at windriver.com>;
> > skori at marvell.com; mtetsuyah at gmail.com; vburru at marvell.com;
> > viacheslavo at nvidia.com; Wang, Xiao W <xiao.w.wang at intel.com>;
> > cloud.wangxiaoyun at huawei.com; yisen.zhuang at huawei.com; Wang, Yong
> > <yongwang at vmware.com>; xuanziyang2 at huawei.com; Dumitrescu, Cristian
> > <cristian.dumitrescu at intel.com>; Jerin Jacob <jerinj at marvell.com>
> > Subject: [dpdk-dev] [RFC] ethdev: support Tx queue free descriptor query
> >
> > From: Jerin Jacob <jerinj at marvell.com>
> >
> > Introduce a new API to retrieve the number of available free descriptors
> > 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 the
> > 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 <jerinj at marvell.com>
> > ---
> >  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


More information about the dev mailing list