From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 8349E2C2E for ; Mon, 24 Apr 2017 14:41:18 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E2DDE2097C; Mon, 24 Apr 2017 08:41:17 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 24 Apr 2017 08:41:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=NzY+9tiXK+PZTpM FyvaCq2miGEU1wqHMulFC4HP9ClA=; b=QEeO+54jLwqqHC2NNvR6VJ8ZDugQC93 mbGV/w3zUBxrE5huLWs71nZTvQLkS0lf3NQe3LOVSb9d/GHPWbO5bgXAxRV4c9/0 s1WAxZJHOXqmgdz8ne9iVrki0pn0kdYd/mFCPUgudIzayZpaskfsY5P8Dgr3hL2U 3kIWmTXMWh9g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=NzY+9tiXK+PZTpMFyvaCq2miGEU1wqHMulFC4HP9ClA=; b=HoCW0DpQ kOUVErNR9EkyERCFbJ5iCSYI6mtPfZNtchw87bB3+XLWvR3epnyRYlzLnDF/BYl8 nf7BsHLyFtYDVw6PQyc0p/FpOfUkjYjZ4lHbm50FP7vczmRy0gQppraxk3PQci11 pVT2STznevmqihWgzOAhV5og9pBVqI3xfSL9HEMbOOnUIdXQ0gFdxmoJvMhcSdcg PJtyXLYVZ6FUhqaPBaA1k1MJ3EdGnymnvUtGwnNHOb/uCpLGIr/5ATl3ZsD3rLWz TQzaL09RO8jwpzotxul9kftQEeGBZgH3xHxEu8EYkuTCamRny3uKXInesV9ecHRz NYHp6xya0mHKTA== X-ME-Sender: X-Sasl-enc: GMT2UfuJOUw0PoTUbftJbAoHmxYy/78ULWLYmxEGVoNa 1493037677 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 74D487E70C; Mon, 24 Apr 2017 08:41:17 -0400 (EDT) From: Thomas Monjalon To: Kuba Kozak Cc: dev@dpdk.org, Olivier Matz , harry.van.haaren@intel.com, deepak.k.jain@intel.com, Jacek Piasecki Date: Mon, 24 Apr 2017 14:41:15 +0200 Message-ID: <23329330.ZWGR8gsYE6@xps> In-Reply-To: <20170424143211.3e7db919@platinum> References: <1491928644-10383-2-git-send-email-michalx.k.jastrzebski@intel.com> <2191902.oqd7qsnxNQ@xps> <20170424143211.3e7db919@platinum> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 0/5] Extended xstats API in ethdev library to allow grouping of stats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Apr 2017 12:41:18 -0000 24/04/2017 14:32, Olivier Matz: > Hi, > > On Thu, 20 Apr 2017 22:31:35 +0200, Thomas Monjalon wrote: > > 13/04/2017 16:59, Kuba Kozak: > > > Extended xstats API in ethdev library to allow grouping of stats > > > logically > > > so they can be retrieved per logical grouping managed by the > > > application. > > > Changed existing functions rte_eth_xstats_get_names and > > > rte_eth_xstats_get > > > to use a new list of arguments: array of ids and array of values. > > > ABI versioning mechanism was used to support backward compatibility. > > > Introduced two new functions rte_eth_xstats_get_all and > > > rte_eth_xstats_get_names_all which keeps functionality of the previous > > > ones (respectively rte_eth_xstats_get and rte_eth_xstats_get_names) > > > but use new API inside. Both functions marked as deprecated. > > > Introduced new function: rte_eth_xstats_get_id_by_name to retrieve > > > xstats ids by its names. > > > Extended functionality of proc_info application: > > > --xstats-name NAME: to display single xstat value by NAME > > > Updated test-pmd application to use new API. > > > > Applied, thanks > > I'm adapting my application to the upcoming dpdk 17.05. I see > several problems with this patchset: > > - the API of rte_eth_xstats_get() and rte_eth_xstats_get_names() > has been modified, and from what I see it was not announced. > It looks that ABI is preserved however. > > - the new functions rte_eth_xstats_get_all() and > rte_eth_xstats_get_names_all() are marked as deprecated, which > looks strange for new functions. > > About the new api: > > int rte_eth_xstats_get(uint8_t port_id, uint64_t *ids, uint64_t *values, > unsigned int n); > > int rte_eth_xstats_get_names(uint8_t port_id, > struct rte_eth_xstat_name *xstats_names, unsigned int size, > uint64_t *ids); > > - the argument "id" is not at the same place > > - why having "size" in one function and "n" in the second (it was > renamed in the patch)? > > - the argument "id" should be const > > - a table of uint64_t is returned in place of the struct rte_eth_xstat > table: if no ids are given, the driver cannot return partial or > disordered stats anymore. See > 513c78ae3fd6 ("ethdev: fix extended statistics name index") > > > So, I wonder if it wouldn't be more simple to keep the old > API intact (it would avoid unannounced breakage). The new feature > can be implemented in an additional API: > > rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, > uint64_t *values, unsigned int size) > rte_eth_xstats_get_names_by_id(uint8_t port_id, const uint64_t *ids, > struct rte_eth_xstat_name *xstats_names, unsigned int size) > > Or: > > rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, > struct rte_eth_xstat *values, unsigned int size) > rte_eth_xstats_get_names_by_id(uint8_t port_id, const uint64_t *ids, > struct rte_eth_xstat_name *xstats_names, unsigned int size) > > (which would allow to deprecate the old API, but I'm not sure > we need to) > > > Can we fix that for 17.05? Bottom line is that I have skipped the complete review of this patchset because it was not properly split, preventing a good review. Lesson learned: I won't accept anymore a patchset which is not split enough to allow a proper overview. Back to the issues, please try to fix it quickly or we should revert it for 17.05-rc3.