test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org, lijuan.tu@intel.com
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut
Date: Fri, 11 Dec 2020 15:08:26 +0800	[thread overview]
Message-ID: <20201211070828.24244-2-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201211070828.24244-1-haiyangx.zhao@intel.com>

 get the instance of NetDevice from the port_info, 
 and save it in dut as attribute nic.

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 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


  reply	other threads:[~2020-12-11  7:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  7:08 [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Haiyang Zhao
2020-12-11  7:08 ` Haiyang Zhao [this message]
2020-12-11  7:08 ` [dts] [PATCH V1 2/3] framework/project_dpdk: replace i40evf with iavf Haiyang Zhao
2020-12-11  7:08 ` [dts] [PATCH V1 3/3] tests/kernelpf_iavf: delete code of replacing i40evf Haiyang Zhao
2020-12-11  7:21 ` [dts] [PATCH V1 0/3] replace i40evf with iavf in framework Zhao, HaiyangX
2020-12-11  7:25 ` Tu, Lijuan
2020-12-15  2:11   ` 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=20201211070828.24244-2-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /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).