From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C8CDD5946 for ; Wed, 11 Feb 2015 07:57:33 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 10 Feb 2015 22:50:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,556,1418112000"; d="scan'208";a="452975648" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by FMSMGA003.fm.intel.com with ESMTP; 10 Feb 2015 22:42:54 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 11 Feb 2015 14:56:30 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.197]) with mapi id 14.03.0195.001; Wed, 11 Feb 2015 14:56:29 +0800 From: "Zhang, Helin" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] testpmd: force user to stop forwarding when changing port/core list Thread-Index: AQHQRUFnSVnVp/atr0mbsUd0JUNYVZzrBPXg Date: Wed, 11 Feb 2015 06:56:29 +0000 Message-ID: References: <1423579997-22014-1-git-send-email-pablo.de.lara.guarch@intel.com> In-Reply-To: <1423579997-22014-1-git-send-email-pablo.de.lara.guarch@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] testpmd: force user to stop forwarding when changing port/core list 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: Wed, 11 Feb 2015 06:57:34 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara > Sent: Tuesday, February 10, 2015 10:53 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] testpmd: force user to stop forwarding when > changing port/core list >=20 > Testpmd has the capability of changing the forwarding cores and ports in > runtime. > If these are changed when forwarding, two issues may be encountered: >=20 > - If "show config fwd" is used, changes made in the core list are applied= . > Therefore, trying to stop forwarding may hang testpmd, > since it could be waiting for cores to stop that are not actually runni= ng > anything >=20 > - If the port list is changed, when stopping forwarding, > it may miss the stats of some of the ports that were actually being use= d. >=20 > Signed-off-by: Pablo de Lara Acked-by: Helin Zhang > --- > app/test-pmd/cmdline.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > 590e427..46d4bf9 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2316,6 +2316,11 @@ static void cmd_set_list_parsed(void > *parsed_result, > } parsed_items; > unsigned int nb_item; >=20 > + if (test_done =3D=3D 0) { > + printf("Please stop forwarding first\n"); > + return; > + } > + > res =3D parsed_result; > if (!strcmp(res->list_name, "corelist")) { > nb_item =3D parse_item_list(res->list_of_items, "core", @@ -2370,6 > +2375,10 @@ static void cmd_set_mask_parsed(void *parsed_result, { > struct cmd_setmask_result *res =3D parsed_result; >=20 > + if (test_done =3D=3D 0) { > + printf("Please stop forwarding first\n"); > + return; > + } > if (!strcmp(res->mask, "coremask")) > set_fwd_lcores_mask(res->hexavalue); > else if (!strcmp(res->mask, "portmask")) > -- > 1.7.4.1