From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 7DFC62A5B
 for <dev@dpdk.org>; Tue, 20 Oct 2015 11:52:05 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga103.fm.intel.com with ESMTP; 20 Oct 2015 02:52:04 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.17,706,1437462000"; d="scan'208";a="797839413"
Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66])
 by orsmga001.jf.intel.com with ESMTP; 20 Oct 2015 02:52:03 -0700
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.75]) by
 IRSMSX152.ger.corp.intel.com ([169.254.6.38]) with mapi id 14.03.0248.002;
 Tue, 20 Oct 2015 10:52:02 +0100
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>, Amine Kherbouche
 <amine.kherbouche@6wind.com>
Thread-Topic: [dpdk-dev] [dpdk-dev, PATCHv6 1/6] ethdev: enhance
 rte_eth_(tx|rx)q_info struct
Thread-Index: AQHRCr/Es5IYI2pj1kSbOPpjQpe9OZ50IU5w
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>
In-Reply-To: <20151019154427.65ccc42b@xeon-e3>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-dev,
 PATCHv6 1/6] ethdev: enhance rte_eth_(tx|rx)q_info struct
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Oct 2015 09:52:06 -0000



> -----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 <amine.kherbouche@6wind.com> 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