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 64B631B6FD for ; Tue, 24 Oct 2017 01:33:15 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DA07A209D1; Mon, 23 Oct 2017 19:33:14 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 23 Oct 2017 19:33:14 -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; s=mesmtp; bh=dcy2o0MYjW0/MqraAw4MtXd9Ll I9PDsH7BRw8Q9VyGc=; b=ACB19IurmVB15p+VU94nmCAZJ4Tf6fcZN4Y595GkVz 0P+v9qLMLdEx2CH6AJgjjNuyn07b+VrVbc6kRK9zUj4AguPb3liQdpPAVfFyTecp rTFz3RR/2Oitorg6d9PP7ApIqiDHBvAsvua5V7Qh1j8aRrI8tH2QJFWDjMOE7Qif 4= 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; s=fm1; bh=dcy2o0 MYjW0/MqraAw4MtXd9LlI9PDsH7BRw8Q9VyGc=; b=B2gidbtt0mXjzggomHQJhW tYqe6TpHgFCVmMBfAqUTEf0i8QvUltfEtLlyiFm8k0s5fcD58ntnRcKRGPUKh7re dxB5PKxNOkvdsDYCsyNZkGahziimOcSIQR9Li5xyQG/CYBX/M5SIH+EbYHZromT4 T6SJr8W7ubVWBU+hFV8NaF7N4dx0jA1bIeUDylfzXGku1aM+5zNIXtidotzOUapT hdLDxWldHMIIMQ07To3YZj1sUYXHpbEQS8hcDFD1g9Pr28LNUFbXQGdVXx5Bdcoz mfiXkjxJAEL8k5VUftL3/mcGUnzQ7TklYHkB2W3yG20LrHr9VBMVMRaEJHbR6qSw == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 820967F91D; Mon, 23 Oct 2017 19:33:14 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, Ivan Malov , Harry Van Haaren , Lee Daly Date: Tue, 24 Oct 2017 01:33:13 +0200 Message-ID: <1623363.fyW1tFJoJP@xps> In-Reply-To: <20171023231534.90996-2-ferruh.yigit@intel.com> References: <20171023231251.90845-1-ferruh.yigit@intel.com> <20171023231534.90996-1-ferruh.yigit@intel.com> <20171023231534.90996-2-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 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: Mon, 23 Oct 2017 23:33:15 -0000 24/10/2017 01:15, Ferruh Yigit: > xstats _by_id() APIs are broken because ids known by user sent directly > to the PMDs. > > ethdev xstat get by id APIs: > rte_eth_xstats_get_names_by_id() and rte_eth_xstats_get_by_id() > work on ids calculated as "basic stats + extended stats" > > When an application asking for id less than "basic stats count", it is > indeed asking basic stats not extended stats. > > The dev_ops PMDs implements work on extended stats ids. > > This patch adds a check if all requested stats are xstats and if so > converts ids to xstats ids before passing them to PMDs. > > This conversion wasn't required before commit 8c49d5f1c219, because > _by_id dev_ops were always used to get whole stats via NULL ids. > > Fixes: 8c49d5f1c219 ("ethdev: rework xstats retrieve by id") > > Signed-off-by: Ferruh Yigit > Reviewed-by: Ivan Malov > Tested-by: Ivan Malov > --- > Cc: Ivan Malov > Cc: Harry Van Haaren > Cc: Lee Daly > > v2: > * variable renamed, all_ids_from_pmd -> no_basic_stat_requested > * xstats id conversion commented. A lot more clear :) Thanks Acked-by: Thomas Monjalon