From patchwork Fri Jun 18 09:26:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 94402 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEAD0A0C46; Fri, 18 Jun 2021 11:26:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACCC0410DE; Fri, 18 Jun 2021 11:26:48 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id AF06740142 for ; Fri, 18 Jun 2021 11:26:47 +0200 (CEST) IronPort-SDR: OTwEUgZFZ4ae/GwbQjNBl2Lso6aLfd62+pbw7BBfR5eZUMAR2vIRPaeFJTGPjHjbnqwt8T8dwY Ze4WQoI5bXSQ== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="206564133" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="206564133" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:46 -0700 IronPort-SDR: D3MWMfvCkwHPzdc7MLy3N6JFFYnx8iFHUlCvjZd1gvm7HGPszus1cbRRqofUDH+3Ep+XWkz/Ie TGi+2OC2MkWw== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="485620719" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.57]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:44 -0700 From: Jun Dong To: junx.dong@intel.com Cc: dts@dpdk.org, Zhimin Huang Date: Fri, 18 Jun 2021 17:26:13 +0800 Message-Id: <20210618092615.202107-2-junx.dong@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618092615.202107-1-junx.dong@intel.com> References: <20210618092615.202107-1-junx.dong@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/3] framework/project_dpdk: remove IAVF dpdk code modification X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Zhimin Huang * IAVF is default VF driver for i40e NIC, so remove dpdk changes from dts Signed-off-by: Jun Dong --- framework/project_dpdk.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index f7946664..c1719c49 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -288,13 +288,6 @@ class DPDKdut(Dut): kernel_driver = self.nic.default_driver nic_name = self.nic.name - 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", "# ") - 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) From patchwork Fri Jun 18 09:26:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 94403 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8E9FA0C46; Fri, 18 Jun 2021 11:27:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D41B9410E5; Fri, 18 Jun 2021 11:27:00 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id ADBF140142 for ; Fri, 18 Jun 2021 11:26:58 +0200 (CEST) IronPort-SDR: qB7aMrmGtpD5IPoI3zmEyYEitBHvwL4zbqq6CZG/W1tw+sXIV2dPENC8iWDmND4GvPzB93YMW2 DcpXxuqJr+cA== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="267670286" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="267670286" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:54 -0700 IronPort-SDR: j38YXDca7vd5Bl8hbN+7wgBWXgsjoyembe+yaftiNP2Bv5K7P7F6qibgGQ1X9YPWIj/8PsvWvW jjP1xsjFl2wQ== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="485620783" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.57]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:52 -0700 From: Jun Dong To: junx.dong@intel.com Cc: dts@dpdk.org Date: Fri, 18 Jun 2021 17:26:14 +0800 Message-Id: <20210618092615.202107-3-junx.dong@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618092615.202107-1-junx.dong@intel.com> References: <20210618092615.202107-1-junx.dong@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/3] test_plans/*: update test plan about enable IAVF X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" * update iavf test plan * update vf_l3fwd test plan Signed-off-by: Jun Dong --- test_plans/iavf_test_plan.rst | 23 ++++------------------- test_plans/vf_l3fwd_test_plan.rst | 5 ----- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/test_plans/iavf_test_plan.rst b/test_plans/iavf_test_plan.rst index b760a633..4855e175 100644 --- a/test_plans/iavf_test_plan.rst +++ b/test_plans/iavf_test_plan.rst @@ -43,14 +43,7 @@ I40E driver NIC (Fortville XXV710, Fortville Spirit, Fortville Eagle) Prerequisites ======================= -1. Modify and build DPDK source code to enable IAVF function for I40E NIC:: - - 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 - sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h - - make install RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc - -2. Configure PF and VF:: +1. Configure PF and VF:: modprobe uio; insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko; @@ -59,14 +52,14 @@ Prerequisites echo 1 > /sys/bus/pci/devices/0000\:08\:00.0/max_vfs echo 1 > /sys/bus/pci/devices/0000\:08\:00.1/max_vfs -3. Start testpmd on host to configure VF ports' mac:: +2. Start testpmd on host to configure VF ports' mac:: ./x86_64-native-linuxapp-gcc/app/testpmd -l 1-5 -n 4 -- -i testpmd>set vf mac addr 0 0 00:12:34:56:78:01 testpmd>set vf mac addr 1 0 00:12:34:56:78:02 -4. Pass through VF 09:02.0 and 09:0a.0 to VM0:: +3. Pass through VF 09:02.0 and 09:0a.0 to VM0:: taskset -c 24,25 qemu-system-x86_64 \ -name vm0 -enable-kvm -pidfile /tmp/.vm0.pid -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \ @@ -76,15 +69,7 @@ Prerequisites -device virtio-serial -device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 -vnc :1 \ -drive file=/home/image/sriov-fc25-1.img,format=raw,if=virtio,index=0,media=disk - -5. Modify and build DPDK source code to enable IAVF function for I40E NIC in VM:: - - 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 - sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h - - make install RTE_SDK=`pwd` T=x86_64-native-linuxapp-gcc - -6. Bind VF to igb_uio or vfio-pic in VM:: +4. Bind VF to igb_uio or vfio-pic in VM:: ./usertools/dpdk-devbind.py --bind=igb_uio 00:04.0 00:05.0 or diff --git a/test_plans/vf_l3fwd_test_plan.rst b/test_plans/vf_l3fwd_test_plan.rst index 6d816dd8..efdedda4 100644 --- a/test_plans/vf_l3fwd_test_plan.rst +++ b/test_plans/vf_l3fwd_test_plan.rst @@ -85,11 +85,6 @@ Prerequisites * Case config: For test vf_l3fwd perf, need to set "define RTE_TEST_RX_DESC_DEFAULT 2048" and "define RTE_TEST_TX_DESC_DEFAULT 2048" in ./examples/l3fwd/l3fwd.h and re-build l3fwd. - Note: - Only FVL need to change code to support iavf, when dpdk use iavf as default vf driver, no need to change code. - If test iavf on FVL, need to change "{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) }" to - "a { RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) }" in ./drivers/net/iavf/iavf_ethdev.c, - and set "I40E_DEV_ID_VF 0x164C" in ./drivers/net/i40e/base/i40e_devids.h and re-build DPDK. Setup overview ============== From patchwork Fri Jun 18 09:26:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 94404 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CA28A0C47; Fri, 18 Jun 2021 11:27:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 054A0410EC; Fri, 18 Jun 2021 11:27:01 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9A42340142 for ; Fri, 18 Jun 2021 11:26:59 +0200 (CEST) IronPort-SDR: FFcTe1AGutPqmjKpea/EOE2np9r1VrV29T+swEX9giHxEVIVMMfmNmq2k/5676HTFXhQG44fVO bOAEujvY9YOw== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="267670288" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="267670288" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:56 -0700 IronPort-SDR: QAwUJ2QG9MkSDtS5FSUhX6zZagzmc5EBvkZm0WNQUxgl7tR6LsNc45buhU57IcIKLNknSAcKIW rxyVIj6MnVOw== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="485620793" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.57]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 02:26:55 -0700 From: Jun Dong To: junx.dong@intel.com Cc: dts@dpdk.org Date: Fri, 18 Jun 2021 17:26:15 +0800 Message-Id: <20210618092615.202107-4-junx.dong@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210618092615.202107-1-junx.dong@intel.com> References: <20210618092615.202107-1-junx.dong@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 3/3] tests/*: update test plan about enable IAVF X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" * update iavf test suite * update vf_l3fwd test suite Signed-off-by: Jun Dong --- tests/TestSuite_iavf.py | 12 ------------ tests/TestSuite_vf_l3fwd.py | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py index 248bd8d1..9656b4fc 100644 --- a/tests/TestSuite_iavf.py +++ b/tests/TestSuite_iavf.py @@ -84,9 +84,6 @@ class TestIavf(TestCase): else: self.vf_assign_method = 'vfio-pci' self.dut.send_expect('modprobe vfio-pci', '#') - self.dut.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.dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.dut.build_install_dpdk(self.target) self.setup_vm_env() def set_up(self): @@ -153,9 +150,6 @@ class TestIavf(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - self.vm_dut_0.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.vm_dut_0.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.vm_dut_0.build_install_dpdk(self.target) self.env_done = True def bind_nic_driver(self, ports, driver=""): @@ -183,9 +177,6 @@ class TestIavf(TestCase): netdev.bind_driver(driver=driver) def destroy_vm_env(self): - self.vm_dut_0.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },/d' drivers/net/iavf/iavf_ethdev.c", "# ") - self.vm_dut_0.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x164C/0x154C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.vm_dut_0.build_install_dpdk(self.target) if getattr(self, 'vm0', None): if getattr(self, 'vm_dut_0', None): self.vm_dut_0.kill_all() @@ -771,9 +762,6 @@ class TestIavf(TestCase): self.dut.send_expect("quit", "# ") if self.env_done is True: self.destroy_vm_env() - self.dut.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) },/d' drivers/net/iavf/iavf_ethdev.c", "# ") - self.dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x164C/0x154C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.dut.build_install_dpdk(self.target) self.env_done = False else: pass diff --git a/tests/TestSuite_vf_l3fwd.py b/tests/TestSuite_vf_l3fwd.py index 60a2bea4..a9bc7fa4 100644 --- a/tests/TestSuite_vf_l3fwd.py +++ b/tests/TestSuite_vf_l3fwd.py @@ -307,21 +307,9 @@ class TestVfL3fwd(TestCase): for idx in self.dut_ports: self.verify(self.dut.ports_info[idx]['port'].default_driver == 'i40e', 'The case is only designed for Fortville') - self.build_iavf() self.set_rxtx_descriptor_2048_and_rebuild_l3fwd() self.measure_vf_performance(host_driver='default', vf_driver=self.get_kernel_pf_vf_driver()) - def build_iavf(self): - self.dut.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.dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x154C/0x164C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.dut.build_install_dpdk(self.target) - - def restore_dpdk(self): - if self.running_case == "test_perf_kernel_pf_dpdk_iavf_perf_host_only": - self.dut.send_expect("sed -i '/{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_VF) }/d' drivers/net/iavf/iavf_ethdev.c", "# ") - self.dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x164C/0x154C/g' drivers/net/i40e/base/i40e_devids.h", "# ") - self.dut.build_install_dpdk(self.target) - def set_rxtx_descriptor_2048_and_rebuild_l3fwd(self): """ Set RX/TX descriptor to 2048 and rebuild l3fwd @@ -344,7 +332,6 @@ class TestVfL3fwd(TestCase): def tear_down(self): self.destroy_vf_env() - self.restore_dpdk() def tear_down_all(self): self.dut.bind_interfaces_linux(self.drivername)