test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1] framework/dut: fix getting nic info failed in FreeBSD
Date: Thu,  1 Apr 2021 15:38:33 +0800	[thread overview]
Message-ID: <20210401073833.26279-1-haiyangx.zhao@intel.com> (raw)

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(+)

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


             reply	other threads:[~2021-04-01  7:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  7:38 Haiyang Zhao [this message]
2021-04-01  7:51 ` Zhao, HaiyangX
2021-04-07  2:12 ` 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=20210401073833.26279-1-haiyangx.zhao@intel.com \
    --to=haiyangx.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).