> -----Original Message-----
> From: Pawel Wodkowski [mailto:pwodkowx at stargo]
> Sent: Tuesday, May 12, 2015 12:10 PM
> To: dev at dpdk.org
> Cc: Dumitrescu, Cristian; Jastrzebski, MichalX K
> Subject: [PATCH 0/2] cmdline: add polling mode for command line
> 
> This patchset adds the ability to process console input in the same thread
> as packet processing by using poll() function and fixes some minor issues.
> 
> Pawel Wodkowski (2):
>   cmdline: fix missing include files
>   cmdline: add polling mode for command line
> 
>  lib/librte_cmdline/cmdline.c               | 35
> ++++++++++++++++++++++++++++++
>  lib/librte_cmdline/cmdline.h               |  4 ++++
>  lib/librte_cmdline/cmdline_rdline.h        |  1 +
>  lib/librte_cmdline/cmdline_vt100.h         |  2 ++
>  lib/librte_cmdline/rte_cmdline_version.map |  1 +
>  5 files changed, 43 insertions(+)
> 
> --
> 1.9.1

Acked by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>

The existing cmdline API requires a thread to be completely consumed for 
running the CLI, so it is not possible to push any other tasks (typically slow 
tasks, control plane related) on the same thread. This is because the 
cmdline_interact() function implements an infinite loop internally, so once 
called after initialization, it only returns when the application is terminated 
(e.g. as result of quit CLI command).

This patch removes this limitation by providing an alternative function called 
cmdline_poll(), which allows the application to own the thread dispatch loop 
and work with the CLI in polling mode, hence making it possible for the 
application to push additional work on the same thread. The thread dispatch 
loop should be owned by the application, and not by the cmdline library.

Reply via email to