[dpdk-dev] app/testpmd: print Rx/Tx offload values

Message ID 20180312145902.74403-1-ferruh.yigit@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

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

Commit Message

Ferruh Yigit March 12, 2018, 2:59 p.m. UTC
  Which per port offloads are enabled is not clear. Printing offloads
values at forwarding start.

CRC strip offload value was printed in more verbose manner, it is
removed since Rx/Tx offload values covers it and printing only CRC one
can cause confusion.

Hexadecimal offloads values are not very user friendly but preferred to
not create to much noise during forwarding start.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Shahaf Shuler <shahafs@mellanox.com>
Cc: Yongseok Koh <yskoh@mellanox.com>

v2:
* Add Rxq and Txq stats too
* Split Rx an Tx related logs and place them related group
---
 app/test-pmd/config.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
  

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4bb255c62..6249b19bb 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1682,10 +1682,6 @@  rxtx_config_display(void)
 		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf;
 
 		printf("  port %d:\n", (unsigned int)pid);
-		printf("  CRC stripping %s\n",
-				(ports[pid].dev_conf.rxmode.offloads &
-				 DEV_RX_OFFLOAD_CRC_STRIP) ?
-				"enabled" : "disabled");
 		printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
 				nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
 		printf("  RX threshold registers: pthresh=%d hthresh=%d "
@@ -1693,6 +1689,9 @@  rxtx_config_display(void)
 				rx_conf->rx_thresh.pthresh,
 				rx_conf->rx_thresh.hthresh,
 				rx_conf->rx_thresh.wthresh);
+		printf("  Rx offloads=0x%"PRIx64" RXQ Offloads=0x%"PRIx64"\n",
+				ports[pid].dev_conf.rxmode.offloads,
+				rx_conf->offloads);
 		printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
 				nb_txq, nb_txd, tx_conf->tx_free_thresh);
 		printf("  TX threshold registers: pthresh=%d hthresh=%d "
@@ -1700,8 +1699,10 @@  rxtx_config_display(void)
 				tx_conf->tx_thresh.pthresh,
 				tx_conf->tx_thresh.hthresh,
 				tx_conf->tx_thresh.wthresh);
-		printf("  TX RS bit threshold=%d - TXQ offloads=0x%"PRIx64"\n",
-				tx_conf->tx_rs_thresh, tx_conf->offloads);
+		printf("  TX RS bit threshold=%d\n", tx_conf->tx_rs_thresh);
+		printf("  Tx Offloads=0x%"PRIx64" TXQ offloads=0x%"PRIx64"\n",
+				ports[pid].dev_conf.txmode.offloads,
+				tx_conf->offloads);
 	}
 }