[V1] framework/dut: fix getting nic info failed in FreeBSD
Commit Message
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@intel.com>
---
framework/dut.py | 3 +++
1 file changed, 3 insertions(+)
Comments
> -----Original Message-----
> From: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Sent: Thursday, April 1, 2021 15:39
> To: dts@dpdk.org
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1] framework/dut: fix getting nic info failed in
> FreeBSD
Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>
> 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@intel.com>
Applied
@@ -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()