DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI
@ 2018-07-22 16:03 Mordechay Haimovsky
  2018-07-23 10:12 ` Singh, Jasvinder
  0 siblings, 1 reply; 2+ messages in thread
From: Mordechay Haimovsky @ 2018-07-22 16:03 UTC (permalink / raw)
  To: jasvinder.singh, reshma.pattan, cristian.dumitrescu; +Cc: dev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI
  2018-07-22 16:03 [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI Mordechay Haimovsky
@ 2018-07-23 10:12 ` Singh, Jasvinder
  0 siblings, 0 replies; 2+ messages in thread
From: Singh, Jasvinder @ 2018-07-23 10:12 UTC (permalink / raw)
  To: Mordechay Haimovsky, Pattan, Reshma, Dumitrescu, Cristian; +Cc: dev

Hi Moti,

I didn't know about Ctrl+D option to quit testpmd  as I  always used  "quit" on cli. Since Ctrl+D was working before this commit, I will send fix soon to cover this case.

Thanks,
Jasvinder

From: Mordechay Haimovsky [mailto:motih@mellanox.com]
Sent: Sunday, July 22, 2018 5:04 PM
To: Singh, Jasvinder <jasvinder.singh@intel.com>; Pattan, Reshma <reshma.pattan@intel.com>; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
Cc: dev@dpdk.org
Subject: commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-23 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-22 16:03 [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI Mordechay Haimovsky
2018-07-23 10:12 ` Singh, Jasvinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).