From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 055C8A00C3; Tue, 25 Jan 2022 14:45:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B8B2426EC; Tue, 25 Jan 2022 14:45:43 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 13203426E4 for ; Tue, 25 Jan 2022 14:45:42 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Jjp162JfpzZfNt; Tue, 25 Jan 2022 21:41:46 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Tue, 25 Jan 2022 21:45:39 +0800 Subject: Re: [RFC v3] ethdev: introduce ethdev dump API To: Ferruh Yigit , Ajit Khaparde , Ray Kinsella CC: dpdk-dev , =?UTF-8?Q?Morten_Br=c3=b8rup?= , Thomas Monjalon , Andrew Rybchenko , "Loftus, Ciara" , Ciara Power References: <20220111115437.32855-1-humin29@huawei.com> <20220112111424.20594-1-humin29@huawei.com> <87h7a9p3a0.fsf@mdr78.vserver.site> <553e64fe-fc14-31fe-cdc4-efa1785e6930@intel.com> <26ee0578-d8b5-8280-9f22-2d539acdde51@intel.com> From: "Min Hu (Connor)" Message-ID: Date: Tue, 25 Jan 2022 21:45:39 +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: <26ee0578-d8b5-8280-9f22-2d539acdde51@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi, Ferruh, 在 2022/1/25 20:58, Ferruh Yigit 写道: > On 1/25/2022 12:56 PM, Ferruh Yigit wrote: >> On 1/18/2022 3:34 PM, Ajit Khaparde wrote: >>> On Wed, Jan 12, 2022 at 4:06 AM Ray Kinsella wrote: >>>> >>>> >>>> Min Hu (Connor) writes: >>>> >>>>> Added the ethdev dump API which provides functions for query >>>>> private info >>>>> from device. There exists many private properties in different PMD >>>>> drivers, >>>>> such as adapter state, Rx/Tx func algorithm in hns3 PMD. The >>>>> information of >>>>> these properties is important for debug. As the information is >>>>> private, >>>>> the new API is introduced. >>>>> >>>>> Signed-off-by: Min Hu (Connor) >>>>> Acked-by: Morten BrÞrup >>>>> --- >>>>> v3: >>>>> * fix comment. >>>>> * add rte_eth_dev_priv_dump to version.map file. >>>>> >>>>> v2: >>>>> * fix dump API name >>>>> * adjust description in doc. >>>>> --- >>>>>   doc/guides/rel_notes/release_22_03.rst |  7 +++++++ >>>>>   lib/ethdev/ethdev_driver.h             | 17 +++++++++++++++++ >>>>>   lib/ethdev/rte_ethdev.c                | 15 +++++++++++++++ >>>>>   lib/ethdev/rte_ethdev.h                | 16 ++++++++++++++++ >>>>>   lib/ethdev/version.map                 |  3 +++ >>>>>   5 files changed, 58 insertions(+) >>>>> >>>> >>>> Acked-by: Ray Kinsella >>> Acked-by: Ajit Khaparde >> >> >> I have a concern and this "private info", it can be useful for debug >> but still it will lead to a PMD specific applications, I wonder if some >> common information can be provided. The purpose of introducing the API is to enhance dump ability for NICs. It will be used in APP proc-info, I will add "show-port-private" option for it. As for common information, I will add them in "show-port" option which already exists. Is there any list in your mind what >> can be part of this private info? Private info for NICs, take HNS3 PMD NICS as an example, - Dev Capability: -- support DCB: no -- support COPPER: no -- support FD QUEUE REGION: no -- support PTP: no -- support TX PUSH: no -- support INDEP TXRX: no -- support STASH: no -- support SIMPLE BD: no -- support RXD Advanced Layout: no -- support OUTER UDP CKSUM: no -- support RAS IMP: no -- support TM: no -- support VF VLAN FILTER MOD: no - VLAN Config Info: -- Port VLAN filter configuration nic_ingress :Disable nic_egress :Disable -- VF VLAN filter configuration nic_ingress :Disable nic_egress :Disable -- RX VLAN configuration vlan1_strip_en :Disable vlan2_strip_en :Disable vlan1_vlan_prionly :Disable vlan2_vlan_prionly :Disable vlan1_strip_discard :Disable vlan2_strip_discard :Disable -- TX VLAN configuration accept_tag1 :Enable accept_untag1 :Enable insert_tag1_en :Disable default_vlan_tag1 = 0, qos = 0 accept_tag2 :Enable accept_untag2 :Enable insert_tag2_en :Disable default_vlan_tag2 = 0, qos = 0 vlan_shift_mode :Disable -- pvid status: off - Fdir Info: -- mode=0 max_key_len=400 rule_num:512 cnt_num:32 -- key_sel=1 tuple_active=0x3bdfd890 meta_data_active=0xd0 -- ipv6_word_en: in_s=3 in_d=3 out_s=0 out_d=0 .... These info is private for hns3 PMD. >> >> Also why not use existing xstats or telemetry to get more data from the >> drivers? Xstats is used to query statistics rather than state. Like above info, many keys is "enable" or "disable". It is not appropriated to put the date in xstats. Telemetry is used to query common info for NICs, not for private info. It is not also appropriated to put private date in telemetry. >> As synced with Ciara (cc'ed), she mentioned more information can be get >> via registering callbacks to ethdev. > > Opps, Ciara (Power) cc'ed now. > .