From: Reshma Pattan <reshma.pattan@intel.com>
To: dev@dpdk.org
Cc: bernard.iremonger@intel.com, thomas@monjalon.net,
Jasvinder Singh <jasvinder.singh@intel.com>,
Reshma Pattan <reshma.pattan@intel.com>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d
Date: Tue, 24 Jul 2018 15:17:27 +0100 [thread overview]
Message-ID: <1532441847-7492-1-git-send-email-reshma.pattan@intel.com> (raw)
In-Reply-To: <20180723104425.10090-1-jasvinder.singh@intel.com>
Testpmd should be existed gracefully when ctrl+d is typed.
This behaviour is not handled properly, fix this by calling
pmd_test_exit() instead of rte_panic.
Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
Reported-by: Mordechay Haimovsky <motih@mellanox.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
v2: removed changes done to lib/librte_cmdline/cmdline.c
reworded commit message and heading.
---
app/test-pmd/cmdline.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 588528928..406008d73 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17581,9 +17581,9 @@ prompt(void)
for (;;) {
status = cmdline_poll(testpmd_cl);
- if (status < 0)
- rte_panic("CLI poll error (%" PRId32 ")\n", status);
- else if (status == RDLINE_EXITED) {
+ if (status == RDLINE_EXITED || status == -1) {
+ if (status == -1)
+ pmd_test_exit();
cmdline_stdin_exit(testpmd_cl);
rte_exit(0, "\n");
}
--
2.14.4
next prev parent reply other threads:[~2018-07-24 14:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 10:44 [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d Jasvinder Singh
2018-07-24 9:25 ` Iremonger, Bernard
2018-07-24 11:25 ` Thomas Monjalon
2018-07-24 12:33 ` Thomas Monjalon
2018-07-24 12:39 ` Pattan, Reshma
2018-07-24 12:41 ` Iremonger, Bernard
2018-07-24 13:39 ` Thomas Monjalon
2018-07-24 14:37 ` Mordechay Haimovsky
2018-07-24 16:59 ` Dumitrescu, Cristian
2018-07-25 8:18 ` Thomas Monjalon
2018-07-25 8:30 ` Singh, Jasvinder
2018-07-25 8:49 ` Dumitrescu, Cristian
2018-07-25 8:53 ` Mordechay Haimovsky
2018-07-25 9:04 ` Ananyev, Konstantin
2018-07-25 9:36 ` Dumitrescu, Cristian
2018-07-25 11:39 ` Ananyev, Konstantin
2018-07-25 11:55 ` Mordechay Haimovsky
2018-07-25 11:56 ` Dumitrescu, Cristian
2018-07-25 12:18 ` Ananyev, Konstantin
2018-07-25 12:27 ` Van Haaren, Harry
2018-07-25 13:21 ` Dumitrescu, Cristian
2018-07-25 12:41 ` Dumitrescu, Cristian
2018-07-25 13:34 ` Ananyev, Konstantin
2018-07-24 14:17 ` Reshma Pattan [this message]
2018-07-24 14:46 ` [dpdk-dev] [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d Pattan, Reshma
2018-07-24 15:31 ` Pattan, Reshma
2018-07-24 15:31 ` Iremonger, Bernard
2018-07-26 14:14 ` Thomas Monjalon
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=1532441847-7492-1-git-send-email-reshma.pattan@intel.com \
--to=reshma.pattan@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=thomas@monjalon.net \
/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).