[dts] [PATCH V1] framework/dut: fix getting nic info failed in FreeBSD

Haiyang Zhao haiyangx.zhao at intel.com
Thu Apr 1 09:38:33 CEST 2021


Getting pci_id will be failed in FreeBSD and it causes get nic name 
and default_driver failed, and will cause many cases failed, fix it 
by assign the pci_id and reget the nic and driver name.

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 6216166d..ca1c9089 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -1061,6 +1061,9 @@ class Dut(Crb):
             bus_id = addr_array[1]
             devfun_id = addr_array[2]
             port = GetNicObj(self, domain_id, bus_id, devfun_id)
+            port.pci_id= pci_id
+            port.name = settings.get_nic_name(pci_id)
+            port.default_driver = settings.get_nic_driver(pci_id)
             intf = port.get_interface_name()
 
             macaddr = port.get_mac_addr()
-- 
2.17.1



More information about the dts mailing list