DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: fix Tx/Rx descriptor query error log
Date: Sat, 27 Mar 2021 15:34:54 +0800
Message-ID: <1616830494-46559-1-git-send-email-humin29@huawei.com> (raw)

From: Hongbo Zheng <zhenghongbo3@huawei.com>

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 <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 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


             reply	other threads:[~2021-03-27  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27  7:34 Min Hu (Connor) [this message]
2021-03-29  5:49 ` Li, Xiaoyun
2021-03-29  6:47   ` Min Hu (Connor)
2021-03-29  6:46 ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
2021-03-29  7:07   ` Li, Xiaoyun
2021-03-30 14:35     ` Ferruh Yigit
2021-03-30 14:29   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1616830494-46559-1-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=xiaoyun.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git