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 0367FA034F; Mon, 29 Mar 2021 08:47:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0DBF40151; Mon, 29 Mar 2021 08:47:56 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id D046F40042 for ; Mon, 29 Mar 2021 08:47:55 +0200 (CEST) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F834Z58tkz19JqD for ; Mon, 29 Mar 2021 14:45:50 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 14:47:51 +0800 To: "Li, Xiaoyun" , "dev@dpdk.org" CC: "Yigit, Ferruh" References: <1616830494-46559-1-git-send-email-humin29@huawei.com> From: "Min Hu (Connor)" Message-ID: <93514100-a32f-121c-635d-76a9b35ce0e3@huawei.com> Date: Mon, 29 Mar 2021 14:47:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix Tx/Rx descriptor query error log 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 Sender: "dev" Hi, xiaoyun, All has been done in v2, please review it, thanks. ÔÚ 2021/3/29 13:49, Li, Xiaoyun дµÀ: > Hi > >> -----Original Message----- >> From: Min Hu (Connor) >> Sent: Saturday, March 27, 2021 15:35 >> To: dev@dpdk.org >> Cc: Yigit, Ferruh ; Li, Xiaoyun >> Subject: [PATCH] app/testpmd: fix Tx/Rx descriptor query error log >> >> From: Hongbo Zheng >> >> Currently in testpmd, if we input "show port 0 rxq 0 desc 9999 status" >> and if rte_eth_rx_descriptor_status return a negative value, testpmd will print > returns >> "Invalid queueid = 0", seems user input an invalid queueid, while the actual > Users input/ user inputs >> situation may be that 9999 is out of bounds, current information is misleading to >> users. >> >> This patch modify the Tx/Rx descriptor query error information in testpmd by > modifies >> add offset information, now if we fail to query Tx/Rx descriptor, testpmd will > adding >> print "Invalid queueid = 0, offset = 9999", then we can check our input. > > The commit log has grammar mistakes. And I think you can simply explain what the patch does like: > This patch adds more err info for Tx/Rx descriptor query command. > > And the print should be "Invalid input: queue id = 0, desc id = 9999" because you still don't tell users if it's queue id err or desc id err. > > BRs > Xiaoyun >> >> Fixes: fae9aa717d6c ("app/testpmd: support checking descriptor status") >> Cc: stable@dpdk.org >> >> Signed-off-by: Hongbo Zheng >> Signed-off-by: Min Hu (Connor) >> --- >> app/test-pmd/cmdline.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index >> 287d7a0..1a74a61 100644 >> --- a/app/test-pmd/cmdline.c >> +++ b/app/test-pmd/cmdline.c >> @@ -16633,7 +16633,8 @@ cmd_show_rx_tx_desc_status_parsed(void >> *parsed_result, >> rc = rte_eth_rx_descriptor_status(res->cmd_pid, res->cmd_qid, >> res->cmd_did); >> if (rc < 0) { >> - printf("Invalid queueid = %d\n", res->cmd_qid); >> + printf("Invalid queueid = %d, offset = %d\n", >> + res->cmd_qid, res->cmd_did); >> return; >> } >> if (rc == RTE_ETH_RX_DESC_AVAIL) >> @@ -16646,7 +16647,8 @@ cmd_show_rx_tx_desc_status_parsed(void >> *parsed_result, >> rc = rte_eth_tx_descriptor_status(res->cmd_pid, res->cmd_qid, >> res->cmd_did); >> if (rc < 0) { >> - printf("Invalid queueid = %d\n", res->cmd_qid); >> + printf("Invalid queueid = %d, offset = %d\n", >> + res->cmd_qid, res->cmd_did); >> return; >> } >> if (rc == RTE_ETH_TX_DESC_FULL) >> -- >> 2.7.4 > > . >