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 2E0BD436F0; Thu, 14 Dec 2023 13:50:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EBFA43291; Thu, 14 Dec 2023 13:50:05 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id 6F8204327C for ; Thu, 14 Dec 2023 13:50:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NNj1eEM8AJrVamm4HedZ11SI4frQIkqC/N1wK1DhemdGaEUkIZ6FN2yZKL5tCEH6sVqnXvCj1iTwd2Bm8b4zCb0+djus631hMXOhL4PeCwzNTCkggS62h2aKcgQLNfFALF8I0GvRKHJHoLQsxHNFiMqNUVuPqo8DwAO2IOG3K8fzed/tOgP4+KDgfUs3ALFxnc0lMKzl+qewdypO5rQMqd2SbtTZghAbmQj8ZZbbGwFzSF/4TTFsP+8W7Ilw0BREIDknu8nsItXGdIM5ToDip4Ca/JOHOFvYg2duusMSkAxGlIdGaUDJDEChVDisAm/WRtZqj1qXDlDWV0ixPCTrwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gFKq8oeer7cEQ7l0LfYXTi4ztyiD36Xu+q6Zoymyx1o=; b=cP9w/vmgEJuU4Aw+/cEgLINmsUzdwN0xBlQiqP8HE9aiv2hGzc+7b9g1JJomc3sAYhwpVb4z8aS9yCp3SUhZpXozNpUiDMZ2EjBSIbxSLNooNroJuWeElcpRiFZCemAvkvp+voL4tc8+f7v/4u8scUozus/FWmlJHe1y1GtHG4a9mco4bAPt9AcFBbMpTJkuHbPOBRh6oPRZTIXJWD4KbKJgEuZReHQropLI+p+ga+0/6fLmPiXIxH5+9iabb+ntJtHbtUnFU+niKPjjGpsKEk39sr0CfRmKCdnucMtK5cBi/6C2Yq0Zmo8wEpfDMMBz4yUj6WWBAb5tLkUsoqZixg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gFKq8oeer7cEQ7l0LfYXTi4ztyiD36Xu+q6Zoymyx1o=; b=EYjQ278OGrA7x1x4lz60prMUjTz5m7xawHmNGSzCOOqv5Ti2Od5o8o6RLOkedF2FDi/q7JFpvffys7sabJcjPYjBwaJe8vwtTuhoY1PPdik0ZLQFjGDjDZI/J3erw/QtNIYhTY7mbx1YxJyLHSy/VF/KIEBVtnoz/PPW+iAbLWI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SJ0PR12MB6902.namprd12.prod.outlook.com (2603:10b6:a03:484::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 12:49:57 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 12:49:57 +0000 Message-ID: <8632690b-5e85-43fb-9121-a8910074726d@amd.com> Date: Thu, 14 Dec 2023 12:49:50 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ethdev: add dump regs for telemetry Content-Language: en-US To: Jie Hai , dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko , Bruce Richardson Cc: lihuisong@huawei.com, fengchengwen@huawei.com, liudongdong3@huawei.com References: <20231214015650.3738578-1-haijie1@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm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e2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231214015650.3738578-1-haijie1@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0265.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b5::14) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB6902:EE_ X-MS-Office365-Filtering-Correlation-Id: 91edfd85-e97b-4a3a-1ef4-08dbfca32cdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p8jdU5YuzC/T+R26Gm49gpdM1qElnlm/eJztV73zuVwuBncpYmiDMok+SHzYDu03RhV4mznX5f8qoGw6rZaUJuff8wbC7kOuydrhqfPmJe0QrAC1usa91yUeOqtQUmFIPHUzIw0OXXUJFvn+5T73AU6DHsIi2EP7uVwRQOwzTdUzw2LZ7J4KRQlw9QLLsVtHAWm/cywna3eoD6Cjt/P4/nhzGmxOLiIjCPKQ98E5OU/ZIMijXv4z5btuVTDYR48WnigH2gzIDwsh/UQ2QxFFx75pzLLHFgasPA3A2PEBZcfqBs5Ky5M+qKDxNZB5OPISPomnGdTF7qBWSUr8O2DVaUTjA0xVPgiLQMDFh1ZTEDnwuBFrMQ8emCjs5uF6N41wej1CeU4eNJnntQqA7IxtWy0WYXA0Y5TdHpNrNnhKyPP/QQ1Esjus1Q0oI64ErynEfVm5LS78AtjZdB+PVUb0hrHjhTsWUK6IWtwOAMwL7P/fGqXeQOUIVQPGNIr52zH8iuhxaDeq0PBxtK5FfE/xg1WJCpmY/1SrpAmxbl7PpVJ0N+et75IH2sDw9Lm77LL4iDpkuLbWvxU07zTTaf4TfEx/volvMdW7Ev5WSzm3xQmpLFRAtA0MtvFgo0dPliJGPigCq5Rpdiu+9RuUMJpPmQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(346002)(366004)(376002)(396003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(31696002)(36756003)(478600001)(31686004)(6486002)(41300700001)(86362001)(2906002)(53546011)(6666004)(38100700002)(6506007)(66556008)(66946007)(110136005)(66476007)(6512007)(316002)(8936002)(8676002)(26005)(4326008)(2616005)(5660300002)(44832011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UXFuUWFGZ01Lc25VeGJCOGQ2bWVFKzN3NE1ScU5neXUvZ1A0QkYrakNKTzFt?= =?utf-8?B?NEMwZ3NMckJKQndMcDFEcUw4NEJjb3JJTnEwRzFzaWZvb0ZVcEhadVpWS1p1?= =?utf-8?B?YlNkNUZKMWNwMVhwNTdXNXJySVhSQmJFS1RhTTl4aUN3NEZOYWQvdmpRNHdW?= =?utf-8?B?T3Zoa0dMZ1Axdmh1ZzIrcFhLei9qa0hLQ3Eya21IQnNrTGZaRXFsK3J1dFhp?= =?utf-8?B?ZHlvOVdyUGRnZ05IbmZOUEoyK2tza284RFZ6eTRUdzNDRDdtSVh4azBKMmFW?= =?utf-8?B?OGlwVjV6ZkNvYkt2S1hZTjdidm9TRHV1aU0wR01iZ011ZFFycjE4OTh2dnBq?= =?utf-8?B?VXR4b1g5SXppQUlBVkxvTUMxZ0RDZnJhOUhPWXJ3b2Q2d2hLSzFWc0ZTeHc0?= =?utf-8?B?dnpjZWpKRHBzYlNYRklUd1hCaGJpczBha0ltbWpNMjNpdXVzRWdUZFFIWTlr?= =?utf-8?B?d1hSUEwrUnQ3WlhCdWJTV1c1RC8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M1JiRE5QOEhOTWliaU16Yi81NzFpSzkvR1NkZ0E3Nm84SEREM2hr?= =?utf-8?B?ZWJKeHQxUTR6TStyazc1MjJUSGYyY0NzM3ZMTlF3cHJPRFJ1allKZFlEZyta?= =?utf-8?B?NU5qZmxNcVh0UjllOUtmUExUQjdxeXc5bjhQUlNJcGt4eGMyNjV3MWJEL1ly?= =?utf-8?B?allobG82c0phK210U2NTUDFHU0cxb0dmeGs0cUl6d0VBQ1IyMjhVNFlyMDBr?= =?utf-8?B?MlJZU3BzOHRnSVROMW40V3ZxYXdCcE5tWXd1RUhoL05nZ2FZejMxSytPdEk4?= =?utf-8?B?VE5xMFBGQUhIdUJyT2MwaEVZVnVZLzZobTNacElBaHNhYU5QRjlFTE93OVB3?= =?utf-8?B?ak5meHdSUEFtR2FBTmhXcW1WcE9NNGsrU3o2dXh5d0xJL2MvNk04Q0Nqa0ZI?= =?utf-8?B?QzM4L3g5d1g5b1NrUXowQTRPTm5LS0VuWEZtMjM1MFBoc2xoVXdKMTZaM3M3?= =?utf-8?B?akJJMnVrbFFWeDNaR1B6azBVa1JoTWJzTUdMdldUdkh3ZzRTTWhFNHNhKzRh?= =?utf-8?B?cENGVFZ0TGpHWUNWZlRSenJhZFQ5R3JzVC9INHhWOElaOHIzUXZhb2l3OVBD?= =?utf-8?B?V01pOTk4dHRKT0lvMlQrdi9Ubm1XVU90cWxzVmUwbzFad1dPajNjekJkSHdj?= =?utf-8?B?eEFKMTY0SC9kWm9LcmpxeGpHWXN0dkgrK011bXlkOTZVbXdnVVdkaDNxb1FM?= =?utf-8?Q?qaK5qTyDAwfMgbAQnJeliNCqu?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91edfd85-e97b-4a3a-1ef4-08dbfca32cdf X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 12:49:57.0184 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qQFvk6t09G0LumSh/evbJWZi8Owm0clPt+8Q5OrmNL6qA9vKfA5+I4rQi1dTyy8y X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6902 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 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" > } > } > > Signed-off-by: Jie Hai > --- > lib/ethdev/rte_ethdev_telemetry.c | 93 +++++++++++++++++++++++++++++++ > 1 file changed, 93 insertions(+) > > diff --git a/lib/ethdev/rte_ethdev_telemetry.c b/lib/ethdev/rte_ethdev_telemetry.c > index b01028ce9b60..33ec4739aa9b 100644 > --- a/lib/ethdev/rte_ethdev_telemetry.c > +++ b/lib/ethdev/rte_ethdev_telemetry.c > @@ -5,6 +5,7 @@ > #include > #include > > +#include > #include > #include > > @@ -1395,6 +1396,96 @@ eth_dev_handle_port_tm_node_caps(const char *cmd __rte_unused, > return ret; > } > > +static int > +eth_dev_get_port_regs(uint16_t port_id, struct rte_dev_reg_info *reg_info, > + const char *file_name) > +{ > + uint64_t buf_size; > + size_t nr_written; > + void *data; > + FILE *fp; > + int ret; > + > + ret = rte_eth_dev_get_reg_info(port_id, reg_info); > + if (ret != 0) { > + RTE_ETHDEV_LOG(ERR, > + "Error getting device reg info: %d\n", ret); > + return ret; > + } > + > + buf_size = reg_info->length * reg_info->width; > + data = rte_zmalloc(NULL, buf_size, 0); > + if (!data) { > + RTE_ETHDEV_LOG(ERR, > + "Error allocating %zu bytes buffer\n", buf_size); > + return -ENOMEM; > + } > + > + reg_info->data = data; > + ret = rte_eth_dev_get_reg_info(port_id, reg_info); > + if (ret != 0) { > + RTE_ETHDEV_LOG(ERR, > + "Error getting regs from device: %d\n", ret); > + goto out; > + } > + > + fp = fopen(file_name, "wb"); > + if (fp == NULL) { > + printf("Error during opening '%s' for writing: %s\n", > + file_name, strerror(errno)); > + ret = -EINVAL; > + } else { > + nr_written = fwrite(reg_info->data, 1, buf_size, fp); > 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?