From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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), "# ") -- 2.17.1