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 3130CA04FA; Tue, 17 Dec 2019 08:18:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF3001BEB2; Tue, 17 Dec 2019 08:18:08 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1A1101BE9E for ; Tue, 17 Dec 2019 08:18:07 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2019 23:18:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,324,1571727600"; d="scan'208";a="240309019" Received: from unknown (HELO dpdk-xinfengx-dut242.sh.intel.com) ([10.67.116.161]) by fmsmga004.fm.intel.com with ESMTP; 16 Dec 2019 23:18:05 -0800 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Tue, 17 Dec 2019 07:06:19 +0800 Message-Id: <1576537580-298524-1-git-send-email-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [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" Signed-off-by: Xinfeng Zhao --- framework/tester.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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() + self.disable_lldp() + + def disable_lldp(self): + """ + Disable tester ports LLDP. + """ + result = 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 = port["intf"] + out = self.send_expect("ethtool --show-priv-flags %s" + % eth, "# ", alt_session=True) + if "disable-fw-lldp" in out: + self.send_expect("ethtool --set-priv-flags %s disable-fw-lldp on" + % eth, "# ", alt_session=True) + self.send_expect("lldptool set-lldp -i %s adminStatus=disabled" + % eth, "# ", alt_session=True) + def get_local_port(self, remotePort): """ Return tester local port connect to specified dut port. -- 2.17.1