app/dumpcap: allow help/version without primary process

Message ID 20220125032545.7704-1-koncept1@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series app/dumpcap: allow help/version without primary process |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Ben Magistro Jan. 25, 2022, 3:25 a.m. UTC
  Currently dumpcap tries to initialize dpdk before parsing command line
arguments, this makes it impossible to check version or help without
having the primary process running already.

Signed-off-by: Ben Magistro <koncept1@gmail.com>
---
 app/dumpcap/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Feb. 22, 2022, 10:03 a.m. UTC | #1
25/01/2022 04:25, Ben Magistro:
> Currently dumpcap tries to initialize dpdk before parsing command line
> arguments, this makes it impossible to check version or help without
> having the primary process running already.
> 
> Signed-off-by: Ben Magistro <koncept1@gmail.com>
> ---
> --- a/app/dumpcap/main.c
> +++ b/app/dumpcap/main.c
> @@ -781,8 +781,8 @@ int main(int argc, char **argv)
>  
>  	progname = argv[0];
>  
> -	dpdk_init();
>  	parse_opts(argc, argv);
> +	dpdk_init();

Stephen, Reshma, any comment?
  
Thomas Monjalon March 8, 2022, 8:32 a.m. UTC | #2
22/02/2022 11:03, Thomas Monjalon:
> 25/01/2022 04:25, Ben Magistro:
> > Currently dumpcap tries to initialize dpdk before parsing command line
> > arguments, this makes it impossible to check version or help without
> > having the primary process running already.
> > 
> > Signed-off-by: Ben Magistro <koncept1@gmail.com>
> > ---
> > --- a/app/dumpcap/main.c
> > +++ b/app/dumpcap/main.c
> > @@ -781,8 +781,8 @@ int main(int argc, char **argv)
> >  
> >  	progname = argv[0];
> >  
> > -	dpdk_init();
> >  	parse_opts(argc, argv);
> > +	dpdk_init();
> 
> Stephen, Reshma, any comment?

Applied, thanks.
  

Patch

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index c5fe440302..1cc7e80d5d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -781,8 +781,8 @@  int main(int argc, char **argv)
 
 	progname = argv[0];
 
-	dpdk_init();
 	parse_opts(argc, argv);
+	dpdk_init();
 
 	if (filter_str)
 		compile_filter();