From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [84.52.114.115]) by dpdk.org (Postfix) with ESMTP id 6441E1B233 for ; Fri, 20 Oct 2017 14:33:32 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 1C2E87F8DD; Fri, 20 Oct 2017 15:33:32 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=unavailable autolearn_force=no version=3.4.0 Received: from oktetlabs.ru (shelob.oktetlabs.ru [192.168.34.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 65F597F8CD; Fri, 20 Oct 2017 15:33:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.9.2 shelob.oktetlabs.ru 65F597F8CD DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1508502809; bh=AyUzDD0UFdNgvTnU0vjkKJZdovFw5xil+HAL+pQjm4c=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=xnxZVqEWliYqASTrHOGqh9oh+wpxwUa+095n3mLIZpQ8XltIxmcaf6WodNKOZndWq CwTyLcsA9lCkmHzyMVeJchBy0qlpAPoPvtvSx+b2J9TO9tg19AJXuddj7fYlLPlprv lnOvVs5NmPvYEyD1qttba1BD9X4Q7vAb5wRKAKME= Date: Fri, 20 Oct 2017 15:33:28 +0300 From: Ivan Malov To: Ferruh Yigit , dev@dpdk.org Cc: Thomas Monjalon , Harry Van Haaren , Lee Daly Message-ID: <20171020123328.GB26729@oktetlabs.ru> References: <20171020000351.57868-1-ferruh.yigit@intel.com> <20171020000351.57868-2-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171020000351.57868-2-ferruh.yigit@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 2/3] ethdev: fix xstats get by id APIS 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: Fri, 20 Oct 2017 12:33:32 -0000 On Fri, Oct 20, 2017 at 01:03:50AM +0100, Ferruh Yigit wrote: > ethdev xstat get by id APIs: > rte_eth_xstats_get_names_by_id() > rte_eth_xstats_get_by_id() > > Works on ids calculated as "basic stats + device specific stats" > > When an application asking for id less than "basic stats count", it is > indeed asking basic stats nothing specific to device stats. > > The dev_ops PMDs implements xstats_get_names_by_id and xstats_get_by_id > works on device specific ids. > > This patch adds a check if all stats requested by ids can be provided > via device and if so converts ids to device specific ones. > > This conversion wasn't required before commit 8c49d5f1c219, because > _by_id dev_ops were always used to get whole stats instead of specific > ids. > > Fixes: 8c49d5f1c219 ("ethdev: rework xstats retrieve by id") > > Signed-off-by: Ferruh Yigit > --- > Cc: Ivan Malov > Cc: Harry Van Haaren > Cc: Lee Daly The patch looks reasonable. It solves the problem for me provided that the parts 1/3 and 3/3 are also applied. Reviewed-by: Ivan Malov Tested-by: Ivan Malov -- Best regards, Ivan