From patchwork Fri Apr 30 16:57:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 92468 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 16FA5A0546; Fri, 30 Apr 2021 10:21:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3D954014F; Fri, 30 Apr 2021 10:21:29 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id A9C394013F for ; Fri, 30 Apr 2021 10:21:28 +0200 (CEST) IronPort-SDR: Ek57fV1o+Foy7J8nIMttfUtMGYvSBh5oqBM0g9lfdeEi+nz/o6MY6tfNwpadO7ANEl07k1gjDS mwx+7Fzaglpg== X-IronPort-AV: E=McAfee;i="6200,9189,9969"; a="217963724" X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="217963724" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 01:21:26 -0700 IronPort-SDR: sUk8VBs5jJCLdkmeaYqv8qXmQJYpIqY9rTBNLT3HLFLvaItVhCoEblXueZUkgPyg79ambc+bji a/Shv1NT0btw== X-IronPort-AV: E=Sophos;i="5.82,262,1613462400"; d="scan'208";a="404516551" Received: from unknown (HELO cvl_tetser_105.icx.intel.com) ([10.240.183.105]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2021 01:21:24 -0700 From: Qin Sun To: dts@dpdk.org Cc: Qin Sun Date: Fri, 30 Apr 2021 16:57:14 +0000 Message-Id: <20210430165714.19867-1-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/cvl_dcf_switch_filter: set vf vlan for dcf mode 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" Confirm with developer, dpdk is changed for VF DCF mode, 'vf-vlan-prune-disable' needs to be set before VF receives VLAN packets Signed-off-by: Qin Sun Tested-by: Qin Sun --- tests/TestSuite_cvl_dcf_switch_filter.py | 4 ++++ tests/TestSuite_cvl_dcf_switch_filter_pppoe.py | 4 ++++ 2 files changed, 8 insertions(+) mode change 100755 => 100644 tests/TestSuite_cvl_dcf_switch_filter.py diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py old mode 100755 new mode 100644 index fc257cbe..dd7e0109 --- a/tests/TestSuite_cvl_dcf_switch_filter.py +++ b/tests/TestSuite_cvl_dcf_switch_filter.py @@ -1025,6 +1025,8 @@ class CVLDCFSwitchFilterTest(TestCase): # Verify that enough ports are available self.verify(len(self.dut_ports) >= 1, "Insufficient ports") localPort = self.tester.get_local_port(self.dut_ports[0]) + self.used_dut_port_0 = self.dut_ports[0] + self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] self.__tx_iface = self.tester.get_interface(localPort) self.pkt = Packet() self.testpmd_status = "close" @@ -1042,6 +1044,7 @@ 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), '#') #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'] @@ -1877,4 +1880,5 @@ 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() diff --git a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py index a3f09ec9..c51d14b1 100644 --- a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py +++ b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py @@ -521,6 +521,8 @@ class CVLDCFSwitchFilterPPPOETest(TestCase): # Verify that enough ports are available self.verify(len(self.dut_ports) >= 1, "Insufficient ports") localPort = self.tester.get_local_port(self.dut_ports[0]) + self.used_dut_port_0 = self.dut_ports[0] + self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] self.__tx_iface = self.tester.get_interface(localPort) self.pkt = Packet() self.testpmd_status = "close" @@ -538,6 +540,7 @@ 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), '#') #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'] @@ -913,4 +916,5 @@ 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()