From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8BD3EA0524; Mon, 7 Dec 2020 02:29:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D840D276C; Mon, 7 Dec 2020 02:29:09 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 3ECB5F72 for ; Mon, 7 Dec 2020 02:29:08 +0100 (CET) Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Cq5L837tCz15YH4; Mon, 7 Dec 2020 09:28:32 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Dec 2020 09:28:52 +0800 To: Ferruh Yigit , Stephen Hemminger CC: , , , References: <531504ce-0547-48c2-4e34-c2ed6cb12e57@intel.com> <1605873002-51934-1-git-send-email-humin29@huawei.com> <94a17751-c71a-a1c0-7cfd-d7990ff265e5@intel.com> <20201120152137.37d11e99@hermes.local> <9dca1ddf-1842-7087-7f04-98604536340e@intel.com> <20201120202928.126217ad@hermes.local> <57e36a8a-f868-c449-2c43-347107b994d6@intel.com> <9d2c3d11-5003-ac5c-8b44-9a292776fe6b@huawei.com> <4ae81928-f54e-9d25-6f56-3a79a73c2f00@intel.com> From: "Min Hu (Connor)" Message-ID: <3cedb217-8add-d339-493e-fd372edd514e@huawei.com> Date: Mon, 7 Dec 2020 09:28:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <4ae81928-f54e-9d25-6f56-3a79a73c2f00@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [RFC V4] app/testpmd: fix queue stats mapping configuration 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Ferruh, I have sent V1 patch, please check it out, thanks; https://patches.dpdk.org/patch/84716/ 在 2020/12/2 18:44, Ferruh Yigit 写道: > On 11/30/2020 8:29 AM, Min Hu (Connor) wrote: >> Hi, Ferruh, and all, >>      are there any comments about this set of patch? >> > > I am good with this one, would you mind sending an actual patch (not > RFC) on top of the latest head? > > Thanks, > ferruh > >> 在 2020/11/23 17:51, Ferruh Yigit 写道: >>> On 11/21/2020 4:29 AM, Stephen Hemminger wrote: >>>> On Fri, 20 Nov 2020 23:33:40 +0000 >>>> Ferruh Yigit wrote: >>>> >>>>> On 11/20/2020 11:21 PM, Stephen Hemminger wrote: >>>>>> On Fri, 20 Nov 2020 17:26:55 +0000 >>>>>> Ferruh Yigit wrote: >>>>>>> On 11/20/2020 11:50 AM, Min Hu (Connor) wrote: >>>>>>>> From: Huisong Li >>>>>>>> >>>>>>>> Currently, the queue stats mapping has the following problems: >>>>>>>> 1) Many PMD drivers don't support queue stats mapping. But there >>>>>>>> is no >>>>>>>>     failure message after executing the command "set stat_qmap >>>>>>>> rx 0 2 2". >>>>>>>> 2) Once queue mapping is set, unrelated and unmapped queues are >>>>>>>> also >>>>>>>> displayed. >>>>>>>> 3) The configuration result does not take effect or can not be >>>>>>>> queried >>>>>>>> in real time. >>>>>>>> 4) The mapping arrays, "tx_queue_stats_mappings_array" & >>>>>>>> "rx_queue_stats_mappings_array" are global and their sizes are >>>>>>>> based on >>>>>>>> fixed max port and queue size assumptions. >>>>>>>> 5) These record structures, >>>>>>>> 'map_port_queue_stats_mapping_registers()' >>>>>>>>     and its sub functions are redundant for majority of drivers. >>>>>>>> 6) The display of the queue stats and queue stats mapping is mixed >>>>>>>>     together. >>>>>>>> >>>>>>>> Since xstats is used to obtain queue statistics, we have made >>>>>>>> the following >>>>>>>>     simplifications and adjustments: >>>>>>>> 1) If PMD requires and supports queue stats mapping, configure >>>>>>>> to driver in >>>>>>>>     real time by calling ethdev API after executing the command >>>>>>>>     "set stat_qmap rx/tx ...". If not, the command can not be >>>>>>>> accepted. >>>>>>>> 2) Based on the above adjustments, these record structures, >>>>>>>> 'map_port_queue_stats_mapping_registers()' and its sub functions >>>>>>>> can be >>>>>>>>     removed. "tx-queue-stats-mapping" & "rx-queue-stats-mapping" >>>>>>>> parameters, >>>>>>>>     and 'parse_queue_stats_mapping_config()' can be removed too. >>>>>>>> 3) remove display of queue stats mapping in 'fwd_stats_display()' & >>>>>>>>     'nic_stats_display()', and obtain queue stats by xstats. >>>>>>>>     Since the record structures are removed, >>>>>>>> 'nic_stats_mapping_display()' >>>>>>>>     can be deleted. >>>>>>>> >>>>>>>> Fixes: 4dccdc789bf4b ("app/testpmd: simplify handling of stats >>>>>>>> mappings error") >>>>>>>> Fixes: 013af9b6b64f6 ("app/testpmd: various updates") >>>>>>>> Fixes: ed30d9b691b21 ("app/testpmd: add stats per queue") >>>>>>>> >>>>>>>> Signed-off-by: Huisong Li >>>>>>> >>>>>>> Overall    looks good to me. >>>>>>> I did a quick test didn't see anything unexpected. 'xstats' or >>>>>>> 'dpdk-proc-info' >>>>>>> app still can be used to get queue stats and "set stat_qmap ..." >>>>>>> is working as >>>>>>> expected. >>>>>>> >>>>>>> But it is a little late for this release cycle, would you be OK >>>>>>> to get this at >>>>>>> the beginning of next release? >>>>>> >>>>>> Could we plan to deprecate queue stats mapping in future when >>>>>> xstats work is done? >>>>> >>>>> Even queue stats moved to xstats, a few PMDs still need this >>>>> configuration and API. >>>>> And this patch already cleans the queue stats mapping noise from >>>>> testpmd. >>>>> >>>>> What is the benefit/motivation to deprecate the queue stats mapping >>>>> API? >>>> >>>> Mostly because so few drivers implement it, that any application >>>> using it >>>> is  going to be non-portable. >>>> >>> >>> 'rte_eth_dev_set_.*_queue_stats_mapping()' APIs return '-ENOTSUP' if >>> underlying PMD doesn't support it, applications can check this for >>> portable code. >>> . > > .