Skip to contentSkip to conversation

app/dumpcap: allow help/version without primary process

PATCH Applied Ben Magistro 2 participants 3 messages Jan 25, 2022 – Mar 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/dumpcap: allow help/version without primary process

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.

---
 app/dumpcap/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/dumpcap/main.c +1 -1
index c5fe440302..1cc7e80d5d 100644
@@ -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();
Signature · 1 line
2.27.0
#1 lore raw

25/01/2022 04:25, Ben Magistro:

Quoted 9 lines

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.

---

app/dumpcap/main.c int main(int argc, char **argv) · line 785

Quoted 6 lines
app/dumpcap/main.c +1 -1
@@ -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?

#2 lore raw

22/02/2022 11:03, Thomas Monjalon:

Quoted 11 lines

25/01/2022 04:25, Ben Magistro:

Quoted 10 lines

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.

---

app/dumpcap/main.c +0 -0
@@ -781,8 +781,8 @@ int main(int argc, char **argv)
 
Quoted 7 lines

app/dumpcap/main.c int main(int argc, char **argv) · line 785

Quoted 5 lines
app/dumpcap/main.c +1 -1
 	progname = argv[0];
 
-	dpdk_init();
 	parse_opts(argc, argv);
+	dpdk_init();

Stephen, Reshma, any comment?

Applied, thanks.