Message ID | 1445292384-19815-2-git-send-email-amine.kherbouche@6wind.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 48F098E7D; Tue, 20 Oct 2015 00:07:02 +0200 (CEST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 54DED8E6F for <dev@dpdk.org>; Tue, 20 Oct 2015 00:06:54 +0200 (CEST) Received: by wikq8 with SMTP id q8so19366919wik.1 for <dev@dpdk.org>; Mon, 19 Oct 2015 15:06:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LPdu94MU8I9Ld3WbEUHoUXpCfJf6aahv5DUr71t5eoQ=; b=lzagIdiNkB2Wfftdmny5qFvdLJRBh9X7FdpYz0LZy2PMTdHsVTtduK5LMoMLHmOLoa iqMzmyXrwpIfpreZJkGimnditx9CCJxNZ4Q9rSWgrLfh7i1h5b5SxK3snHWo0YqCjkL8 nMYgPvAGXrgT8hQPAQergvtHIqabZobF1k1x4lTxhw190XeH7T9grUfJV0of+hBOYvW9 0CX10wDA7jd2PhUiS/jR81U1OKjOfLib20xAQf6P4d9J4h2cUjxd2Qxg85ggyTo1gQ70 0VE+p2xzVri2HPGF5wdyIumMkq3Ags0x6rcVZnIA0lqj2RTHgxPCZTl2XY+yCPZ6NZPd r1cQ== X-Gm-Message-State: ALoCoQmC2Wy9NAwCa1xvybzhcFmTOu5Oho6mMi3zbmGmPOMeldcJ/3e2OClAaOseTJTIv8eHaF9M X-Received: by 10.194.239.230 with SMTP id vv6mr34758461wjc.21.1445292414030; Mon, 19 Oct 2015 15:06:54 -0700 (PDT) Received: from griffon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id jd7sm42620096wjb.19.2015.10.19.15.06.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 15:06:53 -0700 (PDT) From: Amine Kherbouche <amine.kherbouche@6wind.com> To: dev@dpdk.org Date: Tue, 20 Oct 2015 00:06:19 +0200 Message-Id: <1445292384-19815-2-git-send-email-amine.kherbouche@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1445292384-19815-1-git-send-email-amine.kherbouche@6wind.com> References: <1443729293-20753-2-git-send-email-konstantin.ananyev@intel.com> <1445292384-19815-1-git-send-email-amine.kherbouche@6wind.com> Cc: amine.kherbouche@6wind.com Subject: [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> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Aminek Kherbouche
Oct. 19, 2015, 10:06 p.m. UTC
Add 2 fields in struct rte_eth_(tx|rx)q_info :
- used_desc : for used queue descriptors
- free_desc : for free queue descriptors
for ability to query more information from queues.
Signed-off-by: Amine Kherbouche <amine.kherbouche@6wind.com>
---
lib/librte_ether/rte_ethdev.h | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Tue, 20 Oct 2015 00:06:19 +0200 Amine Kherbouche <amine.kherbouche@6wind.com> wrote: > + uint16_t used_desc; /**< number of used descriptors */ > + uint16_t free_desc; /**< number of free descriptors */ These two fields are obviously not SMP sfe. Also, they are redundant with the existing queue_count API?
Hi Amine, > -----Original Message----- > From: Amine Kherbouche [mailto:amine.kherbouche@6wind.com] > Sent: Monday, October 19, 2015 11:06 PM > To: dev@dpdk.org > Cc: amine.kherbouche@6wind.com; vincent.jardin@6wind.com; Ananyev, Konstantin > Subject: [dpdk-dev,PATCHv6 1/6] ethdev: enhance rte_eth_(tx|rx)q_info struct > > Add 2 fields in struct rte_eth_(tx|rx)q_info : > - used_desc : for used queue descriptors > - free_desc : for free queue descriptors > for ability to query more information from queues. As I can see your patch series should be applied on top of mine: [PATCHv5 0/8] ethdev: add new API to retrieve RX/TX queue information Which is not yet in the dpdk.org mainline. I believe that is ok, but then you shouldn't replace previous version with the patch (v5) with new one, but create a new patch for your changes and clearly state that dependency. Konstantin > > Signed-off-by: Amine Kherbouche <amine.kherbouche@6wind.com> > --- > lib/librte_ether/rte_ethdev.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 4d7b6f2..5fc86a0 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -874,6 +874,8 @@ struct rte_eth_rxq_info { > struct rte_eth_rxconf conf; /**< queue config parameters. */ > uint8_t scattered_rx; /**< scattered packets RX supported. */ > uint16_t nb_desc; /**< configured number of RXDs. */ > + uint16_t used_desc; /**< number of used descriptors */ > + uint16_t free_desc; /**< number of free descriptors */ > } __rte_cache_aligned; > > /** > @@ -883,6 +885,8 @@ struct rte_eth_rxq_info { > struct rte_eth_txq_info { > struct rte_eth_txconf conf; /**< queue config parameters. */ > uint16_t nb_desc; /**< configured number of TXDs. */ > + uint16_t used_desc; /**< number of used descriptors */ > + uint16_t free_desc; /**< number of free descriptors */ > } __rte_cache_aligned; > > struct rte_eth_dev; > -- > 1.7.10.4
> -----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 > > On Tue, 20 Oct 2015 00:06:19 +0200 > Amine Kherbouche <amine.kherbouche@6wind.com> wrote: > > > + uint16_t used_desc; /**< number of used descriptors */ > > + uint16_t free_desc; /**< number of free descriptors */ > > 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 = 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, as 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 registers/descriptors - as you done for TX queue info). Konstantin
> Yep, similar thought here: > In the for Intel HW implementations: > qinfo->used_desc = 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, > as 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 > registers/descriptors - as you done for TX queue info). > > Konstantin > Yes, Konstantin is right, it is a light solution to get an snapshot of the state of the queues.
2015-10-20 09:36, Ananyev, Konstantin: > As I can see your patch series should be applied on top of mine: > [PATCHv5 0/8] ethdev: add new API to retrieve RX/TX queue information > Which is not yet in the dpdk.org mainline. > I believe that is ok, but then you shouldn't replace previous version with the patch (v5) > with new one, but create a new patch for your changes and clearly state that dependency. Yes, Amine, this is not a new version of Konstantin's patches. So you must not use v6 and you should mention in the cover letter that it depends on Konstantin's patches. Please use v2 next time.
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 4d7b6f2..5fc86a0 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -874,6 +874,8 @@ struct rte_eth_rxq_info { struct rte_eth_rxconf conf; /**< queue config parameters. */ uint8_t scattered_rx; /**< scattered packets RX supported. */ uint16_t nb_desc; /**< configured number of RXDs. */ + uint16_t used_desc; /**< number of used descriptors */ + uint16_t free_desc; /**< number of free descriptors */ } __rte_cache_aligned; /** @@ -883,6 +885,8 @@ struct rte_eth_rxq_info { struct rte_eth_txq_info { struct rte_eth_txconf conf; /**< queue config parameters. */ uint16_t nb_desc; /**< configured number of TXDs. */ + uint16_t used_desc; /**< number of used descriptors */ + uint16_t free_desc; /**< number of free descriptors */ } __rte_cache_aligned; struct rte_eth_dev;