From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 921423775 for ; Tue, 12 May 2015 13:36:10 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 12 May 2015 04:36:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,414,1427785200"; d="scan'208";a="693611520" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga001.jf.intel.com with ESMTP; 12 May 2015 04:36:09 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.59]) by IRSMSX106.ger.corp.intel.com ([169.254.8.189]) with mapi id 14.03.0224.002; Tue, 12 May 2015 12:36:08 +0100 From: "Dumitrescu, Cristian" To: Pawel Wodkowski , "dev@dpdk.org" Thread-Topic: [PATCH 0/2] cmdline: add polling mode for command line Thread-Index: AQHQjKRC1BxmA8+dUU2TWdsDH4WsWZ14Mp4w Date: Tue, 12 May 2015 11:36:07 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891263236798F@IRSMSX108.ger.corp.intel.com> References: <1431429019-21130-1-git-send-email-pawelx.wodkowski@intel.com> In-Reply-To: <1431429019-21130-1-git-send-email-pawelx.wodkowski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/2] cmdline: add polling mode for command line X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 11:36:12 -0000 > -----Original Message----- > From: Pawel Wodkowski [mailto:pwodkowx@stargo] > Sent: Tuesday, May 12, 2015 12:10 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian; Jastrzebski, MichalX K > Subject: [PATCH 0/2] cmdline: add polling mode for command line >=20 > This patchset adds the ability to process console input in the same threa= d > as packet processing by using poll() function and fixes some minor issues= . >=20 > Pawel Wodkowski (2): > cmdline: fix missing include files > cmdline: add polling mode for command line >=20 > 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(+) >=20 > -- > 1.9.1 Acked by: Cristian Dumitrescu The existing cmdline API requires a thread to be completely consumed for ru= nning the CLI, so it is not possible to push any other tasks (typically slo= w tasks, control plane related) on the same thread. This is because the cmd= line_interact() function implements an infinite loop internally, so once ca= lled after initialization, it only returns when the application is terminat= ed (e.g. as result of quit CLI command). This patch removes this limitation by providing an alternative function cal= led 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 t= he application to push additional work on the same thread. The thread dispa= tch loop should be owned by the application, and not by the cmdline library= .