From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BDA7EA04F7; Fri, 20 Dec 2019 09:03:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B47C3F90; Fri, 20 Dec 2019 09:03:41 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 47F1A235 for ; Fri, 20 Dec 2019 09:03:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2019 00:03:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,335,1571727600"; d="scan'208";a="416460545" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 20 Dec 2019 00:03:39 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 00:03:39 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 20 Dec 2019 00:03:39 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.236]) with mapi id 14.03.0439.000; Fri, 20 Dec 2019 16:03:37 +0800 From: "Tu, Lijuan" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH V2] framework/tester: disable tester ports LLDP Thread-Index: AQHVtKou0zpeLXQw7EO+tWLlkY8ZSafCrpvQ Date: Fri, 20 Dec 2019 08:03:36 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8A1BC@SHSMSX101.ccr.corp.intel.com> References: <1576537580-298524-1-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1576537580-298524-1-git-send-email-xinfengx.zhao@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.2.0.6 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 V2] framework/tester: disable tester ports LLDP 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xinfeng Zhao > Sent: Tuesday, December 17, 2019 7:06 AM > To: dts@dpdk.org > Cc: Zhao, XinfengX > Subject: [dts] [PATCH V2] framework/tester: disable tester ports LLDP >=20 > Signed-off-by: Xinfeng Zhao > --- > framework/tester.py | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) >=20 > diff --git a/framework/tester.py b/framework/tester.py index > d7e74d4..5b4aff0 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -174,6 +174,28 @@ class Tester(Crb): > self.restore_interfaces() > self.scan_ports() >=20 > + self.disable_lldp() > + > + def disable_lldp(self): > + """ > + Disable tester ports LLDP. > + """ > + result =3D self.send_expect("lldpad -d", "# ") > + if result: > + self.logger.error(result.strip()) > + > + for port in self.ports_info: > + if not "intf" in port.keys(): > + continue > + eth =3D port["intf"] > + out =3D self.send_expect("ethtool --show-priv-flags %s" > + % eth, "# ", alt_session=3DTrue) > + if "disable-fw-lldp" in out: > + self.send_expect("ethtool --set-priv-flags %s disable-fw= -lldp on" > + % eth, "# ", alt_session=3DTrue) > + self.send_expect("lldptool set-lldp -i %s adminStatus=3Ddisa= bled" > + % eth, "# ", alt_session=3DTrue) > + > def get_local_port(self, remotePort): > """ > Return tester local port connect to specified dut port. > -- > 2.17.1