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 599CF2BCD for ; Tue, 29 Nov 2016 10:03:43 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 29 Nov 2016 01:03:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,715,1473145200"; d="scan'208";a="1074931761" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 29 Nov 2016 01:03:41 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 01:03:37 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Tue, 29 Nov 2016 17:01:51 +0800 From: "Liu, Yong" To: "Xu, GangX" , "dts@dpdk.org" CC: "Xu, GangX" Thread-Topic: [dts] [PATCH V2] fix IndexError on FreeBSD Thread-Index: AQHSSeS9eUndBlJ9Y0ySKwJNJxx4mqDvpwDA Date: Tue, 29 Nov 2016 09:01:51 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E603326FA@SHSMSX103.ccr.corp.intel.com> References: <1480385007-19394-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1480385007-19394-1-git-send-email-gangx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjU5ZmEyMjctNmI1My00MTNhLTllNTAtZWI0Yjg2Y2Y1NGQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImdwdGZkQU9MZkxMU3VKcFdsUTN3R0IrbWtSWTdESXIxQzhRWkhVYUs4M2s9In0= x-ctpclassification: CTP_IC 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 V2] fix IndexError 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: Tue, 29 Nov 2016 09:03:43 -0000 Gang,=20 Unbind driver is critical step in execution process. This action must be mo= nitored and called properly. NIC method "get_interface_name" maybe called in suite, if that will cause a= ll later suites crashed. My suggestion is that remove interface/mac/ipv6 address strip code in funct= ion "scan_ports_uncached_freebsd".=20 All those information should be available in function "rescan_ports_uncache= d_freebsd". > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang > Sent: Tuesday, November 29, 2016 10:03 AM > To: dts@dpdk.org > Cc: Xu, GangX > Subject: [dts] [PATCH V2] fix IndexError on FreeBSD >=20 > restore interface before get interface >=20 >=20 > Signed-off-by: xu,gang > --- > nics/net_device.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/nics/net_device.py b/nics/net_device.py > index bbe4bed..0eac48d 100644 > --- a/nics/net_device.py > +++ b/nics/net_device.py > @@ -218,7 +218,11 @@ class NetDevice(object): > """ > Get the interface name by the default way on freebsd. > """ > - pci_str =3D "%s:%s:%s" % (domain_id, bus_id, devfun_id) > + pci_str =3D "%s:%s:%s" % (domain_id, bus_id, devfun_id) > + put =3D self.__send_expect("kldstat", "# ",20) > + if "nic_uio.ko" in put: > + self.__send_expect("kldunload contigmem.ko", "# ",20) > + self.__send_expect("kldunload nic_uio.ko", "# ",20) > out =3D self.__send_expect("pciconf -l", "# ") > rexp =3D r"(\w*)@pci0:%s" % pci_str > pattern =3D re.compile(rexp) > -- > 1.9.3