[RFC,v2,2/3] testpmd: show the Rx/Tx burst description
diff mbox series

Message ID 1565665572-65495-3-git-send-email-haiyue.wang@intel.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • show the Rx/Tx burst description field
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Haiyue Wang Aug. 13, 2019, 3:06 a.m. UTC
Add the 'Burst description' section into command 'show rxq|txq info
<port_id> <queue_id>' to show the Rx/Tx burst description by new trace
API.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 app/test-pmd/config.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch
diff mbox series

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a5a5c1..52814ba 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -330,6 +330,7 @@  rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 	struct rte_eth_rxq_info qinfo;
 	int32_t rc;
 	static const char *info_border = "*********************";
+	char burst_info[128];
 
 	rc = rte_eth_rx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
@@ -354,6 +355,11 @@  rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 	printf("\nRX scattered packets: %s",
 		(qinfo.scattered_rx != 0) ? "on" : "off");
 	printf("\nNumber of RXDs: %hu", qinfo.nb_desc);
+
+	if (rte_eth_trace_info_get(port_id, queue_id, ETH_TRACE_RX_BURST,
+				   burst_info, sizeof(burst_info)) > 0)
+		printf("\nBurst description: %s\n", burst_info);
+
 	printf("\n");
 }
 
@@ -363,6 +369,7 @@  tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 	struct rte_eth_txq_info qinfo;
 	int32_t rc;
 	static const char *info_border = "*********************";
+	char burst_info[128];
 
 	rc = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
@@ -383,6 +390,11 @@  tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 	printf("\nTX deferred start: %s",
 		(qinfo.conf.tx_deferred_start != 0) ? "on" : "off");
 	printf("\nNumber of TXDs: %hu", qinfo.nb_desc);
+
+	if (rte_eth_trace_info_get(port_id, queue_id, ETH_TRACE_TX_BURST,
+				   burst_info, sizeof(burst_info)) > 0)
+		printf("\nBurst description: %s\n", burst_info);
+
 	printf("\n");
 }