From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C839FFFA for ; Wed, 30 Aug 2017 10:44:13 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 01:44:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="1009185831" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 30 Aug 2017 01:44:12 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 01:44:11 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.168]) with mapi id 14.03.0319.002; Wed, 30 Aug 2017 16:44:09 +0800 From: "Liu, Yong" To: "Xu, GangX" , "dts@dpdk.org" CC: "Xu, GangX" Thread-Topic: [dts] [PATCH V1] fix FreeBSD get mac addr error Thread-Index: AQHTIVai1ZNWunRU+EKeEd15BbXqU6KclKzg Date: Wed, 30 Aug 2017 08:44:09 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E9574E@SHSMSX103.ccr.corp.intel.com> References: <1504073431-102098-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1504073431-102098-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: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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] fix FreeBSD get mac addr error 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: Wed, 30 Aug 2017 08:44:14 -0000 Gang, Unload driver is very critical action, some cases will use this function to= get mac address. Thus will lead to all suites after these cases. Please do this kind of action in upper layer which handler the overall exec= ution. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang > Sent: Wednesday, August 30, 2017 2:11 PM > To: dts@dpdk.org > Cc: Xu, GangX > Subject: [dts] [PATCH V1] fix FreeBSD get mac addr error >=20 > get mac addr need restore interface >=20 > Signed-off-by: xu,gang > --- > nics/net_device.py | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/nics/net_device.py b/nics/net_device.py > index 4861145..9edf6f6 100644 > --- a/nics/net_device.py > +++ b/nics/net_device.py > @@ -330,6 +330,11 @@ class NetDevice(object): > """ > Get the MAC by the default way on Freebsd. > """ > + out =3D self.__send_expect('kldstat', '# ') > + if 'nic_uio.ko' in out: > + self.__send_expect('kldunload nic_uio.ko', '# ') > + self.__send_expect('kldunload contigmem.ko', '# ') > + > out =3D self.__send_expect('ifconfig %s' % intf, '# ') > rexp =3D r"ether ([\da-f:]*)" > pattern =3D re.compile(rexp) > -- > 1.9.3