From: Xinfeng Zhao <xinfengx.zhao@intel.com>
To: dts@dpdk.org
Cc: Xinfeng Zhao <xinfengx.zhao@intel.com>
Subject: [dts] [PATCH V2] framework/tester: disable tester ports LLDP
Date: Tue, 17 Dec 2019 07:06:19 +0800 [thread overview]
Message-ID: <1576537580-298524-1-git-send-email-xinfengx.zhao@intel.com> (raw)
Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
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
next reply other threads:[~2019-12-17 7:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 23:06 Xinfeng Zhao [this message]
2019-12-16 23:06 ` [dts] [PATCH V1] tests: add new features for compression test Xinfeng Zhao
2019-12-17 8:26 ` Wan, Zhe
2019-12-20 8:02 ` Tu, Lijuan
2019-12-20 8:03 ` [dts] [PATCH V2] framework/tester: disable tester ports LLDP Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576537580-298524-1-git-send-email-xinfengx.zhao@intel.com \
--to=xinfengx.zhao@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).