From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 6AFB72B9B for ; Mon, 24 Apr 2017 14:32:14 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id u65so21643682wmu.1 for ; Mon, 24 Apr 2017 05:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tCx2sPLJ+qfrYpbfOoVaZSqrcovgKZMFSCRGRlmEafQ=; b=SV/Qz4RtVZ1/8Kic11MssIdqIBUHypXlUzh4DGB8ZEuP3h7SLAr+8bFiKCC5i6FZ9e Hr/kyGx4W5Q7nxl1cDim+uOi6hEmE9zRTHHcfQxmv9MrPzENJxbffBEKxUwprwfnbv/G OFkA5EXqNkMRXCtoBlDXIOxMc0rdv/ev8yI3LKU7bC+8BizakmNSxVFpu9mQgfFw/Qjo rgjSV0EXjewEBTM6tf2PI29YMSb1VsZp/bJQlVOKo/VWsAEFzvWUtNjWPUPdQXsvzM5g j1FmlH36Tmuo4sYs/POLMuxuKaFYkn8g0FeLFalRaSG44tFBnL2YmBmPmYovAyao4q/I ByCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tCx2sPLJ+qfrYpbfOoVaZSqrcovgKZMFSCRGRlmEafQ=; b=KlGDQvK+DK6806rto9k/9zI12a+VePhcbkm6o0IN0mkBfP4Jeb6OH4swWFDqsvXM39 WBfUI0avvI55lIPNuZUH7sUUKN5XWqnK1aGACZDB15fjJyIp3Rn/0hBv7d+hZFK5pxEj V2xHHRYlogB9Vx3rv97UiTwn2BSDBgynTCCXgczgyoD5VRAVHdPM5H/vDcvkTMegYhYY VdvPubCX4Rmyq3dcMcWe2+5J9Q96PGph3a6mRHjBe8lfI0eWtoLFVjuJ1Z1MDYILFD2J NZOmrnSASDzt6+at1u7C1Nd3nOkZAD3levOCB8N9qaqq+OPjsK8gj6G2EmQsgU4n+9lk NMww== X-Gm-Message-State: AN3rC/666urREMS/yvtFczmOshma2s+n7reYH+Ftg8y7GmaIwzneUAD6 VrqymnPim6Cz1ELV X-Received: by 10.28.18.135 with SMTP id 129mr9151882wms.54.1493037133757; Mon, 24 Apr 2017 05:32:13 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id l132sm311470wmd.10.2017.04.24.05.32.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Apr 2017 05:32:13 -0700 (PDT) Date: Mon, 24 Apr 2017 14:32:11 +0200 From: Olivier Matz To: Thomas Monjalon Cc: Kuba Kozak , dev@dpdk.org, harry.van.haaren@intel.com, deepak.k.jain@intel.com Message-ID: <20170424143211.3e7db919@platinum> In-Reply-To: <2191902.oqd7qsnxNQ@xps> References: <1491928644-10383-2-git-send-email-michalx.k.jastrzebski@intel.com> <1492095568-20993-1-git-send-email-kubax.kozak@intel.com> <2191902.oqd7qsnxNQ@xps> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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:32:14 -0000 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? Regards, Olivier