Skip to contentSkip to conversation

testpmd: do not print bitrate-stats in help if not configured

PATCH Applied Stephen Hemminger 2 participants 3 messages Jan 9, 2024 – Jan 10, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testpmd: do not print bitrate-stats in help if not configured

Like other #ifdef options, bitrate-stats should not be printed in help if not configured.

Fixes e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")
---
 app/test-pmd/parameters.c | 2 ++
 1 file changed, 2 insertions(+)
app/test-pmd/parameters.c +2 -0
index a9ca58339dd7..f7df7d31295f 100644
@@ -167,8 +167,10 @@ usage(char* progname)
 	printf("  --disable-device-start: do not automatically start port\n");
 	printf("  --no-lsc-interrupt: disable link status change interrupt.\n");
 	printf("  --no-rmv-interrupt: disable device removal interrupt.\n");
+#ifdef RTE_LIB_BITRATESTATS
 	printf("  --bitrate-stats=N: set the logical core N to perform "
 		"bit-rate calculation.\n");
+#endif
 	printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>: "
 	       "enable print of designated event or all of them.\n");
 	printf("  --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed||all>: "
Signature · 1 line
2.43.0
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 6 lines · Stephen Hemminger

Like other #ifdef options, bitrate-stats should not be printed in help if not configured.

Fixes e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")

Applied to dpdk-next-net/main, thanks.

Moved 'latencystats' help string next to bitrate-stats, to group them together and keep same order with documentation.
It makes this patch do two things but I didn't want to make separate patch just reorder help string, instead squeezed it into this one.

#2 lore raw
Quoted 10 lines · On Wed, 10 Jan 2024 18:52:39 +0000 Ferruh Yigit <[email protected]> wrote:
Quoted 6 lines · Stephen Hemminger

Like other #ifdef options, bitrate-stats should not be printed in help if not configured.

Fixes e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")
Quoted 8 lines

Applied to dpdk-next-net/main, thanks.

Moved 'latencystats' help string next to bitrate-stats, to group them together and keep same order with documentation.
It makes this patch do two things but I didn't want to make separate patch just reorder help string, instead squeezed it into this one.

Make sense. Just wanted to make command matched help and documentation overall.