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 0A42EA04F0; Tue, 10 Dec 2019 09:03:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D48B137A2; Tue, 10 Dec 2019 09:03:17 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 8C41E1F5 for ; Tue, 10 Dec 2019 09:03:16 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 00:03:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,299,1571727600"; d="scan'208";a="244747016" Received: from unknown (HELO dpdk-xinfengx-dut242.sh.intel.com) ([10.67.116.161]) by fmsmga002.fm.intel.com with ESMTP; 10 Dec 2019 00:03:14 -0800 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Tue, 10 Dec 2019 07:37:17 +0800 Message-Id: <1575934637-332743-1-git-send-email-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/framework/tester.py b/framework/tester.py index d7e74d4..8585a11 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -174,6 +174,27 @@ class Tester(Crb): self.restore_interfaces() self.scan_ports() + self.disable_lldp() + + def disable_lldp(self): + """ + Disable tester ports LLDP. + """ + self.logger.info("Disable tester ports LLDP") + result = self.send_expect("lldpad -d", "# ") + if result: + self.logger.error(result.strip()) + + for port in self.ports_info: + 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