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 D7EFC43883; Wed, 10 Jan 2024 15:09:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C60CC402DC; Wed, 10 Jan 2024 15:09:50 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 2D723402CC for ; Wed, 10 Jan 2024 15:09:49 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id ED9223200B03; Wed, 10 Jan 2024 09:09:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 10 Jan 2024 09:09:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1704895786; x=1704982186; bh=ENKkQJOHhO5zhosmWk0MLE4A1SIcFUzRTW5hgNlKxO4=; b= F669x2dHF+xhn+hYA0XBVUQ67tCgL/m1kUN3Hhp5Rvsw42zs+MRoqdj4qnN/5KWk ssew6ZW8XF/qrlrHYds72v5HRsaXj18catfnmFRYJSuK8FxVS8A0nIwRuR/6YvSK VeODLZ0bB7Ebv26EwKo5whEXx9Rnt3Avp7t1gnPgFfKRk5FEN4Mh3xmpF8Vv74ob mb9iYOEzTOHULs82uPI/OSSdkc/6sz9w/yFME4z69LYPHxO6E4jAjVAbJjef9F0Z zOIZeS/4UKWuao1xplgprGUey9GVxeGLtOe84vSe94d0XgVTQrkcTka7fMhxjQBT Z4LoxNUJhho0b6GXJ4LG+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704895786; x= 1704982186; bh=ENKkQJOHhO5zhosmWk0MLE4A1SIcFUzRTW5hgNlKxO4=; b=a g1D6GL1/EQr4m4owb31OS/oHdynQK+Q5IbEtr+5xygMvcBpGPm28IP01F0E3R0Sf hVyZFRkmY/CZrHQp1PGpic/cmozumUDjjGFVJzcDJBOcGGqYOhCEjceZckNt4hOD q14+Gf1YoSMddDUJOm5b4kxoknkylSdIBz9Z+aXV1uqP70lrbpS06d3gkksMYU/+ lkmDxyh/lbxVac5kg7d+r09zO3fZYESl12kGCAiZcfG4IM+ry82OejhGebo3DCQE 1xBieazYlmxJJlhvA+qDahj6oep/mKT9d3k4Cfi5UqkjwPkNkXVSJRqphB0z02L4 vQAOrAaYyi5/6ivlkcMSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeiuddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jan 2024 09:09:44 -0500 (EST) From: Thomas Monjalon To: fengchengwen , Jie Hai , dev@dpdk.org, Andrew Rybchenko , Bruce Richardson , Ferruh Yigit Cc: lihuisong@huawei.com, liudongdong3@huawei.com Subject: Re: [PATCH] ethdev: add dump regs for telemetry Date: Wed, 10 Jan 2024 15:09:42 +0100 Message-ID: <2632983.tIAgqjz4sF@thomas> In-Reply-To: <1dfc96a4-9471-4f2a-a835-72da95e6273e@amd.com> References: <20231214015650.3738578-1-haijie1@huawei.com> <1dfc96a4-9471-4f2a-a835-72da95e6273e@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 10/01/2024 13:15, Ferruh Yigit: > On 1/10/2024 1:38 AM, fengchengwen wrote: > > Hi Ferruh, > > > > On 2024/1/10 2:06, Ferruh Yigit wrote: > >> On 1/9/2024 2:19 AM, Jie Hai wrote: > >>> On 2023/12/14 20:49, Ferruh Yigit wrote: > >>>> On 12/14/2023 1:56 AM, Jie Hai wrote: > >>>>> The ethdev library now registers a telemetry command for > >>>>> dump regs. > >>>>> > >>>>> An example usage is shown below: > >>>>> --> /ethdev/regs,test > >>>>> { > >>>>> "/ethdev/regs": { > >>>>> "regs_offset": 0, > >>>>> "regs_length": 3192, > >>>>> "regs_width": 4, > >>>>> "device_version": "0x1080f00", > >>>>> "regs_file": "port_0_regs_test" > >>>>> } > >>>>> } > >>> > >>>> > >>>> Above code writes register data to a file. > >>>> > >>>> I am not sure about this kind of usage of telemetry command, that it > >>>> cause data to be written to a file. > >>>> > >>>> My understanding is, telemetry usage is based on what telemetry client > >>>> receives. > >>>> What do you think just keep the 'reg_info' fields excluding data to the > >>>> file? > >>>> > >>>> .Hi, Ferruh > >>> > >>> I tried to write all register information to telemetry data, > >>> but gave up because some drivers had too many registers (eg.ixgbe) > >>> to carry. Therefore, the writing data to file approach is selected. > >>> > >>> When we query a register, the register content is the key. > >>> The information such as the width and length is only auxiliary > >>> information. If the register data cannot be obtained, the auxiliary > >>> information is optional. So I don't think register data should be removed. > >>> > >>> In my opinion, writing a file is a more appropriate way to do it. > >>> I wonder if there's a better way. > >>> > >>> > >> > >> Is there a usecase to get register information from telemetry interface? > > > > Among the available tools: > > 1, ethtool/proc-info: should use multi-process mechanism to connect to the main process > > 2, telemetry: easier, lighter load, and it don't need re-probe the ethdev in the secondary process, > > and also cost more resource, like hugepage, cores. > > > > From our users, they prefer use the second 'telemetry', so I think we should move > > more status-query-points to telemetry. > > > > As for this question, I think it's okay to get register info from telemetry. > > > > > > > > Another question, we have some internal registers, which: > > 1. Is not suitable expose by xstats, because they may includes configuration > > 2. Is not suitable expose by dumps, because this dumps is hard to understand (because it only has value). > > > > So we plan to add some telemetry points in the driver itself, so we could display them like xstats: > > "xxxx" : 0x1234 > > "yyyy" : 0x100 > > > > Will the community accept this kind of telemetry points which limit one driver ? > > > > Hi Chengwen, > > I see there is a usecase/requirement. > > With this patch, even using file, only register values are dumped and > isn't it hard to find value of specific register? > > ("xxxx" : 0x1234) approach looks better, but instead of making this > telemetry support for specific driver, what about making it in two steps. > > First add new dev_ops, (or update existing one), to get registers with > "name: value" format, (in a way to allow empty name), or even perhaps > "name: offset, value" format. I'm OK to add an API for dumping registers, and guess what? We already have it: rte_eth_dev_get_reg_info(). We may extend it to query a subset of registers. > And in second stage add telemetry support around it. > (Name being optional lets us wrap exiting 'get_reg' dev_ops with new one) I am against overloading telemetry for debug purpose. > When adding dev_ops, it may get an additional 'filter' parameter, to get > only subset of regs, like "mac*" to get regs name staring with "mac", > this may help for the cases there are too many registers you mentioned. > > Anyway, we can discuss more about its design, but what do you think > about first having a dev_ops for this?