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 6956B5683 for ; Thu, 26 Feb 2015 19:49:09 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 26 Feb 2015 10:41:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,654,1418112000"; d="scan'208";a="691260263" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga002.jf.intel.com with ESMTP; 26 Feb 2015 10:49:06 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.218]) by IRSMSX109.ger.corp.intel.com ([169.254.13.103]) with mapi id 14.03.0195.001; Thu, 26 Feb 2015 18:49:05 +0000 From: "De Lara Guarch, Pablo" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v15] testpmd: Add port hotplug support Thread-Index: AQHQUTIpKDuY5zA2XU+p61HcBjxOV50DRSoQ Date: Thu, 26 Feb 2015 18:49:05 +0000 Message-ID: References: <1424837093-5661-13-git-send-email-mukawa@igel.co.jp> <1424892749-31862-1-git-send-email-mukawa@igel.co.jp> <1424892749-31862-16-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1424892749-31862-16-git-send-email-mukawa@igel.co.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v15] testpmd: Add port hotplug support 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: Thu, 26 Feb 2015 18:49:09 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tetsuya Mukawa > Sent: Wednesday, February 25, 2015 7:32 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v15] testpmd: Add port hotplug support >=20 > The patch introduces following commands. > - port attach [ident] > - port detach [port_id] > - attach: attaching a port > - detach: detaching a port > - ident: pci address of physical device. > Or device name and parameters of virtual device. > (ex. 0000:02:00.0, eth_pcap0,iface=3Deth0) > - port_id: port identifier >=20 > v15: > - Replace rte_eal_dev_attach() by rte_eth_dev_attach() > - Replace rte_eal_dev_detach() by rte_eth_dev_detach() >=20 > v7: > - Fix doc. > (Thanks to Iremonger, Bernard) > - Fix port checking implementation of star_port(); > (Thanks to Qiu, Michael) > v5: > - Add testpmd documentation. > (Thanks to Iremonger, Bernard) > v4: > - Fix strings of command help. >=20 > Signed-off-by: Tetsuya Mukawa > --- > app/test-pmd/cmdline.c | 137 +++++++++++++++---- > app/test-pmd/config.c | 102 ++++++++------ > app/test-pmd/parameters.c | 22 ++- > app/test-pmd/testpmd.c | 199 +++++++++++++++++++++-= ------ > app/test-pmd/testpmd.h | 18 ++- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 57 ++++++++ > 6 files changed, 409 insertions(+), 126 deletions(-) >=20 [...] > @@ -1423,12 +1443,8 @@ set_fwd_ports_list(unsigned int *portlist, > unsigned int nb_pt) > again: > for (i =3D 0; i < nb_pt; i++) { > port_id =3D (portid_t) portlist[i]; > - if (port_id >=3D nb_ports) { > - printf("Invalid port id %u >=3D %u\n", > - (unsigned int) port_id, > - (unsigned int) nb_ports); > + if (port_id_is_invalid(port_id, ENABLED_WARN)) Sorry for catching this late, but there is a segmentation fault when this f= unction gets called=20 when parsing "portmask" at testpmd initialization, since port_id_is_invalid= function needs to have array "ports" initialized. I would revert the change, but not sure if this is need for other reasons. Thanks, Pablo > return; > - } > if (record_now) > fwd_ports_ids[i] =3D port_id; > }