DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Singh, Jasvinder" <jasvinder.singh@intel.com>
To: Mordechay Haimovsky <motih@mellanox.com>,
	"Pattan, Reshma" <reshma.pattan@intel.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI
Date: Mon, 23 Jul 2018 10:12:29 +0000	[thread overview]
Message-ID: <54CBAA185211B4429112C315DA58FF6D335DBD55@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <AM0PR05MB4435102EE7129B76034FE20CD2570@AM0PR05MB4435.eurprd05.prod.outlook.com>

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.

      reply	other threads:[~2018-07-23 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 16:03 Mordechay Haimovsky
2018-07-23 10:12 ` Singh, Jasvinder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CBAA185211B4429112C315DA58FF6D335DBD55@IRSMSX103.ger.corp.intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=motih@mellanox.com \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).