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

Message ID 20240109230927.6417-1-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series testpmd: do not print bitrate-stats in help if not configured |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Stephen Hemminger Jan. 9, 2024, 11:09 p.m. UTC
  Like other #ifdef options, bitrate-stats should not be printed
in help if not configured.

Fixes: e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-pmd/parameters.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit Jan. 10, 2024, 6:52 p.m. UTC | #1
On 1/9/2024 11:09 PM, Stephen Hemminger wrote:
> Like other #ifdef options, bitrate-stats should not be printed
> in help if not configured.
> 
> Fixes: e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

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.
  
Stephen Hemminger Jan. 10, 2024, 11:25 p.m. UTC | #2
On Wed, 10 Jan 2024 18:52:39 +0000
Ferruh Yigit <ferruh.yigit@amd.com> wrote:

> On 1/9/2024 11:09 PM, Stephen Hemminger wrote:
> > Like other #ifdef options, bitrate-stats should not be printed
> > in help if not configured.
> > 
> > Fixes: e25e6c70fb56 ("app/testpmd: add --bitrate-stats option")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >   
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
> 
> 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.
  

Patch

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a9ca58339dd7..f7df7d31295f 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -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>: "