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 2/3] framework/project_dpdk: replace i40evf with iavf
Date: Fri, 11 Dec 2020 15:08:27 +0800 [thread overview]
Message-ID: <20201211070828.24244-3-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201211070828.24244-1-haiyangx.zhao@intel.com>
replace i40evf with iavf in both host and vm dut,
if the nic kernel driver is i40e.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
framework/project_dpdk.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 259282f4..a8a128ac 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -278,6 +278,17 @@ class DPDKdut(Dut):
shared_lib_path = load_global_setting(HOST_SHARED_LIB_PATH)
if use_shared_lib == 'true' and 'Virt' not in str(self):
self.set_build_options({'RTE_BUILD_SHARED_LIB': 'y'})
+ kernel_driver = ''
+ if 'Virt' in str(self):
+ if self.host_dut.nic:
+ kernel_driver = self.host_dut.nic.default_driver
+ elif self.nic:
+ kernel_driver = self.nic.default_driver
+
+ if kernel_driver == 'i40e':
+ self.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },/a { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },' drivers/net/iavf/iavf_ethdev.c", "# ")
+ self.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h", "# ")
+
build_type = load_global_setting(HOST_BUILD_TYPE_SETTING)
build_install_dpdk = getattr(self, 'build_install_dpdk_%s_%s' % (self.get_os_type(), build_type))
build_install_dpdk(target, extra_options)
--
2.17.1
next prev parent 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 ` [dts] [PATCH V1 1/3] framework/dut: add an attribute nic in dut Haiyang Zhao
2020-12-11 7:08 ` Haiyang Zhao [this message]
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-3-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).