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 543DB42DF1; Fri, 7 Jul 2023 04:18:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3087406B5; Fri, 7 Jul 2023 04:18:08 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 61E6A40685 for ; Fri, 7 Jul 2023 04:18:07 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Qxxqz5rK6zqSJ9; Fri, 7 Jul 2023 10:17:35 +0800 (CST) Received: from [10.67.103.42] (10.67.103.42) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 7 Jul 2023 10:18:03 +0800 Message-ID: Date: Fri, 7 Jul 2023 10:18:03 +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 v4 3/3] ring: add telemetry cmd for ring info To: David Marchand , Thomas Monjalon CC: , , , , References: <20230131022841.10775-1-haijie1@huawei.com> <4273274.ejJDZkT8p0@thomas> <2c9f8137-4af7-d139-c69a-76d03208c669@huawei.com> <3043990.CbtlEUcBR6@thomas> From: Jie Hai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.42] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500020.china.huawei.com (7.221.188.8) 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 On 2023/7/6 16:52, David Marchand wrote: > On Tue, Jul 4, 2023 at 4:11 PM Thomas Monjalon wrote: >> >> 04/07/2023 10:04, Jie Hai: >>> On 2023/6/20 22:34, Thomas Monjalon wrote: >>>> 20/06/2023 10:14, Jie Hai: >>>>> On 2023/2/20 20:55, David Marchand wrote: >>>>>> On Fri, Feb 10, 2023 at 3:50 AM Jie Hai wrote: >>>>>>> >>>>>>> This patch supports dump of ring information by its name. >>>>>>> An example using this command is shown below: >>>>>>> >>>>>>> --> /ring/info,MP_mb_pool_0 >>>>>>> { >>>>>>> "/ring/info": { >>>>>>> "name": "MP_mb_pool_0", >>>>>>> "socket": 0, >>>>>>> "flags": "0x0", >>>>>>> "producer_type": "MP", >>>>>>> "consumer_type": "MC", >>>>>>> "size": 262144, >>>>>>> "mask": "0x3ffff", >>>>>>> "capacity": 262143, >>>>>>> "used_count": 153197, >>>>>>> "consumer_tail": 2259, >>>>>>> "consumer_head": 2259, >>>>>>> "producer_tail": 155456, >>>>>>> "producer_head": 155456, >>>>>> >>>>>> What would an external user make of such an information? >>>>>> >>>>>> I'd like to have a better idea what your usecase is. >>>>>> If it is for debugging, well, gdb is probably a better candidate. >>>>>> >>>>>> >>>>> Hi David, >>>>> Thanks for your question and I'm sorry for getting back to you so late. >>>>> There was a problem with my mailbox and I lost all my mails. >>>>> >>>>> The ring information exported by telemetry can be used to check the ring >>>>> status periodically during normal use. When an error occurs, the fault >>>>> cause can be deduced based on the information. >>>>> GDB is more suitable for locating errors only when they are sure that >>>>> errors will occur. >>>> >>>> Yes, when an error occurs, you can use GDB, >>>> and you don't need all these internal values in telemetry. >>>> >>>> >>> Hi, David, Thomas, >>> >>> Would it be better to delete the last four items? >>> "consumer_tail": 2259, >>> "consumer_head": 2259, >>> "producer_tail": 155456, >>> "producer_head": 155456, >> >> Yes it would be better. >> David, other maintainers, would it make the telemetry command a good idea? >> >> > > Without the ring head/tail exposed, it seems ok. > It still exposes the ring flags which are kind of internal things, but > those are parts of the API/ABI, iiuc, so it should not be an issue. > > Similar to "name" and "size" of ring, "flags" of ring is also determined by user input. I think it's ok to expose it, users can use it to check if the configuration is as they want. And the proc-info also exposes this flag.