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 A053EA0A02; Sat, 27 Mar 2021 08:34:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B91440686; Sat, 27 Mar 2021 08:34:33 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id E7E054067B for ; Sat, 27 Mar 2021 08:34:30 +0100 (CET) Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F6rCH3q0cz1BFjP for ; Sat, 27 Mar 2021 15:32:27 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Mar 2021 15:34:27 +0800 From: "Min Hu (Connor)" To: CC: , Date: Sat, 27 Mar 2021 15:34:54 +0800 Message-ID: <1616830494-46559-1-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [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" 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 "Invalid queueid = 0", seems user input an invalid queueid, while the actual 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 add offset information, now if we fail to query Tx/Rx descriptor, testpmd will print "Invalid queueid = 0, offset = 9999", then we can check our input. 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