[2/3] testpmd: block secondary process

Message ID 20190802025154.328-3-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Headers
Series testpmd: fixes for 19.08 |

Checks

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

Commit Message

Stephen Hemminger Aug. 2, 2019, 2:51 a.m. UTC
  Since testpmd has several issues which keep it from working correctly
as a secondary process; abort if user tries to do it, rather than
running into later problems.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 159c2ef05b6c..d0142cae68d7 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3243,6 +3243,9 @@  main(int argc, char** argv)
 	if (diag < 0)
 		rte_panic("Cannot init EAL\n");
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		rte_panic("Secondary process type not supported.\n");
+
 	ret = register_eth_event_callback();
 	if (ret != 0)
 		rte_panic("Cannot register for ethdev events");