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 677CBA04FD; Tue, 4 Oct 2022 00:40:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FFF440A87; Tue, 4 Oct 2022 00:40:31 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2083.outbound.protection.outlook.com [40.107.212.83]) by mails.dpdk.org (Postfix) with ESMTP id 8CF2540685 for ; Tue, 4 Oct 2022 00:40:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SWYIUbcw2GcyoNQpeqAN7taJcevlkEkT+S/DSkWWElU0CSZEZGXL2f79CCZ/lJcLLzyEuCn551pfbu78G8sc5YmF7LtWwNvr9uZhqX5kYFx3ilJApH/K2RmRUmxyI8p/TrewbrHzjLzTFD5MZMUH3jY+JoGJmrvkRl9sND5kCFEnC10jxZLqz0527MkCSgBqr9FfpDsAp1fdAMbr0CVU3rF1xbhETNLsjtcarp3OYUYYcCg8817M3lgMt3N324/Mj+alWfoBHvxFGVa2cXscAMEMfYchBH+0YCnyGa+l5G5+XGQGMxFohRpYlaFXPAfQkYGPubE3sQ9h+2nN4UpyjA== 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=OzzRihO3AxOBAYvOE3E89RWHHKKU4gyW6m/CnfJrON4=; b=Nf/waEa4JAZjYVHUA5WR+TCF/9t4NnffgE8BQ6imZuj4Hn/nYAkMlXX0KO7WGepb7jlNgQkTr/eO8FKeJTxecyIiEn36Uad6piJoA5wq78VsWvVH6Wz9bR1CdyjfquskE9Bq7figg5pxs6RiWXmPS8sS1P5t3f0iyEfKh3PR9AudfZxKZ/MbU/WGu+3yQmyOpzE0+Av3TduNonkt8mGNZQgTctkZWyUk74x8TNhOmnku+u0ccRYvGIYCoeQGONscNeWbqO7Rs8cxhSf0c7p+y6IlMoivKT42i5wSc4Jd//9Y1KE5dJpCtCoCzzesexaelg9Qu9O1Nd/c5QQizijihQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=huawei.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OzzRihO3AxOBAYvOE3E89RWHHKKU4gyW6m/CnfJrON4=; b=Rlb8v1iCiH1MErXBQK2Rw2cvKCjsXNMXzAImCW48cscY71DuqP9RXQ83xPEgHpHmB1DzJ2FlmupM8WOCobOxgFxm0XkP206hqCVvAT21zYJGE1O7m+NQfvzuHjfuJAXi4fxCevmA7Y3cyDOyEK0Da6K+VlgYhmBSwPd0jNptRmI= Received: from BN8PR15CA0025.namprd15.prod.outlook.com (2603:10b6:408:c0::38) by SA0PR02MB7145.namprd02.prod.outlook.com (2603:10b6:806:e2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Mon, 3 Oct 2022 22:40:28 +0000 Received: from BN1NAM02FT015.eop-nam02.prod.protection.outlook.com (2603:10b6:408:c0:cafe::f0) by BN8PR15CA0025.outlook.office365.com (2603:10b6:408:c0::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.26 via Frontend Transport; Mon, 3 Oct 2022 22:40:28 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT015.mail.protection.outlook.com (10.13.2.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5676.17 via Frontend Transport; Mon, 3 Oct 2022 22:40:27 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 3 Oct 2022 23:40:14 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Mon, 3 Oct 2022 23:40:13 +0100 Envelope-to: ferruh.yigit@xilinx.com, liudongdong3@huawei.com, dev@dpdk.org, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, stephen@networkplumber.org, mdr@ashroe.eu, humin29@huawei.com Received: from [10.71.194.74] (port=17231) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1ofU6f-0005fj-9n; Mon, 03 Oct 2022 23:40:13 +0100 Message-ID: <32e4a2fe-e75f-e832-278c-651d5081324a@amd.com> Date: Mon, 3 Oct 2022 23:40:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v4 1/3] ethdev: introduce ethdev desc dump API To: Dongdong Liu , , , , , , CC: "Min Hu (Connor)" References: <20220527023351.40577-1-humin29@huawei.com> <20220923074316.25077-1-liudongdong3@huawei.com> <20220923074316.25077-2-liudongdong3@huawei.com> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20220923074316.25077-2-liudongdong3@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1NAM02FT015:EE_|SA0PR02MB7145:EE_ X-MS-Office365-Filtering-Correlation-Id: e00667a9-ee2e-4a50-43b2-08daa59044f6 X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2YD/x3zX9gLcu24CG7LHHwMPAXDMCEaq7DU2jO7QM8GbiEsKio2N2xmGCuWxAwfm57GhSAWX2Jd2HJjzoAJxRIhevepJcT/inTpifxFzHKXQ9/y7VHMPXc04k3yU2GGB5Tl6QUghZKsdGIxZJHRyMzTbAhCd7THHwgq2XKzDv7JnLCdohKdAiHTZMyQ0E+OmL7pFVezFf4mJQynbR8HqAmWe7PrFp7Wz+k382UXKVvYZSrS8/Xmg1v7wBxA9fEakAkjL7H8iWeOZV1NzCBwkHzD4pSJ5aATABHc42+K5SsPPQE/3nj6BFnKmnmC6yddKj3L4gcgbzzfQ8d7ZWGF6+xLqO4+yHd42oCDFalmiqhxcR/JvQ8utwayG/tm/TMbrukHzbpfz9oXI8dLL29kbbH5GsJQ5xGWt7dqAfVwhRn30/MocUwylJh5EwTgAq887n5F8wgeCmQ+ex3XVBWq7u6kz/3v8wxcdBc494hCClKkx5cJJGUeebY3S4ZDh7RiOd2XcmVgRXvmyln+YMHYMvAFMmc0a6GdAMTlGqyb/GimJJkn+nRRdujAWyKX+cRJ8NMurvmE6hE6Tr32HY0MjlxmytdKSTGzm+5YlBVpFuPJB5+MQFtnTNIhoeeKSDITM3yuP7UW76QmuBn/nyq8UEJ9yDgtGeNMzBC+umjE02YB6Od41w8/sylObziq/Q6S4QcYwymonvfh0epE/bU6c0p6OdW1GDNXWXSB/D4DXN0+3Yf43eIQIVKwKCTzp4TRyZNvoyrJPD0X4jFQbelsMd1gT2N9gQ0fF8f1MH3ke5MrLQqp1NlELJe2KhLHL0AXN X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(136003)(376002)(346002)(39860400002)(451199015)(46966006)(40470700004)(336012)(82310400005)(35950700001)(47076005)(5660300002)(8936002)(9786002)(31686004)(2616005)(26005)(36756003)(41300700001)(498600001)(82740400003)(70586007)(70206006)(83380400001)(4326008)(8676002)(2906002)(40460700003)(110136005)(44832011)(316002)(356005)(53546011)(40480700001)(7636003)(86362001)(31696002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2022 22:40:27.5491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e00667a9-ee2e-4a50-43b2-08daa59044f6 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT015.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR02MB7145 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 9/23/2022 8:43 AM, Dongdong Liu wrote: > > From: "Min Hu (Connor)" > > Added the ethdev Rx/Tx desc dump API which provides functions for query > descriptor from device. HW descriptor info differs in different NICs. > The information demonstrates I/O process which is important for debug. > As the information is different Overall OK to have these new APIs, please find comments below. Do you think does it worth to list this as one of the PMD future in future list, in 'doc/guides/nics/features.rst' ? between NICs, the new API is introduced. > > Signed-off-by: Min Hu (Connor) > Signed-off-by: Dongdong Liu > Acked-by: Ray Kinsella <...> > int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file); > > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * Dump ethdev Rx descriptor info to a file. > + * > + * This API is used for debugging, not a dataplane API. > + * > + * @param file > + * A pointer to a file for output. > + * @param dev > + * Port (ethdev) handle. > + * @param queue_id > + * The selected queue. > + * @param num > + * The number of the descriptors to dump. > + * @return > + * - On success, zero. > + * - On failure, a negative value. > + */ > +__rte_experimental > +int rte_eth_rx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id, > + uint16_t num); There are other HW desc related APIs, like 'rte_eth_rx_descriptor_status()'. Should this APIs follow same naming convention: 'rte_eth_rx_descriptor_dump()' 'rte_eth_tx_descriptor_dump()' > + > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * Dump ethdev Tx descriptor info to a file. > + * > + * This API is used for debugging, not a dataplane API. > + * > + * @param file > + * A pointer to a file for output. > + * @param dev > + * Port (ethdev) handle. > + * @param queue_id > + * The selected queue. > + * @param num > + * The number of the descriptors to dump. > + * @return > + * - On success, zero. > + * - On failure, a negative value. > + */ > +__rte_experimental > +int rte_eth_tx_hw_desc_dump(FILE *file, uint16_t port_id, uint16_t queue_id, > + uint16_t num); 'num' is provided, does it assume it starts from offset 0, what do you think to provide 'offset' as parameter? It may be a use case to start from where tail/head pointer is. > + > + > #include > > /** > diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map > index 03f52fee91..3c7c75b582 100644 > --- a/lib/ethdev/version.map > +++ b/lib/ethdev/version.map > @@ -285,6 +285,8 @@ EXPERIMENTAL { > rte_mtr_color_in_protocol_priority_get; > rte_mtr_color_in_protocol_set; > rte_mtr_meter_vlan_table_update; > + rte_eth_rx_hw_desc_dump; > + rte_eth_tx_hw_desc_dump; These new APIs should go after "# added in 22.11" comment, if you rebase on top of latest HEAD, comment is already there.