From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ananyev, Konstantin" Subject: Re: [dpdk-dev, PATCHv6 1/6] ethdev: enhance rte_eth_(tx|rx)q_info struct Date: Tue, 20 Oct 2015 09:52:02 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836AB2B3C@irsmsx105.ger.corp.intel.com> References: <1443729293-20753-2-git-send-email-konstantin.ananyev@intel.com> <1445292384-19815-1-git-send-email-amine.kherbouche@6wind.com> <1445292384-19815-2-git-send-email-amine.kherbouche@6wind.com> <20151019154427.65ccc42b@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Stephen Hemminger , Amine Kherbouche Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7DFC62A5B for ; Tue, 20 Oct 2015 11:52:05 +0200 (CEST) In-Reply-To: <20151019154427.65ccc42b@xeon-e3> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Monday, October 19, 2015 11:44 PM > To: Amine Kherbouche > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [dpdk-dev, PATCHv6 1/6] ethdev: enhance rte_eth_(= tx|rx)q_info struct >=20 > On Tue, 20 Oct 2015 00:06:19 +0200 > Amine Kherbouche wrote: >=20 > > + uint16_t used_desc; /**< number of used descriptors */ > > + uint16_t free_desc; /**< number of free descriptors */ >=20 > These two fields are obviously not SMP sfe. I don't think they have to be. >>From my thinking it is just a snapshot of SW state of the queue, that could= be used for statistics/watchdog/debugging purposes. > Also, they are redundant with the existing queue_count API? Yep, similar thought here: In the for Intel HW implementations: qinfo->used_desc =3D ixgbe_dev_rx_queue_count(dev, queue_id); It seems a bit redundant, as if user wants to know HW state it can call rte= _eth_rx_queue_count() directly. >>From other side: rte_eth_rx_queue_count() is quite heavyweight function, a= s it scans HW descriptors to check their status. I think it should be better to return here just a snapshot of SW state: how= many free/used RXDs are from PMD perspective (by collecting info from *_rx_queue structure, without reading actual HW re= gisters/descriptors - as you done for TX queue info). Konstantin