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 22D8743A96; Wed, 7 Feb 2024 00:10:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD814402E4; Wed, 7 Feb 2024 00:10:37 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2085.outbound.protection.outlook.com [40.107.100.85]) by mails.dpdk.org (Postfix) with ESMTP id 1E39240285 for ; Wed, 7 Feb 2024 00:10:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BP+yEous4Q0nIxuCdpsGetYNU+ZLhYuwBOoCWY53JBr5mivhJos/Qr6ONtOyd9LyJZIpnfQmwDjQQQh2KDdMx6LDSXkbD08R03o6iec906nZVGTjRFrzaNNwS/Z9zvaZmmskrigvS7cPXYuUcYZJdm16q6GXt18dCqGmUybAxIJJh7pUthVPHsoISxukK4GlRfsBGtfmtfhPgutCuxbvsXDiBbdE/gpKvHoR7TyfEpqczSc7Nr/dHj5pq8hWCXiiXEweMoE6PeW2pCfvn0vNIrXQPF4SqAjvqxREwrdMVmrR/sRekck/6itSwscW+YCc3yFWZnJ6A8JTzED6PxacWw== 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=tFB/37bkVooM9XFKK972zjB1IKT4F8e/4avYBWHmP70=; b=e+YjhfUe64SRsg1gaVtP09TAq1i5fjX5/ExbtjuInsMrUexonL87UboEAJBq3S6uNs9aEeW0oqCJHWJdie9TfvU3uLfYtiiPfNxhDq08pVCVWNXla2u4qVkKxcfui9iEnvmMd1CZnrS9flORbh6IkTPQ14QvZR4UGfYGlcXOo0cH7gtqtR5EngJfxz3krA/FKWzjx2FqjY6Xo9tTzxdX6gNHzZpvKBF5O2No1AY2VqFNfM3t2d5wVg/vN2AQlUk9Hp78MrcyssVNZ7Jd3FegytW5FMzx2BjMct5eZm7qcaj6SuwGgwp4anPb43NBL5CZq3CjRS4fWy1osv2AehEdjQ== 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=tFB/37bkVooM9XFKK972zjB1IKT4F8e/4avYBWHmP70=; b=zdmm1evu+RJV6qsOFkJ2XV1lD1Bl9+ZpJLcjCHB3QAkOL9IECseuFtvEj6GnxjWkDBq6cKg7cK91bHUVdfnGClezxpQ/ROMXDvbHONrVk49m2vi9wuByDO338k8SvYyUTTUyoS1jSK265yCABY0HMDuiXYK+ndd6Qsy1K3uYplg= 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 LV8PR12MB9207.namprd12.prod.outlook.com (2603:10b6:408:187::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Tue, 6 Feb 2024 23:10:31 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7270.016; Tue, 6 Feb 2024 23:10:31 +0000 Message-ID: Date: Tue, 6 Feb 2024 23:10:27 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] app/testpmd: command to get descriptor used count Content-Language: en-US To: skoteshwar@marvell.com, Aman Singh , Yuying Zhang Cc: dev@dpdk.org, jerinj@marvell.com References: <1706098726-27359-1-git-send-email-skoteshwar@marvell.com> <1706795562-7099-1-git-send-email-skoteshwar@marvell.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/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkR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In-Reply-To: <1706795562-7099-1-git-send-email-skoteshwar@marvell.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0067.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|LV8PR12MB9207:EE_ X-MS-Office365-Filtering-Correlation-Id: e9605db3-b6d4-465a-b1f6-08dc2768d09a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x8QizK79OvCAixi44MGOBg5Qv0nXGOjgmkShWXT3qK5c1LHjocHWfMIsNnnoQ1pPhkvVZH5IC9c0NcXW7VLu08o/RKrz21yTQqXY/nBPjc/V72vCexvkCwtsX6fX1OA1PF94IDlTQlu2r0K4SBeXwOuFV3Vxr56rBASf4xXokb41P3IKHbwc05Sppb8Kvq4le4nPU+i4ZfSWfvboSGUGsAmHwtCOG1RqiV0nDlXLStMq2K0XQaD1uX86UdIqyU52qVuxMWzB2yES2ZVuuWSPHyaqEUdZQbnDPr+/JGeuRIQYhdTD7LYhhCYC5qR3V/Jb7vV9qvmMWKEBiN8W43YprhGh4o9fqv1nOLZAId+L+WARHWKydcLpRdoWBjFa3k6gn6FeDhbddJiSHTYUCnxNgUAg+5AeT/FZoDypROZpAjb4CbxCn88SS0GD0AH63jNpFsaAZXe5DfVZNtBu1vn0s56V2FSqjnGnhac2YlPIj29tj5kyFhAplr+S3libArnElkk2xay4pZNEK6H7NOcmHe0CFZX/kfi/KExmJ3DC2Mcuj/KXImNthkPsN50PieGeEqsGxXGPXXt+2SnIecjFz+wqe33hhzA8JYkGDQBJ8O1POuGycxmTds/CPEpVeL2LK8Ga42ukrnjw3Nzdy9Le/Q== 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)(346002)(366004)(136003)(376002)(396003)(39860400002)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(6666004)(31686004)(36756003)(86362001)(478600001)(66476007)(6486002)(53546011)(6512007)(41300700001)(83380400001)(66556008)(2616005)(26005)(5660300002)(31696002)(6506007)(66946007)(316002)(2906002)(8676002)(8936002)(44832011)(110136005)(4326008)(38100700002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OEdSclJGVmRsS0dpQ0p1QWpwaDNVTVdEWXZCUWJ3elpLb1FJMDFGTDIwajNr?= =?utf-8?B?ejRIMmYrS2kxT2M2a0Q1VXNNOWszY0FIRkU2dXdneHVydVdyQUdMWmNqNngz?= =?utf-8?B?MFBtcjhZVDY3aVhOUHJ1MWViQ2RGcllQdkVGQWUybjVZZ3h2RWlxWEFqeVB3?= =?utf-8?B?djh1SFpVVWt2UjZoc0R1OC9SNmJEamQycjJtNEZJc1ZGa08yYjUzdHNOd2Vl?= =?utf-8?B?Z0RaY1BzR0lSVFJMek5XMmloTnV0Z3BLU0swemZaZGpNZDBkOTA5cDBiTzB3?= =?utf-8?B?M0tIWHVCYmd4L1hURFAwVUFsV2lwMGc1a1VhdTJnK2hnUWxtMzlidXo0YzM3?= =?utf-8?B?UDVnUTN1UEtObFVvYXFvVlE1Sjc1Y3NrcERFZGd2Ujlmd1RZOGw3bHRkbVZT?= =?utf-8?B?YmVZaDhMdXJ2TnpDR2NuTzIxQkJ4RjFhVCtDTnhZRmR0QTJROWZVWWJIR2lj?= =?utf-8?B?cDhJU3J3UVhKQ1lGcGNNZ3ZTMDFtTjBPZGlqeTJDdDFvK0NJcm9GQkdmQTJZ?= =?utf-8?B?WXJYaU40d2UyNExI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B?YzROakxmcUc2bG9rU0c4aG9WN2w5RlExd1pyckxLQ3lZRStib1h0ZlJOV1Zo?= =?utf-8?B?Nm1zOEhyR1U2cXZEQmNyWjdaVDdBTHlzYWtqY2N1SWlMQUhEYkN1UG5PVkkr?= =?utf-8?B?TURXQU1MaCtFYk40WExqNmRMU1FZK3RmYjZDNWY5anM2U0QvVXhGL1FCczlL?= =?utf-8?B?WllhTzFPMzlFeGI4WC9pUUxmZmxOVlJoTEhTVFpDM0lEU2R2QjVDaVgveGF1?= =?utf-8?B?RHhMZmZ0UHJMZ242MXk3dGlsSXJxSmVuT0hQTm5WRmE5TkJHc3FNWnZ0U3FE?= =?utf-8?B?Zy9RVVowSnpGYlNKUlpaMm5CWUlpNCtIT0dYaWRrU2hNY1Bkc0UxeHdIZkZL?= =?utf-8?B?aC9LcUJRY0JKWGJMNmU4WUR2L1Vva1kvWCt1THg0SEVxMGF1QUZzTzArLzVQ?= =?utf-8?B?MWtYVzBmSDE3ajF0amN4M3doUkt4ZVhFclFpVjduSkQ1MEtsSmJMZ1A1QXE2?= =?utf-8?B?RnhiSmxkb1I5ZFFwSG8rVVdwQktmOVhlQW1peXdFeXh3S3FZWURyTUo3N2JY?= =?utf-8?B?Wk16V25pT3hwQ1laVHBjSmRJK2p0U3hQR1N5QlJwT3paUHZVcTJLM1F4WU1h?= =?utf-8?B?WXM3VjM1OEtEK2xDNEQ0RGt4STduN3ZId0s3Y1JtbVg0a0lFWW1HbGlOS3l6?= =?utf-8?Q?gezOsblwh1EUTX2/xSrTKqizG?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9605db3-b6d4-465a-b1f6-08dc2768d09a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 23:10:31.1714 (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: h90fXKifC07eK7IG5Y0W0k6hoPtOOzX7oacpO5KdCzozaZZhS4HcgLSV3zQ1SAWt X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9207 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 2/1/2024 1:52 PM, skoteshwar@marvell.com wrote: > From: Satha Rao > > Existing Rx desc used count command extended to get Tx queue > used count. > testpmd> show port 0 rxq 0 desc used count > testpmd> show port 0 txq 0 desc used count > > Signed-off-by: Satha Rao > --- > Depends-on: series-30833 ("ethdev: support Tx queue used count") > > v2: > extended rx_queue_desc_used_count command to support Tx > updated testpmd_app_ug with new command > > app/test-pmd/cmdline.c | 184 +++++++++++--------- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 10 +- > 2 files changed, 104 insertions(+), 90 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index f704319771..c8c88f3236 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -12638,6 +12638,104 @@ static cmdline_parse_inst_t cmd_show_port_supported_ptypes = { > }, > }; > > +/* *** display rx/tx queue descriptor used count *** */ > +struct cmd_show_rx_tx_queue_desc_used_count_result { > + cmdline_fixed_string_t cmd_show; > + cmdline_fixed_string_t cmd_port; > + cmdline_fixed_string_t cmd_dir; > + cmdline_fixed_string_t cmd_desc; > + cmdline_fixed_string_t cmd_used; > + cmdline_fixed_string_t cmd_count; > + portid_t cmd_pid; > + portid_t cmd_qid; > +}; > + > +static void > +cmd_show_rx_tx_queue_desc_used_count_parsed(void *parsed_result, __rte_unused struct cmdline *cl, > + __rte_unused void *data) > +{ > + struct cmd_show_rx_tx_queue_desc_used_count_result *res = parsed_result; > + int rc; > + > + if (!strcmp(res->cmd_dir, "rxq")) { > + if (rte_eth_rx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { > + fprintf(stderr, "Invalid input: port id = %d, queue id = %d\n", > + res->cmd_pid, res->cmd_qid); > + return; > + } > + > + rc = rte_eth_rx_queue_count(res->cmd_pid, res->cmd_qid); > + if (rc < 0) { > + fprintf(stderr, "Invalid queueid = %d\n", res->cmd_qid); > Can you please unify the error message for Rx and Tx? > + return; > + } > + printf("RxQ %d used desc count = %d\n", res->cmd_qid, rc); > + } else if (!strcmp(res->cmd_dir, "txq")) { > + if (rte_eth_tx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { > + fprintf(stderr, "Invalid input: port id = %d, queue id = %d\n", > + res->cmd_pid, res->cmd_qid); > + return; > + } > + > + rc = rte_eth_tx_queue_count(res->cmd_pid, res->cmd_qid); > + if (rc < 0) { > + fprintf(stderr, "Tx queue count get failed rc=%d queue_id=%d\n", rc, > + res->cmd_qid); > + return; > + } > + printf("TxQ %d used desc count = %d\n", res->cmd_qid, rc); > + } > +} > + > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_show = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_show, "show"); > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_port = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_port, "port"); > +static cmdline_parse_token_num_t cmd_show_rx_tx_queue_desc_used_count_pid = > + TOKEN_NUM_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_pid, RTE_UINT16); > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_dir = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_dir, "rxq#txq"); > +static cmdline_parse_token_num_t cmd_show_rx_tx_queue_desc_used_count_qid = > + TOKEN_NUM_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_qid, RTE_UINT16); > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_desc = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_desc, "desc"); > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_used = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_count, "used"); > +static cmdline_parse_token_string_t cmd_show_rx_tx_queue_desc_used_count_count = > + TOKEN_STRING_INITIALIZER > + (struct cmd_show_rx_tx_queue_desc_used_count_result, > + cmd_count, "count"); > +static cmdline_parse_inst_t cmd_show_rx_tx_queue_desc_used_count = { > + .f = cmd_show_rx_tx_queue_desc_used_count_parsed, > + .data = NULL, > + .help_str = "show port rxq|txq desc used count", > + .tokens = { > + (void *)&cmd_show_rx_tx_queue_desc_used_count_show, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_port, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_pid, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_dir, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_qid, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_desc, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_used, > + (void *)&cmd_show_rx_tx_queue_desc_used_count_count, > + NULL, > + }, > +}; > + > /* *** display rx/tx descriptor status *** */ > struct cmd_show_rx_tx_desc_status_result { > cmdline_fixed_string_t cmd_show; > @@ -12745,90 +12843,6 @@ static cmdline_parse_inst_t cmd_show_rx_tx_desc_status = { > }, > }; > > -/* *** display rx queue desc used count *** */ > -struct cmd_show_rx_queue_desc_used_count_result { > - cmdline_fixed_string_t cmd_show; > - cmdline_fixed_string_t cmd_port; > - cmdline_fixed_string_t cmd_rxq; > - cmdline_fixed_string_t cmd_desc; > - cmdline_fixed_string_t cmd_used; > - cmdline_fixed_string_t cmd_count; > - portid_t cmd_pid; > - portid_t cmd_qid; > -}; > - > -static void > -cmd_show_rx_queue_desc_used_count_parsed(void *parsed_result, > - __rte_unused struct cmdline *cl, > - __rte_unused void *data) > -{ > - struct cmd_show_rx_queue_desc_used_count_result *res = parsed_result; > - int rc; > - > - if (rte_eth_rx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { > - fprintf(stderr, > - "Invalid input: port id = %d, queue id = %d\n", > - res->cmd_pid, res->cmd_qid); > - return; > - } > - > - rc = rte_eth_rx_queue_count(res->cmd_pid, res->cmd_qid); > - if (rc < 0) { > - fprintf(stderr, "Invalid queueid = %d\n", res->cmd_qid); > - return; > - } > - printf("Used desc count = %d\n", rc); > -} > - > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_show = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_show, "show"); > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_port = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_port, "port"); > -static cmdline_parse_token_num_t cmd_show_rx_queue_desc_used_count_pid = > - TOKEN_NUM_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_pid, RTE_UINT16); > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_rxq = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_rxq, "rxq"); > -static cmdline_parse_token_num_t cmd_show_rx_queue_desc_used_count_qid = > - TOKEN_NUM_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_qid, RTE_UINT16); > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_desc = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_count, "desc"); > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_used = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_count, "used"); > -static cmdline_parse_token_string_t cmd_show_rx_queue_desc_used_count_count = > - TOKEN_STRING_INITIALIZER > - (struct cmd_show_rx_queue_desc_used_count_result, > - cmd_count, "count"); > -static cmdline_parse_inst_t cmd_show_rx_queue_desc_used_count = { > - .f = cmd_show_rx_queue_desc_used_count_parsed, > - .data = NULL, > - .help_str = "show port rxq desc used count", > - .tokens = { > - (void *)&cmd_show_rx_queue_desc_used_count_show, > - (void *)&cmd_show_rx_queue_desc_used_count_port, > - (void *)&cmd_show_rx_queue_desc_used_count_pid, > - (void *)&cmd_show_rx_queue_desc_used_count_rxq, > - (void *)&cmd_show_rx_queue_desc_used_count_qid, > - (void *)&cmd_show_rx_queue_desc_used_count_desc, > - (void *)&cmd_show_rx_queue_desc_used_count_used, > - (void *)&cmd_show_rx_queue_desc_used_count_count, > - NULL, > - }, > -}; > - > Why moving the function up, can you please keep it in same place. Also can you please update help command output in 'cmd_help_long_parsed()' function at the beggining of the file?