test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xie wei <weix.xie@intel.com>
To: dts@dpdk.org
Cc: Xie wei <weix.xie@intel.com>
Subject: [dts] [PATCH V1 1/2] framework/project_dpdk:replace i40evf with iavf for NIC X722
Date: Fri,  8 Jan 2021 13:37:53 +0800	[thread overview]
Message-ID: <20210108053754.13590-2-weix.xie@intel.com> (raw)
In-Reply-To: <20210108053754.13590-1-weix.xie@intel.com>

Replace i40evf with iavf in both host and vm dut for fortpark_BASE-T and fortpark_TLV.

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 framework/project_dpdk.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index a8c4e379..36e21c42 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -279,13 +279,19 @@ class DPDKdut(Dut):
         if use_shared_lib == 'true' and 'Virt' not in str(self):
             self.set_build_options({'RTE_BUILD_SHARED_LIB': 'y'})
         kernel_driver = ''
+        nic_name = ''
         if 'Virt' in str(self):
             if self.host_dut.nic:
                 kernel_driver = self.host_dut.nic.default_driver
+                nic_name = self.host_dut.nic.name
         elif self.nic:
             kernel_driver = self.nic.default_driver
+            nic_name = self.nic.name
 
-        if kernel_driver == 'i40e':
+        if nic_name in ['fortpark_TLV', 'fortpark_BASE-T']:
+            self.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },/i { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_X722_VF) },' drivers/net/iavf/iavf_ethdev.c", "# ")
+            self.send_expect("sed -i '/I40E_DEV_ID_X722_VF/d' drivers/net/i40e/i40e_ethdev_vf.c", "# ")
+        elif 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", "# ")
 
-- 
2.17.1


  reply	other threads:[~2021-01-08  5:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  5:37 [dts] [PATCH V1 0/2] replace i40evf with iavf Xie wei
2021-01-08  5:37 ` Xie wei [this message]
2021-01-13  6:43   ` [dts] [PATCH V1 1/2] framework/project_dpdk:replace i40evf with iavf for NIC X722 Tu, Lijuan
2021-01-13  8:14     ` Tu, Lijuan
2021-01-08  5:37 ` [dts] [PATCH V1 2/2] nics/net_device:add nics name attribute Xie wei
2021-01-08  5:40 ` [dts] [PATCH V1 0/2] replace i40evf with iavf Xie, WeiX
2021-01-08  6:43   ` Zhao, HaiyangX

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=20210108053754.13590-2-weix.xie@intel.com \
    --to=weix.xie@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).