[dts] [PATCH V1] switch_filter: add reload ice code

Zhimin Huang zhiminx.huang at intel.com
Thu Apr 8 10:15:55 CEST 2021


*.about switch filter kernel issue need reload ice to release resources.

Signed-off-by: Zhimin Huang <zhiminx.huang at intel.com>
---
 tests/TestSuite_cvl_dcf_switch_filter.py       | 6 +++++-
 tests/TestSuite_cvl_dcf_switch_filter_pppoe.py | 6 +++++-
 tests/TestSuite_cvl_switch_filter.py           | 5 +++++
 tests/TestSuite_cvl_switch_filter_pppoe.py     | 5 +++++
 4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py
index b9b6d3b..fc257cb 100644
--- a/tests/TestSuite_cvl_dcf_switch_filter.py
+++ b/tests/TestSuite_cvl_dcf_switch_filter.py
@@ -1052,11 +1052,15 @@ class CVLDCFSwitchFilterTest(TestCase):
             port.bind_driver(self.vf_driver)
         time.sleep(5)
 
+    def reload_ice(self):
+        self.dut.send_expect("rmmod ice", "# ", 15)
+        self.dut.send_expect("modprobe ice", "# ", 15)
+
     def set_up(self):
         """
         Run before each test case.
         """
-        pass
+        self.reload_ice()
 
     def create_testpmd_command(self):
         """
diff --git a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py
index 247561c..a3f09ec 100644
--- a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py
+++ b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py
@@ -548,11 +548,15 @@ class CVLDCFSwitchFilterPPPOETest(TestCase):
             port.bind_driver(self.vf_driver)
         time.sleep(5)
 
+    def reload_ice(self):
+        self.dut.send_expect("rmmod ice", "# ", 15)
+        self.dut.send_expect("modprobe ice", "# ", 15)
+
     def set_up(self):
         """
         Run before each test case.
         """
-        pass
+        self.reload_ice()
 
     def create_testpmd_command(self):
         """
diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py
index dcf9a57..5ec8b18 100644
--- a/tests/TestSuite_cvl_switch_filter.py
+++ b/tests/TestSuite_cvl_switch_filter.py
@@ -2566,10 +2566,15 @@ class CVLSwitchFilterTest(TestCase):
         self.generate_file_with_fdir_rules()
         self.path = self.dut.apps_name['test-pmd']
 
+    def reload_ice(self):
+        self.dut.send_expect("rmmod ice", "# ", 15)
+        self.dut.send_expect("modprobe ice", "# ", 15)
+
     def set_up(self):
         """
         Run before each test case.
         """
+        self.reload_ice()
 
     def generate_file_with_fdir_rules(self):
         """
diff --git a/tests/TestSuite_cvl_switch_filter_pppoe.py b/tests/TestSuite_cvl_switch_filter_pppoe.py
index 8904b47..c294954 100644
--- a/tests/TestSuite_cvl_switch_filter_pppoe.py
+++ b/tests/TestSuite_cvl_switch_filter_pppoe.py
@@ -2048,6 +2048,11 @@ class CVLSwitchFilterPPPOETest(TestCase):
         """
         Run before each test case.
         """
+        self.reload_ice()
+
+    def reload_ice(self):
+        self.dut.send_expect("rmmod ice", "# ", 15)
+        self.dut.send_expect("modprobe ice", "# ", 15)
 
     def generate_file_with_fdir_rules(self):
         """
-- 
1.8.3.1



More information about the dts mailing list