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 97EDD37A8 for ; Fri, 2 Sep 2016 02:24:55 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 01 Sep 2016 17:24:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,269,1470726000"; d="scan'208";a="3886526" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 01 Sep 2016 17:24:54 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 1 Sep 2016 17:24:53 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 1 Sep 2016 17:24:53 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.91]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.250]) with mapi id 14.03.0248.002; Fri, 2 Sep 2016 08:24:51 +0800 From: "Xu, HuilongX" To: "Xu, GangX" , "dts@dpdk.org" CC: "Xu, GangX" Thread-Topic: [dts] [PATCH V1] modify DTS stop_ports error on FreeBSD Thread-Index: AQHSBCjeXLOeU7/L40G/5rlAhZPiR6BlVz5Q Date: Fri, 2 Sep 2016 00:24:50 +0000 Message-ID: References: <1472717373-15005-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1472717373-15005-1-git-send-email-gangx.xu@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: [dts] [PATCH V1] modify DTS stop_ports error on FreeBSD X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 00:24:56 -0000 Hi gang, Pls see my comments as below. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang > Sent: Thursday, September 01, 2016 4:10 PM > To: dts@dpdk.org > Cc: Xu, GangX > Subject: [dts] [PATCH V1] modify DTS stop_ports error on freesbd >=20 > Signed-off-by: xu,gang > --- > framework/dut.py | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) >=20 > diff --git a/framework/dut.py b/framework/dut.py > index 2f4e53a..14958c9 100644 > --- a/framework/dut.py > +++ b/framework/dut.py > @@ -237,10 +237,16 @@ class Dut(Crb): > if driver is not None: > # unbind device driver > addr_array =3D pci_bus.split(':') > - domain_id =3D addr_array[0] > - bus_id =3D addr_array[1] > - devfun_id =3D addr_array[2] > - port =3D GetNicObj(self, domain_id, bus_id, devfun_id) 1. Domain_id and bus_id is public code.=20 You should set vale in out of if...elif. 2. devfun_id shoud set vale is addr_array[2] or ''=20 > + if len(addr_array) =3D=3D 3: > + domain_id =3D addr_array[0] > + bus_id =3D addr_array[1] > + devfun_id =3D addr_array[2] > + port =3D GetNicObj(self, domain_id, bus_id, devfun_i= d) > + elif len(addr_array) =3D=3D 2: > + domain_id =3D addr_array[0] > + bus_id =3D addr_array[1] > + port =3D GetNicObj(self, domain_id, bus_id, '') > + > port.stop() >=20 > def restore_interfaces_linux(self): > -- > 1.9.3