From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 996D52B9F for ; Mon, 5 Sep 2016 04:14:05 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 04 Sep 2016 19:14:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,284,1470726000"; d="scan'208";a="1051434571" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga002.fm.intel.com with ESMTP; 04 Sep 2016 19:14:03 -0700 Message-ID: <57CCD597.2010108@intel.com> Date: Mon, 05 Sep 2016 10:16:55 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,gang" , dts@dpdk.org References: <1472717373-15005-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1472717373-15005-1-git-send-email-gangx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH V1] modify DTS stop_ports error on freesbd 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: Mon, 05 Sep 2016 02:14:06 -0000 Gang, both freebsd and linux pci address format should be same. Please modify scan_ports_uncached_freebsd generate format. On 09/01/2016 04:09 PM, xu,gang wrote: > Signed-off-by: xu,gang > --- > framework/dut.py | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > 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 = pci_bus.split(':') > - domain_id = addr_array[0] > - bus_id = addr_array[1] > - devfun_id = addr_array[2] > - port = GetNicObj(self, domain_id, bus_id, devfun_id) > + if len(addr_array) == 3: > + domain_id = addr_array[0] > + bus_id = addr_array[1] > + devfun_id = addr_array[2] > + port = GetNicObj(self, domain_id, bus_id, devfun_id) > + elif len(addr_array) == 2: > + domain_id = addr_array[0] > + bus_id = addr_array[1] > + port = GetNicObj(self, domain_id, bus_id, '') > + > port.stop() > > def restore_interfaces_linux(self):