[dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut
Haiyang Zhao
haiyangx.zhao at intel.com
Fri Dec 11 08:08:26 CET 2020
get the instance of NetDevice from the port_info,
and save it in dut as attribute nic.
Signed-off-by: Haiyang Zhao <haiyangx.zhao at intel.com>
---
framework/dut.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/framework/dut.py b/framework/dut.py
index dcf833b4..388fec04 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -81,6 +81,7 @@ class Dut(Crb):
self.apps_name_conf = {}
self.apps_name = {}
self.dpdk_version = ''
+ self.nic = None
def filter_cores_from_crb_cfg(self):
# get core list from crbs.cfg
@@ -405,6 +406,8 @@ class Dut(Crb):
# print latest ports_info
for port_info in self.ports_info:
self.logger.info(port_info)
+ if self.nic is None:
+ self.nic = port_info['port']
if self.ports_map is None or len(self.ports_map) == 0:
self.logger.warning("ports_map should not be empty, please check all links")
--
2.17.1
More information about the dts
mailing list