From patchwork Tue Nov 2 08:11:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103445 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 6E9B0A0C4E; Tue, 2 Nov 2021 09:12:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 615F440DF6; Tue, 2 Nov 2021 09:12:28 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 778A94068F for ; Tue, 2 Nov 2021 09:12:27 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402688" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402688" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:11 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002949" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:10 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:51 +0800 Message-Id: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2 01/10] tests/cvl_dcf_flow_priority: update case code for driver change 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" Signed-off-by: Jiale Song --- test_plans/cvl_dcf_flow_priority_test_plan.rst | 4 ++-- tests/TestSuite_cvl_dcf_flow_priority.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test_plans/cvl_dcf_flow_priority_test_plan.rst b/test_plans/cvl_dcf_flow_priority_test_plan.rst index 38e86a74..d4623194 100755 --- a/test_plans/cvl_dcf_flow_priority_test_plan.rst +++ b/test_plans/cvl_dcf_flow_priority_test_plan.rst @@ -71,9 +71,9 @@ Prerequisites 0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci 0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci -6. Enable vlan prune flag:: +6. Disable vlan prune flag:: - ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on + ethtool --set-priv-flags ens785f0 vf-vlan-pruning off 7. Generate 4 VFs on PF0(not all the VFs are used):: diff --git a/tests/TestSuite_cvl_dcf_flow_priority.py b/tests/TestSuite_cvl_dcf_flow_priority.py index 2e021a67..8ec16fad 100755 --- a/tests/TestSuite_cvl_dcf_flow_priority.py +++ b/tests/TestSuite_cvl_dcf_flow_priority.py @@ -1128,6 +1128,11 @@ class CVLDCFFlowPriorityTest(TestCase): self.testpmd_status = "close" #bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") + # get PF interface name + self.pf0_intf = self.dut.ports_info[self.dut_ports[0]]['intf'] + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf0_intf, self.flag) #set vf driver self.vf_driver = 'vfio-pci' @@ -1139,7 +1144,8 @@ class CVLDCFFlowPriorityTest(TestCase): self.used_dut_port_0 = self.dut_ports[pf_port] #get PF interface name self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable on' % self.pf0_intf, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s off' % (self.pf0_intf, self.flag), "# ") #generate 4 VFs on PF self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 4, driver=driver) self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] @@ -1768,4 +1774,6 @@ class CVLDCFFlowPriorityTest(TestCase): Run after each test suite. """ self.dut.kill_all() + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf0_intf, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103447 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 A8CD1A0C4E; Tue, 2 Nov 2021 09:12:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A492841104; Tue, 2 Nov 2021 09:12:29 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 569E64068F for ; Tue, 2 Nov 2021 09:12:28 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402694" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402694" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:13 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002955" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:12 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:52 +0800 Message-Id: <1635840720-90878-2-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 02/10] tests/cvl_qinq: update case code for driver change 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" Signed-off-by: Jiale Song --- test_plans/cvl_qinq_test_plan.rst | 14 +++++++------- tests/TestSuite_cvl_qinq.py | 27 +++++++++++++++++++-------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/test_plans/cvl_qinq_test_plan.rst b/test_plans/cvl_qinq_test_plan.rst index 4f44150b..22efd705 100644 --- a/test_plans/cvl_qinq_test_plan.rst +++ b/test_plans/cvl_qinq_test_plan.rst @@ -71,9 +71,9 @@ Prerequisites 0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci 0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci -6. Enable vlan prune flag:: +6. Disable vlan prune flag:: - ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on + ethtool --set-priv-flags ens785f0 vf-vlan-pruning off 7. Generate 4 VFs on PF0(not all the VFs are used):: @@ -130,7 +130,7 @@ Prerequisites 13. For AVF QinQ test cases(10-14), recreate Generate 1 VFs on PF0, reconfig the VF then launch testpmd:: echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs - ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off + ethtool --set-priv-flags ens785f0 vf-vlan-pruning on echo 1 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs ip link set ens785f0 vf 0 mac 00:11:22:33:44:11 ip link set dev ens785f0 vf 0 spoofchk off @@ -906,9 +906,9 @@ Test case 08: vlan insertion when pvid enable Test case 09: vlan filter when pvid enable ========================================== -1. reset test environment, create vfs and disable vlan prune flag:: +1. reset test environment, create vfs and enable vlan prune flag:: - ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable off + ethtool --set-priv-flags ens785f0 vf-vlan-pruning on 2. repeat Prerequisites steps from 7 to 12 @@ -1113,10 +1113,10 @@ Test case 11: Enable/Disable IAVF VLAN header stripping Test case 12: Enable/Disable IAVF VLAN header insertion ======================================================= -1. enable vf-vlan-prune-disable flag:: +1. disable vf-vlan-pruning flag:: echo 0 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs - ethtool --set-priv-flags ens785f0 vf-vlan-prune-disable on + ethtool --set-priv-flags ens785f0 vf-vlan-pruning off 2. set up test environment again:: diff --git a/tests/TestSuite_cvl_qinq.py b/tests/TestSuite_cvl_qinq.py index 39d590f6..a23aeeb3 100644 --- a/tests/TestSuite_cvl_qinq.py +++ b/tests/TestSuite_cvl_qinq.py @@ -240,6 +240,9 @@ class TestCvlQinq(TestCase): self.pf_interface = self.dut.ports_info[self.dut_ports[0]]['intf'] port = self.dut.ports_info[0]['port'] port.bind_driver() + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf_interface, self.flag) self.vf_flag = False self.vf0_mac = '' @@ -255,7 +258,8 @@ class TestCvlQinq(TestCase): Run before each test case. ''' self.pci_list = [] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable on' % self.pf_interface, "#") + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf_interface,self.flag, self.default_stats), "# ") def setup_pf_vfs_env(self, vfs_num=4): @@ -646,7 +650,8 @@ class TestCvlQinq(TestCase): 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] pkt_list2 = ['Ether(dst="%s",type=0x8100)/Dot1Q(vlan=21,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac, 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=21,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env() self.launch_testpmd(dcf_param=True) self.pmd_output.execute_cmd("vlan set filter on 1") @@ -679,7 +684,8 @@ class TestCvlQinq(TestCase): 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] pkt_list2 = ['Ether(dst="%s",type=0x8100)/Dot1Q(vlan=11,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac, 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env(vfs_num=1) self.launch_testpmd(vfs_num=1) self.pmd_output.execute_cmd("vlan set filter on 0") @@ -712,7 +718,8 @@ class TestCvlQinq(TestCase): """ pkt_list = ['Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac, 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env(vfs_num=1) self.launch_testpmd(vfs_num=1) self.pmd_output.execute_cmd("vlan set filter on 0") @@ -746,7 +753,8 @@ class TestCvlQinq(TestCase): out_vlan = 1 pkt_list = ['Ether(dst="%s",type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac, 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac] - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable on' % self.pf_interface, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s off' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env(vfs_num=1) self.launch_testpmd(vfs_num=1) self.pmd_output.execute_cmd("stop") @@ -789,7 +797,8 @@ class TestCvlQinq(TestCase): """ param = '--rxq=16 --txq=16 --disable-crc-strip' pkt = 'Ether(dst="%s",type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env(vfs_num=1) self.pmd_output.start_testpmd(cores='1S/4C/1T', param=param, ports=self.pci_list, socket=self.ports_socket) self.pmd_output.execute_cmd("set fwd mac") @@ -821,7 +830,8 @@ class TestCvlQinq(TestCase): AVF CRC strip and Vlan strip co-exists """ pkt = 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf1_mac - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, "#") + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), '# ') self.setup_pf_vfs_env(vfs_num=1) self.launch_testpmd(vfs_num=1) self.check_vlan_offload(vlan_type="strip", stats="off") @@ -875,4 +885,5 @@ class TestCvlQinq(TestCase): self.destroy_iavf() def tear_down_all(self): - self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable off' % self.pf_interface, '#') \ No newline at end of file + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf_interface, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103446 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 8F603A0C52; Tue, 2 Nov 2021 09:12:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8700A410FF; Tue, 2 Nov 2021 09:12:29 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6D57A410E6 for ; Tue, 2 Nov 2021 09:12:28 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402700" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402700" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:14 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002965" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:13 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:53 +0800 Message-Id: <1635840720-90878-3-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 03/10] tests/cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp: update case code for driver change 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" Signed-off-by: Jiale Song --- ...tSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py b/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py index df2f8d58..6775d81f 100644 --- a/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py @@ -858,7 +858,11 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): def create_iavf(self): if self.vf_flag is False: self.dut.bind_interfaces_linux('ice') - self.dut.send_expect("ethtool --set-priv-flags %s vf-vlan-prune-disable on" % self.pf_interface, "# ") + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf_interface, self.flag) + if self.default_stats: + self.dut.send_expect("ethtool --set-priv-flags %s %s off" % (self.pf_interface, self.flag), "# ") self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 1) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] self.vf_flag = True @@ -893,7 +897,8 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): """ self.dut.kill_all() self.destroy_iavf() - self.dut.send_expect("ethtool --set-priv-flags %s vf-vlan-prune-disable off" % self.pf_interface, "# ") + if self.default_stats: + self.dut.send_expect("ethtool --set-priv-flags %s %s %s" % (self.pf_interface, self.flag, self.default_stats), "# ") def launch_testpmd(self, symmetric=False): param = "--rxq=16 --txq=16" From patchwork Tue Nov 2 08:11:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103448 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 CB045A0C55; Tue, 2 Nov 2021 09:12:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C58864111A; Tue, 2 Nov 2021 09:12:30 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2F02C4068F for ; Tue, 2 Nov 2021 09:12:28 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402706" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402706" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:16 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002973" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:14 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:54 +0800 Message-Id: <1635840720-90878-4-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 04/10] tests/cvl_dcf_switch_filter: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_cvl_dcf_switch_filter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py index e319366d..f65d0452 100755 --- a/tests/TestSuite_cvl_dcf_switch_filter.py +++ b/tests/TestSuite_cvl_dcf_switch_filter.py @@ -1031,6 +1031,9 @@ class CVLDCFSwitchFilterTest(TestCase): self.testpmd_status = "close" #bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf0_intf, self.flag) #set vf driver self.vf_driver = 'vfio-pci' @@ -1043,7 +1046,8 @@ class CVLDCFSwitchFilterTest(TestCase): #get PF interface name self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] out = self.dut.send_expect('ethtool -i %s' % self.pf0_intf, '#') - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable on'.format(self.pf0_intf), '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s off' % (self.pf0_intf, self.flag), "# ") #generate 4 VFs on PF self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 4, driver=driver) self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] @@ -1880,5 +1884,6 @@ class CVLDCFSwitchFilterTest(TestCase): """ Run after each test suite. """ - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable off'.format(self.pf0_intf), '#') self.dut.kill_all() + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf0_intf, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103449 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 EDA1DA0C52; Tue, 2 Nov 2021 09:12:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8E2F4111E; Tue, 2 Nov 2021 09:12:30 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5A47D4069F for ; Tue, 2 Nov 2021 09:12:29 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402710" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402710" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:17 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002984" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:16 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:55 +0800 Message-Id: <1635840720-90878-5-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 05/10] tests/cvl_dcf_switch_filter_pppoe: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_cvl_dcf_switch_filter_pppoe.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py index 3badab20..04f9e109 100644 --- a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py +++ b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py @@ -527,6 +527,10 @@ class CVLDCFSwitchFilterPPPOETest(TestCase): #bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf0_intf, self.flag) + #set vf driver self.vf_driver = 'vfio-pci' self.dut.send_expect('modprobe vfio-pci', '#') @@ -538,7 +542,8 @@ class CVLDCFSwitchFilterPPPOETest(TestCase): #get PF interface name self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] out = self.dut.send_expect('ethtool -i %s' % self.pf0_intf, '#') - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable on'.format(self.pf0_intf), '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s off' % (self.pf0_intf, self.flag), "# ") #generate 4 VFs on PF self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 4, driver=driver) self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] @@ -914,5 +919,6 @@ class CVLDCFSwitchFilterPPPOETest(TestCase): """ Run after each test suite. """ - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable off'.format(self.pf0_intf), '#') self.dut.kill_all() + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf0_intf, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103453 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 E68E1A0C52; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84EA141136; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 89824410E6 for ; Tue, 2 Nov 2021 09:12:30 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402718" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402718" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:19 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002992" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:17 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:56 +0800 Message-Id: <1635840720-90878-6-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 06/10] tests/cvl_vf_support_multicast_address: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_cvl_vf_support_multicast_address.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TestSuite_cvl_vf_support_multicast_address.py b/tests/TestSuite_cvl_vf_support_multicast_address.py index 72c918ae..9b3c7479 100644 --- a/tests/TestSuite_cvl_vf_support_multicast_address.py +++ b/tests/TestSuite_cvl_vf_support_multicast_address.py @@ -75,6 +75,11 @@ class TestCvlVfSupportMulticastAdress(TestCase): # Generate 2 VFs on PF if self.vf_flag is False: self.dut.bind_interfaces_linux('ice') + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf_interface, self.flag) + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), "# ") self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 2) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] self.vf_flag = True @@ -533,3 +538,5 @@ class TestCvlVfSupportMulticastAdress(TestCase): """ self.dut.kill_all() self.destroy_iavf() + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf_interface, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103450 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 1ECC1A0C4E; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1922F41103; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id CCBA64069F for ; Tue, 2 Nov 2021 09:12:29 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402721" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402721" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:20 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489002996" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:19 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:57 +0800 Message-Id: <1635840720-90878-7-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 07/10] tests/l2tp_esp_coverage: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_l2tp_esp_coverage.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TestSuite_l2tp_esp_coverage.py b/tests/TestSuite_l2tp_esp_coverage.py index 11f46ed8..459b003f 100644 --- a/tests/TestSuite_l2tp_esp_coverage.py +++ b/tests/TestSuite_l2tp_esp_coverage.py @@ -120,11 +120,18 @@ class L2tpEspCoverage(TestCase): """ self.dut.kill_all() self.destroy_iavf() + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf_interface, self.flag, self.default_stats), "# ") def create_iavf(self): if self.vf_flag is False: self.dut.bind_interfaces_linux('ice') + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.pf_interface, self.flag) + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.pf_interface, self.flag), "# ") self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 1) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] self.vf_flag = True From patchwork Tue Nov 2 08:11:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103451 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 45929A0C55; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ECA341122; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id D82FD410E6 for ; Tue, 2 Nov 2021 09:12:29 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402724" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402724" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:22 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489003000" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:20 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:58 +0800 Message-Id: <1635840720-90878-8-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 08/10] tests/kernelpf_iavf: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_kernelpf_iavf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index dde59e10..540a4e98 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -97,6 +97,12 @@ class TestKernelpfIavf(TestCase): self.tester_intf1 = self.tester.get_interface(tester_port1) self.l3fwdpower_name = self.dut.apps_name['l3fwd-power'].strip().split('/')[-1] + # bind to default driver + self.bind_nic_driver(self.dut_ports, driver="") + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.host_intf, self.flag) + def set_up(self): if self.running_case == "test_vf_mac_filter": @@ -143,6 +149,8 @@ class TestKernelpfIavf(TestCase): # bind to default driver self.bind_nic_driver(self.dut_ports, driver="") self.used_dut_port = self.dut_ports[0] + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' % (self.host_intf, self.flag), "# ") self.dut.generate_sriov_vfs_by_port( self.used_dut_port, 1, driver=driver) self.sriov_vfs_port = self.dut.ports_info[ @@ -1037,3 +1045,5 @@ class TestKernelpfIavf(TestCase): if self.env_done: self.destroy_vm_env() + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.host_intf, self.flag, self.default_stats), "# ") From patchwork Tue Nov 2 08:11:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103452 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 7AAE8A0C56; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5EFBC4112E; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F22694111A for ; Tue, 2 Nov 2021 09:12:29 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402729" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402729" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:23 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489003009" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:22 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:11:59 +0800 Message-Id: <1635840720-90878-9-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 09/10] tests/iavf_flexible_descriptor: update case code for driver change 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" Signed-off-by: Jiale Song --- tests/TestSuite_iavf_flexible_descriptor.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_iavf_flexible_descriptor.py b/tests/TestSuite_iavf_flexible_descriptor.py index 721dbb53..8b5a4d1d 100644 --- a/tests/TestSuite_iavf_flexible_descriptor.py +++ b/tests/TestSuite_iavf_flexible_descriptor.py @@ -81,7 +81,16 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): # set vf assign method and vf driver vf_driver = 'vfio-pci' self.pf0_intf = self.dut.ports_info[self.dut_ports[dut_index]]['intf'] - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable on'.format(self.pf0_intf),'#') + # get priv-flags default stats + if self.nic.startswith('columbiaville'): + self.flag = 'vf-vlan-pruning' + else: + self.flag = 'vf-vlan-prune-disable' + self.default_stats = self.dut.get_priv_flags_state(self.pf0_intf, self.flag) + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s off' %(self.pf0_intf, self.flag),'# ') + else: + self.dut.send_expect('ethtool --set-priv-flags %s %s on' %(self.pf0_intf, self.flag),'# ') # generate 2 VFs on PF self.dut.generate_sriov_vfs_by_port( used_dut_port, 1, driver=self.kdriver) @@ -118,7 +127,8 @@ class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase): """ self.destroy_vf() self.restore_compilation() - self.dut.send_expect('ethtool --set-priv-flags {} vf-vlan-prune-disable off'.format(self.pf0_intf), '#') + if self.default_stats: + self.dut.send_expect('ethtool --set-priv-flags %s %s %s' % (self.pf0_intf, self.flag, self.default_stats), '# ') def set_up(self): """ From patchwork Tue Nov 2 08:12:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 103454 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 63671A0C4E; Tue, 2 Nov 2021 09:12:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2C774113B; Tue, 2 Nov 2021 09:12:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 893AE4069F for ; Tue, 2 Nov 2021 09:12:30 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="218402732" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="218402732" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:27 -0700 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="489003015" Received: from unknown (HELO dpdk-zhaohy-t.sh.intel.com) ([10.240.183.68]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 01:12:23 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Date: Tue, 2 Nov 2021 16:12:00 +0800 Message-Id: <1635840720-90878-10-git-send-email-songx.jiale@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> References: <1635840720-90878-1-git-send-email-songx.jiale@intel.com> Subject: [dts] [PATCH V2 10/10] tests/vf_vlan: update case code for driver change 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" the iavf vlan priv-flags of the kernel drive of columbiaville has changed from vf-vlan-prune-disable to vf-vlan-pruning in ice 1.7.2_3_g03d5f45f,and is closed by default,so the affected case needs to modify the code Signed-off-by: Jiale Song --- tests/TestSuite_vf_vlan.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index 127eca39..db6c2dd6 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -68,6 +68,13 @@ class TestVfVlan(TestCase): # get driver version self.driver_version = self.nic_obj.driver_version + # bind to default driver + self.bind_nic_driver(self.dut_ports[:2], driver="") + self.host_intf0 = self.dut.ports_info[self.dut_ports[0]]['intf'] + # get priv-flags default stats + self.flag = 'vf-vlan-pruning' + self.default_stats = self.dut.get_priv_flags_state(self.host_intf0, self.flag) + def set_up(self): self.setup_vm_env() @@ -103,14 +110,12 @@ class TestVfVlan(TestCase): if self.env_done: return - # bind to default driver - self.bind_nic_driver(self.dut_ports[:2], driver="") - self.used_dut_port_0 = self.dut_ports[0] self.host_intf0 = self.dut.ports_info[self.used_dut_port_0]['intf'] tester_port = self.tester.get_local_port(self.used_dut_port_0) self.tester_intf0 = self.tester.get_interface(tester_port) - + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect("ethtool --set-priv-flags %s %s on" % (self.host_intf0, self.flag), "# ") self.dut.generate_sriov_vfs_by_port( self.used_dut_port_0, 1, driver=driver) self.sriov_vfs_port_0 = self.dut.ports_info[ @@ -123,6 +128,8 @@ class TestVfVlan(TestCase): self.used_dut_port_1 = self.dut_ports[1] self.host_intf1 = self.dut.ports_info[self.used_dut_port_1]['intf'] + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect("ethtool --set-priv-flags %s %s on" % (self.host_intf1, self.flag), "# ") self.dut.generate_sriov_vfs_by_port( self.used_dut_port_1, 1, driver=driver) self.sriov_vfs_port_1 = self.dut.ports_info[ @@ -181,7 +188,7 @@ class TestVfVlan(TestCase): port = self.dut.ports_info[self.used_dut_port_1]['port'] self.used_dut_port_1 = None - self.bind_nic_driver(self.dut_ports[:2], driver='default') + self.bind_nic_driver(self.dut_ports[:2], driver="") self.env_done = False @@ -271,7 +278,7 @@ class TestVfVlan(TestCase): self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0") # send packet with vlan - self.vm0_testpmd.execute_cmd("port reset 0") + self.vm0_testpmd.execute_cmd("port reset 0", 'testpmd> ', 120) self.vm0_testpmd.execute_cmd("port start all") self.vm0_testpmd.execute_cmd("start") @@ -449,4 +456,5 @@ class TestVfVlan(TestCase): def tear_down_all(self): self.destroy_vm_env() - pass + if self.nic.startswith('columbiaville') and self.default_stats: + self.dut.send_expect("ethtool --set-priv-flags %s %s %s" % (self.host_intf0, self.flag, self.default_stats), "# ")