Hi,
When starting testpmd after applying the above patch and pressing CTRL+D in the 
command prompts, testpmd exits abnormally
Whit the following message :
PANIC in prompt():
CLI poll error (-1)
And a dump trace is displayed.

Issue is traced to the following section in your commit:
-       cmdline_interact(testpmd_cl);
-       cmdline_stdin_exit(testpmd_cl);
+
+       for (;;) {
+               status = cmdline_poll(testpmd_cl);
+               if (status < 0)
+                       rte_panic("CLI poll error (%" PRId32 ")\n", status);
+               else if (status == RDLINE_EXITED) {
+                       cmdline_stdin_exit(testpmd_cl);
+                       rte_exit(0, "\n");
+               }

Which did not take into consideration the case of user pressing CTRL+D on an 
empty command line which returns -1 from cmdline_poll.

Please advise on a fix.

Thanks
Moti H.

Reply via email to