diff mbox series

[V2,07/10] tests/l2tp_esp_coverage: update case code for driver change

Message ID 1635840720-90878-7-git-send-email-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers show
Series [V2,01/10] tests/cvl_dcf_flow_priority: update case code for driver change | expand

Commit Message

Jiale Song Nov. 2, 2021, 8:11 a.m. UTC
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_l2tp_esp_coverage.py | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

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