From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Pattan, Reshma" <reshma.pattan@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d
Date: Tue, 24 Jul 2018 09:25:14 +0000 [thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C260CCEC9D@IRSMSX107.ger.corp.intel.com> (raw)
In-Reply-To: <20180723104425.10090-1-jasvinder.singh@intel.com>
Hi Jasvider,
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Monday, July 23, 2018 11:44 AM
> To: dev@dpdk.org
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; Pattan, Reshma
> <reshma.pattan@intel.com>
> Subject: [PATCH] app/testpmd: fix testpmd exit using ctrl+d
>
> Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT)
> on the empty command line.
>
> Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
>
> Reported-by: Mordechay Haimovsky <motih@mellanox.com>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> app/test-pmd/cmdline.c | 10 ++++++----
> lib/librte_cmdline/cmdline.c | 2 +-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> 5885289..edaf0e6 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -17581,12 +17581,14 @@ 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 == RDLINE_RES_EOF) {
> + if (status == RDLINE_RES_EOF)
> + pmd_test_exit();
> +
> cmdline_stdin_exit(testpmd_cl);
> rte_exit(0, "\n");
> - }
> + } else if (status < 0)
> + rte_panic("CLI poll error (%" PRId32 ")\n", status);
>
> #if defined RTE_LIBRTE_PMD_SOFTNIC
>
> diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c index
> 591b78b..47b0f6a 100644
> --- a/lib/librte_cmdline/cmdline.c
> +++ b/lib/librte_cmdline/cmdline.c
> @@ -187,7 +187,7 @@ cmdline_in(struct cmdline *cl, const char *buf, int
> size)
> rdline_newline(&cl->rdl, cl->prompt);
> }
> else if (ret == RDLINE_RES_EOF)
> - return -1;
> + return RDLINE_RES_EOF;
> else if (ret == RDLINE_RES_EXITED)
> return -1;
> }
> --
> 2.9.3
The check-git-log script is showing the following error:
./devtools/check-git-log.sh -1
Line too long:
Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT)
Regards,
Bernard.
next prev parent reply other threads:[~2018-07-24 9:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 10:44 Jasvinder Singh
2018-07-24 9:25 ` Iremonger, Bernard [this message]
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 ` [dpdk-dev] [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d Reshma Pattan
2018-07-24 14:46 ` 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=8CEF83825BEC744B83065625E567D7C260CCEC9D@IRSMSX107.ger.corp.intel.com \
--to=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.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).