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 C514E438A2; Fri, 12 Jan 2024 13:11:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F3064028C; Fri, 12 Jan 2024 13:11:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CDE1D4026E for ; Fri, 12 Jan 2024 13:11:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705061481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FtVmFynL1t86U+RqjEM2uo41xgDdghAvw+wsz3RLX2A=; b=YoSKrjfMbJ52YazvXgzI+ZkOJcCH8RIksQ9C9xkf8RL+b9dgUYiivbnQxlf9d3Vnn9uMR9 QbFX793gzdBEdTSFVMVeO53VVjo2qZAYiD9WhcvaDmJlZCvMbxyRD0ELNCzIH2iZKFX16L gcX8cd3cxErIXIFdPENXtEIcjY6cISk= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-mgrJYGfZOQqdBlow-E3Wxw-1; Fri, 12 Jan 2024 07:11:20 -0500 X-MC-Unique: mgrJYGfZOQqdBlow-E3Wxw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-50e5195db01so5071359e87.3 for ; Fri, 12 Jan 2024 04:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705061478; x=1705666278; 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=FtVmFynL1t86U+RqjEM2uo41xgDdghAvw+wsz3RLX2A=; b=EjwJ9Su8NBYRNshinzyft0nS7ukWi3SB7/argixKe/y7WRPdfT1h6VpsrjH2w+CLKe F1wtD1DoKwelInUv+xRJ5uSgUVaeP4QyRyP1F2+LxqKMY4+EAH3a9jRkEJ1+3QsUG+5j CKc+qqMSqyrXEHWaNesEGlQAfSgxfK/uQJpayTeFXE8r8Uqo53KiVLB0Satg7iOxFdyC 1nIQHWPViLKdTRTT21yc+phKNgyAzeMjpSWmMa7aCHgLPUFRTr6WpngbkFL2p5px30Q8 5Qv55fxPD2nFMWt2hrb70fZpt498RQLvhcbds8SRqnI71fmsTYWL2ZDNqhRll7KuFSEr ZI9w== X-Gm-Message-State: AOJu0YwS/XNkw6Zk6xcmMpL5er7QEVMD+wBYzxfPNQ5IVumhzoDt6jAQ A3GzL0hp4t2TooRIJZfQL099gu+a0On2+MTOw/3rZSKd2RaPOMX2ziV/bg8kSa16Ycg6KeLHCxZ INAeYIxBVIISw/q8ehQ7IPgmATFU= X-Received: by 2002:ac2:5e37:0:b0:50e:7fc8:f40c with SMTP id o23-20020ac25e37000000b0050e7fc8f40cmr528504lfg.54.1705061478684; Fri, 12 Jan 2024 04:11:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8UUGcI6xXqAe+RMQynM+Z24qsSg6kHME+w2Su34SwHykFxDV8Nau15WEIokf49YxoqEA4l11Jxr5mh05fGvY= X-Received: by 2002:ac2:5e37:0:b0:50e:7fc8:f40c with SMTP id o23-20020ac25e37000000b0050e7fc8f40cmr528459lfg.54.1705061478379; Fri, 12 Jan 2024 04:11:18 -0800 (PST) MIME-Version: 1.0 References: <20231219172948.3909749-1-jerinj@marvell.com> <20240111151745.3800170-1-jerinj@marvell.com> <5251f00a-a039-460d-805b-0325cfced32b@amd.com> In-Reply-To: <5251f00a-a039-460d-805b-0325cfced32b@amd.com> From: David Marchand Date: Fri, 12 Jan 2024 13:11:05 +0100 Message-ID: Subject: Re: [dpdk-dev] [v1] ethdev: support Tx queue used count To: Ferruh Yigit Cc: jerinj@marvell.com, dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko , ferruh.yigit@xilinx.com, ajit.khaparde@broadcom.com, aboyer@pensando.io, beilei.xing@intel.com, bruce.richardson@intel.com, chas3@att.com, chenbo.xia@intel.com, ciara.loftus@intel.com, dsinghrawat@marvell.com, ed.czeck@atomicrules.com, evgenys@amazon.com, grive@u256.net, g.singh@nxp.com, zhouguoyang@huawei.com, haiyue.wang@intel.com, hkalra@marvell.com, heinrich.kuhn@corigine.com, hemant.agrawal@nxp.com, hyonkim@cisco.com, igorch@amazon.com, irusskikh@marvell.com, jgrajcia@cisco.com, jasvinder.singh@intel.com, jianwang@trustnetic.com, jiawenwu@trustnetic.com, jingjing.wu@intel.com, johndale@cisco.com, john.miller@atomicrules.com, linville@tuxdriver.com, keith.wiles@intel.com, kirankumark@marvell.com, oulijun@huawei.com, lironh@marvell.com, longli@microsoft.com, mw@semihalf.com, spinler@cesnet.cz, matan@nvidia.com, matt.peters@windriver.com, maxime.coquelin@redhat.com, mk@semihalf.com, humin29@huawei.com, pnalla@marvell.com, ndabilpuram@marvell.com, qiming.yang@intel.com, qi.z.zhang@intel.com, radhac@marvell.com, rahul.lakkireddy@chelsio.com, rmody@marvell.com, rosen.xu@intel.com, sachin.saxena@oss.nxp.com, skoteshwar@marvell.com, shshaikh@marvell.com, shaibran@amazon.com, shepard.siegel@atomicrules.com, asomalap@amd.com, somnath.kotur@broadcom.com, sthemmin@microsoft.com, steven.webster@windriver.com, skori@marvell.com, mtetsuyah@gmail.com, vburru@marvell.com, viacheslavo@nvidia.com, xiao.w.wang@intel.com, cloud.wangxiaoyun@huawei.com, yisen.zhuang@huawei.com, yongwang@vmware.com, xuanziyang2@huawei.com, cristian.dumitrescu@intel.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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 Fri, Jan 12, 2024 at 12:34=E2=80=AFPM Ferruh Yigit wrote: > > diff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.= h > > index 4bfaf79c6c..d3f09f390d 100644 > > --- a/lib/ethdev/rte_ethdev_core.h > > +++ b/lib/ethdev/rte_ethdev_core.h > > @@ -60,6 +60,9 @@ typedef uint16_t (*eth_recycle_tx_mbufs_reuse_t)(void= *txq, > > /** @internal Refill Rx descriptors with the recycling mbufs */ > > typedef void (*eth_recycle_rx_descriptors_refill_t)(void *rxq, uint16_= t nb); > > > > +/** @internal Get number of used descriptors on a transmit queue. */ > > +typedef int (*eth_tx_queue_count_t)(void *txq); > > + > > Can you please move it above 'tx_descriptor_status', to keep same order > kept in many other locations: > rx_queue_count > rx_descriptor_status > tx_queue_count > tx_descriptor_status > > > > /** > > * @internal > > * Structure used to hold opaque pointers to internal ethdev Rx/Tx > > @@ -116,7 +119,9 @@ struct rte_eth_fp_ops { > > eth_tx_descriptor_status_t tx_descriptor_status; > > /** Copy used mbufs from Tx mbuf ring into Rx. */ > > eth_recycle_tx_mbufs_reuse_t recycle_tx_mbufs_reuse; > > - uintptr_t reserved2[2]; > > + /** Get the number of used Tx descriptors. */ > > + eth_tx_queue_count_t tx_queue_count; > > > > Similarly, can you please move it above 'tx_descriptor_status'? Moving fields in rte_eth_fp_ops (where fast-path API ops are) breaks the applications ABI. --=20 David Marchand