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 07DE8A0544; Mon, 10 Oct 2022 15:13:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF4F842BB3; Mon, 10 Oct 2022 15:13:11 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id B3E9F42BB2 for ; Mon, 10 Oct 2022 15:13:10 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MmK5L0LvgzpVf5; Mon, 10 Oct 2022 21:09:58 +0800 (CST) Received: from [10.67.103.235] (10.67.103.235) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 10 Oct 2022 21:13:06 +0800 Subject: Re: [PATCH v9 7/8] app/procinfo: support descriptor dump To: "Pattan, Reshma" , "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@xilinx.com" , "andrew.rybchenko@oktetlabs.ru" References: <20220722091236.15469-1-liudongdong3@huawei.com> <20221008105353.18195-1-liudongdong3@huawei.com> <20221008105353.18195-8-liudongdong3@huawei.com> CC: Min Hu , Maryam Tahhan From: Dongdong Liu Message-ID: <0fce5e94-1bed-2343-052f-0b5bf826a13f@huawei.com> Date: Mon, 10 Oct 2022 21:13:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.235] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500017.china.huawei.com (7.221.188.110) 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 Hi Reshma Many thanks for your review. On 2022/10/10 17:08, Pattan, Reshma wrote: > > >> -----Original Message----- >> From: Dongdong Liu >> +static void >> +nic_descriptor_display(uint16_t port_id, struct desc_param *desc, >> + desc_dump_t desc_dump) >> +{ >> + static const char *nic_desc_border = "###"; >> + uint16_t queue_id = desc->queue_id; >> + uint16_t offset = desc->offset; >> + uint16_t num = desc->num; >> + >> + printf("%s NIC descriptor for port %u %s\n", >> + nic_desc_border, port_id, nic_desc_border); >> + >> + desc_dump(port_id, queue_id, offset, num, stdout); } >> + > > >> int >> main(int argc, char **argv) >> { >> @@ -1732,6 +1806,12 @@ main(int argc, char **argv) >> metrics_display(i); >> #endif >> >> + if (enable_shw_rx_desc_dump) >> + nic_descriptor_display(i, &rx_desc_param, >> + rte_eth_rx_descriptor_dump); > > I don't think you need the function nic_descriptor_display() to dump the descriptors. > You can call the rte_eth_rx_descriptor_dump() directly here. And same comment for below code too. > This way you can have the RX/TX descriptor scase specific dump printfs in these sections. > Also, the printf in the nic_descriptor_display() is not telling if your dumping TX descriptors or Rx descriptors. > If you want to keep nic_descriptor_display() that's fine but you need to make sure printf to be RX/TX specific. Good point, will do. Thanks, Dongdong > >> + if (enable_shw_tx_desc_dump) >> + nic_descriptor_display(i, &tx_desc_param, >> + rte_eth_tx_descriptor_dump); >> } >> >> #ifdef RTE_LIB_METRICS >> -- >> 2.22.0 > > . >