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 E48D043B73; Thu, 22 Feb 2024 10:01:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77790402DA; Thu, 22 Feb 2024 10:01:46 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id F3B3B40281 for ; Thu, 22 Feb 2024 10:01:44 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TgRtW2Cncz1xnw0; Thu, 22 Feb 2024 17:00:19 +0800 (CST) Received: from kwepemd100004.china.huawei.com (unknown [7.221.188.31]) by mail.maildlp.com (Postfix) with ESMTPS id E41951A0172; Thu, 22 Feb 2024 17:01:42 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Thu, 22 Feb 2024 17:01:42 +0800 Message-ID: <4754ed62-3bab-e506-0fef-3c411cd8aac2@huawei.com> Date: Thu, 22 Feb 2024 17:01:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2 2/7] ethdev: add telemetry cmd for registers To: Ferruh Yigit , CC: , , , References: <20231214015650.3738578-1-haijie1@huawei.com> <20240205105151.275591-1-haijie1@huawei.com> <20240205105151.275591-3-haijie1@huawei.com> <55e32a89-eca3-49a9-9ddd-32efe5684961@amd.com> From: Jie Hai In-Reply-To: <55e32a89-eca3-49a9-9ddd-32efe5684961@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemd100004.china.huawei.com (7.221.188.31) 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 On 2024/2/8 1:03, Ferruh Yigit wrote: > On 2/5/2024 10:51 AM, Jie Hai wrote: >> This patch adds a telemetry command for registers dump, >> and supports get registers with specified names. >> The length of the string exported by telemetry is limited >> by MAX_OUTPUT_LEN. Therefore, the filter should be more >> precise. >> >> An example usage is shown below: >> --> /ethdev/regs,0,INTR >> { >> "/ethdev/regs": { >> "registers_length": 318, >> "registers_width": 4, >> "register_offset": "0x0", >> "version": "0x1140011", >> "group_0": { >> "HNS3_CMDQ_INTR_STS_REG": "0x0", >> "HNS3_CMDQ_INTR_EN_REG": "0x2", >> "HNS3_CMDQ_INTR_GEN_REG": "0x0", >> "queue_0_HNS3_TQP_INTR_CTRL_REG": "0x0", >> "queue_0_HNS3_TQP_INTR_GL0_REG": "0xa", >> "queue_0_HNS3_TQP_INTR_GL1_REG": "0xa", >> "queue_0_HNS3_TQP_INTR_GL2_REG": "0x0", >> ... >> }, >> "group_1": { >> ... >> }, >> ... >> } >> > > What is the intention of 'RTE_TEL_MAX_DICT_ENTRIES' and grouping above? > For a dict in telemetry, the total num of elements is RTE_TEL_MAX_DICT_ENTRIES which is 256. The number of registers may be greater than that. One option is to seperate the registers in different groups, each group can be stored in a dict A and can be an entry of another dict B. RTE_TEL_MAX_DICT_ENTRIES is used so that B has as less as possible elements and to make full use of the memory allocated. >> or as below if the number of registers not exceed the >> RTE_TEL_MAX_DICT_ENTRIES: >> --> /ethdev/regs,0,ppp >> { >> "/ethdev/regs": { >> "registers_length": 156, >> "registers_width": 4, >> "register_offset": "0x0", >> "version": "0x1140011", >> "ppp_key_drop_num": "0x0", >> "ppp_rlt_drop_num": "0x0", >> "ssu_ppp_mac_key_num_l": "0x1", >> "ssu_ppp_mac_key_num_h": "0x0", >> "ssu_ppp_host_key_num_l": "0x1", >> "ssu_ppp_host_key_num_h": "0x0", >> "ppp_ssu_mac_rlt_num_l": "0x1", >> ... >> } >> } >> >> Signed-off-by: Jie Hai > > .