* Re: [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases
2019-07-26 15:55 [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases Wenjie Li
@ 2019-07-26 8:47 ` Peng, Yuan
2019-07-29 7:59 ` Li, WenjieX A
2019-07-26 15:55 ` [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases Wenjie Li
1 sibling, 1 reply; 6+ messages in thread
From: Peng, Yuan @ 2019-07-26 8:47 UTC (permalink / raw)
To: Li, WenjieX A, dts; +Cc: Peng, Yuan
Acked-by: Peng, Yuan <yuan.peng@intel.com>
-----Original Message-----
From: Li, WenjieX A
Sent: Friday, July 26, 2019 11:55 PM
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>; Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: [dts][PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases
change test cases based on dpdk 603beeb970b5d87fa7.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
...ckage_download_in_ice_driver_test_plan.rst | 33 ++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
index a6dcfc2..efe2f93 100644
--- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
+++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
@@ -94,8 +94,8 @@ Test case 1: Download the package successfully
with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
the packets can be distributed to different rx queues.
-Test case 2: failed to download pkg
-===================================
+Test case 2: Driver enters Safe Mode successfully
+=================================================
1. Server power on, then put a new ice.pkg to
/lib/firmware/intel/ice/ddp/ice.pkg.
@@ -103,8 +103,9 @@ Test case 2: failed to download pkg
2. Start testpmd::
- ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
- --port-topology=chained
+ ./testpmd -c 0x3fe -n 6 \
+ -w PORT0_PCI,safe-mode-support=1 -w PORT1_PCI,safe-mode-support=1 \
+ -- -i --nb-cores=8 --rxq=8 --txq=8 --port-topology=chained
There will be an error reported::
@@ -133,3 +134,27 @@ Test case 2: failed to download pkg 5. Send UPD/TCP/SCTP+IPV4/IPV6 packets with packet generator
with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
the packets can be only distributed to rx queue 0.
+
+Test case 3: Driver enters Safe Mode failed
+===========================================
+
+1. Server power on, then put a new ice.pkg to
+ /lib/firmware/intel/ice/ddp/ice.pkg.
+ Make sure the new ice.pkg is different with the original one.
+
+2. Start testpmd::
+
+ ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
+ --port-topology=chained
+
+ There will be an error reported::
+
+ ice_dev_init(): Failed to load the DDP package,Use
+ safe-mode-support=1 to enter Safe Mode
+
+ The driver failed to go to safe mode.
+
+3. Check port info in testpmd::
+
+ testpmd> show port info all
+
+ There is no listed port info.
\ No newline at end of file
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases
2019-07-26 15:55 ` [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases Wenjie Li
@ 2019-07-26 8:51 ` Peng, Yuan
2019-07-29 7:59 ` Li, WenjieX A
0 siblings, 1 reply; 6+ messages in thread
From: Peng, Yuan @ 2019-07-26 8:51 UTC (permalink / raw)
To: Li, WenjieX A, dts
Acked-by: Peng, Yuan <yuan.peng@intel.com>
-----Original Message-----
From: Li, WenjieX A
Sent: Friday, July 26, 2019 11:55 PM
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>; Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: [dts][PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases
change test cases based on dpdk 603beeb970b5d87fa7.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
V2: fix "warning: 1 line adds whitespace errors."
...e_enable_package_download_in_ice_driver.py | 77 +++++++++++++------
1 file changed, 53 insertions(+), 24 deletions(-)
diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py b/tests/TestSuite_enable_package_download_in_ice_driver.py
index b5e3e2f..9197198 100644
--- a/tests/TestSuite_enable_package_download_in_ice_driver.py
+++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
@@ -54,6 +54,9 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.tester_p0_mac = self.tester.get_mac(localPort0)
self.dut_testpmd = PmdOutput(self.dut)
+ self.dut_p0_pci = self.dut.get_port_pci(self.dut_ports[0])
+ self.dut_p1_pci = self.dut.get_port_pci(self.dut_ports[1])
+
self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file) @@ -84,13 +87,20 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
self.dut.send_expect("touch %s" % self.pkg_file, "#")
- def start_testpmd(self, flag="true"):
- out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE))
- if flag != "true":
- error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
- "ice_load_pkg(): failed to allocate buf of size 0 for package", \
+ def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
+ if safe_mode_support == "true":
+ self.eal_param="-w %s,safe-mode-support=1 -w %s,safe-mode-support=1" % (self.dut_p0_pci, self.dut_p1_pci)
+ else:
+ self.eal_param=""
+ out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE), eal_param=self.eal_param)
+ if ice_pkg == "false":
+ if safe_mode_support == "true":
+ error_messages = ["ice_load_pkg(): failed to allocate
+ buf of size 0 for package", \
"ice_dev_init(): Failed to load the DDP package,Entering Safe Mode", \
"ice_init_rss(): RSS is not supported in safe mode"]
+ if safe_mode_support == "false":
+ error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
+ "ice_dev_init(): Failed to load the DDP package,Use
+ safe-mode-support=1 to enter Safe Mode"]
for error_message in error_messages:
self.verify(error_message in out, "There should be error messages in out: %s" % out)
self.dut_testpmd.execute_cmd('set promisc all off') @@ -209,7 +219,8 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
def verifyResult(self, tran_type, flag):
"""
- Verify whether or not the result passes.
+ if flag == true: all packets should enter different queues of port 0
+ else: all packets enter queue 0 of port 0
"""
if tran_type == "ipv4-other":
self.tcpdump_stop_sniff()
@@ -235,30 +246,48 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.verify(len(list(set(queue_list))) == 1 and int(list(set(queue_list))[0]) == 0, \
"All packets should enter queue 0, but entered %s" % queue_list)
- def download_the_package(self, flag):
+ def download_the_package(self, ice_pkg="true", safe_mode_support="false"):
"""
- if flag == true: use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
- else: use wrong ice.pkg, all packets enter queue 0 of port 0
+ if ice_pkg == true: use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
+ else: use wrong ice.pkg
+ if safe_mode_support == true, start testpmd with "safe-mode-suppor=1", all packets enter queue 0 of port 0
+ else safe_mode_support == false, start testpmd without
+ "safe-mode-suppor", no port is loaded in testpmd
"""
- self.use_correct_ice_pkg(flag=flag)
- self.start_testpmd(flag=flag)
- self.dut_testpmd.execute_cmd('set fwd mac')
- self.dut_testpmd.execute_cmd('start')
- self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
- self.send_packet(tran_type="ipv4-other", flag=flag)
+ self.use_correct_ice_pkg(ice_pkg)
+ self.start_testpmd(ice_pkg, safe_mode_support)
+ if ice_pkg == "false" and safe_mode_support == "false":
+ out = self.dut_testpmd.execute_cmd('show port info all')
+ self.verify("Infos for port" not in out, "There should be no listed port info.")
+ else:
+ self.dut_testpmd.execute_cmd('set fwd mac')
+ self.dut_testpmd.execute_cmd('start')
+ self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
+ self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
- self.dut_testpmd.execute_cmd('stop')
- self.dut_testpmd.execute_cmd('set fwd rxonly')
- self.dut_testpmd.execute_cmd('start')
- for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
- print tran_types
- self.send_packet(tran_type=tran_types, flag=flag)
+ self.dut_testpmd.execute_cmd('stop')
+ self.dut_testpmd.execute_cmd('set fwd rxonly')
+ self.dut_testpmd.execute_cmd('start')
+ for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
+ print tran_types
+ self.send_packet(tran_type=tran_types, flag=ice_pkg)
def test_download_the_package_successfully(self):
- self.download_the_package(flag="true")
+ """
+ use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
+ """
+ self.download_the_package(ice_pkg="true",
+ safe_mode_support="false")
- def test_download_the_package_failed(self):
- self.download_the_package(flag="false")
+ def test_driver_enters_Safe_Mode_successfully(self):
+ """
+ use wrong ice.pkg and start testpmd with "safe-mode-suppor=1", all packets enter queue 0 of port 0
+ """
+ self.download_the_package(ice_pkg="false",
+ safe_mode_support="true")
+
+ def test_driver_enters_Safe_Mode_failed(self):
+ """
+ use wrong ice.pkg and start testpmd without "safe-mode-suppor", no port is loaded in testpmd
+ """
+ self.download_the_package(ice_pkg="false",
+ safe_mode_support="false")
def tear_down(self):
self.dut_testpmd.quit()
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases
@ 2019-07-26 15:55 Wenjie Li
2019-07-26 8:47 ` Peng, Yuan
2019-07-26 15:55 ` [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases Wenjie Li
0 siblings, 2 replies; 6+ messages in thread
From: Wenjie Li @ 2019-07-26 15:55 UTC (permalink / raw)
To: dts; +Cc: yuan.peng, Wenjie Li
change test cases based on dpdk 603beeb970b5d87fa7.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
...ckage_download_in_ice_driver_test_plan.rst | 33 ++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
index a6dcfc2..efe2f93 100644
--- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
+++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
@@ -94,8 +94,8 @@ Test case 1: Download the package successfully
with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
the packets can be distributed to different rx queues.
-Test case 2: failed to download pkg
-===================================
+Test case 2: Driver enters Safe Mode successfully
+=================================================
1. Server power on, then put a new ice.pkg to
/lib/firmware/intel/ice/ddp/ice.pkg.
@@ -103,8 +103,9 @@ Test case 2: failed to download pkg
2. Start testpmd::
- ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
- --port-topology=chained
+ ./testpmd -c 0x3fe -n 6 \
+ -w PORT0_PCI,safe-mode-support=1 -w PORT1_PCI,safe-mode-support=1 \
+ -- -i --nb-cores=8 --rxq=8 --txq=8 --port-topology=chained
There will be an error reported::
@@ -133,3 +134,27 @@ Test case 2: failed to download pkg
5. Send UPD/TCP/SCTP+IPV4/IPV6 packets with packet generator
with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
the packets can be only distributed to rx queue 0.
+
+Test case 3: Driver enters Safe Mode failed
+===========================================
+
+1. Server power on, then put a new ice.pkg to
+ /lib/firmware/intel/ice/ddp/ice.pkg.
+ Make sure the new ice.pkg is different with the original one.
+
+2. Start testpmd::
+
+ ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
+ --port-topology=chained
+
+ There will be an error reported::
+
+ ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode
+
+ The driver failed to go to safe mode.
+
+3. Check port info in testpmd::
+
+ testpmd> show port info all
+
+ There is no listed port info.
\ No newline at end of file
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases
2019-07-26 15:55 [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases Wenjie Li
2019-07-26 8:47 ` Peng, Yuan
@ 2019-07-26 15:55 ` Wenjie Li
2019-07-26 8:51 ` Peng, Yuan
1 sibling, 1 reply; 6+ messages in thread
From: Wenjie Li @ 2019-07-26 15:55 UTC (permalink / raw)
To: dts; +Cc: yuan.peng, Wenjie Li
change test cases based on dpdk 603beeb970b5d87fa7.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
V2: fix "warning: 1 line adds whitespace errors."
...e_enable_package_download_in_ice_driver.py | 77 +++++++++++++------
1 file changed, 53 insertions(+), 24 deletions(-)
diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py b/tests/TestSuite_enable_package_download_in_ice_driver.py
index b5e3e2f..9197198 100644
--- a/tests/TestSuite_enable_package_download_in_ice_driver.py
+++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
@@ -54,6 +54,9 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.tester_p0_mac = self.tester.get_mac(localPort0)
self.dut_testpmd = PmdOutput(self.dut)
+ self.dut_p0_pci = self.dut.get_port_pci(self.dut_ports[0])
+ self.dut_p1_pci = self.dut.get_port_pci(self.dut_ports[1])
+
self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file)
@@ -84,13 +87,20 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
self.dut.send_expect("touch %s" % self.pkg_file, "#")
- def start_testpmd(self, flag="true"):
- out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE))
- if flag != "true":
- error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
- "ice_load_pkg(): failed to allocate buf of size 0 for package", \
+ def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
+ if safe_mode_support == "true":
+ self.eal_param="-w %s,safe-mode-support=1 -w %s,safe-mode-support=1" % (self.dut_p0_pci, self.dut_p1_pci)
+ else:
+ self.eal_param=""
+ out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE), eal_param=self.eal_param)
+ if ice_pkg == "false":
+ if safe_mode_support == "true":
+ error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
"ice_dev_init(): Failed to load the DDP package,Entering Safe Mode", \
"ice_init_rss(): RSS is not supported in safe mode"]
+ if safe_mode_support == "false":
+ error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
+ "ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode"]
for error_message in error_messages:
self.verify(error_message in out, "There should be error messages in out: %s" % out)
self.dut_testpmd.execute_cmd('set promisc all off')
@@ -209,7 +219,8 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
def verifyResult(self, tran_type, flag):
"""
- Verify whether or not the result passes.
+ if flag == true: all packets should enter different queues of port 0
+ else: all packets enter queue 0 of port 0
"""
if tran_type == "ipv4-other":
self.tcpdump_stop_sniff()
@@ -235,30 +246,48 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
self.verify(len(list(set(queue_list))) == 1 and int(list(set(queue_list))[0]) == 0, \
"All packets should enter queue 0, but entered %s" % queue_list)
- def download_the_package(self, flag):
+ def download_the_package(self, ice_pkg="true", safe_mode_support="false"):
"""
- if flag == true: use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
- else: use wrong ice.pkg, all packets enter queue 0 of port 0
+ if ice_pkg == true: use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
+ else: use wrong ice.pkg
+ if safe_mode_support == true, start testpmd with "safe-mode-suppor=1", all packets enter queue 0 of port 0
+ else safe_mode_support == false, start testpmd without "safe-mode-suppor", no port is loaded in testpmd
"""
- self.use_correct_ice_pkg(flag=flag)
- self.start_testpmd(flag=flag)
- self.dut_testpmd.execute_cmd('set fwd mac')
- self.dut_testpmd.execute_cmd('start')
- self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
- self.send_packet(tran_type="ipv4-other", flag=flag)
+ self.use_correct_ice_pkg(ice_pkg)
+ self.start_testpmd(ice_pkg, safe_mode_support)
+ if ice_pkg == "false" and safe_mode_support == "false":
+ out = self.dut_testpmd.execute_cmd('show port info all')
+ self.verify("Infos for port" not in out, "There should be no listed port info.")
+ else:
+ self.dut_testpmd.execute_cmd('set fwd mac')
+ self.dut_testpmd.execute_cmd('start')
+ self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
+ self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
- self.dut_testpmd.execute_cmd('stop')
- self.dut_testpmd.execute_cmd('set fwd rxonly')
- self.dut_testpmd.execute_cmd('start')
- for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
- print tran_types
- self.send_packet(tran_type=tran_types, flag=flag)
+ self.dut_testpmd.execute_cmd('stop')
+ self.dut_testpmd.execute_cmd('set fwd rxonly')
+ self.dut_testpmd.execute_cmd('start')
+ for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
+ print tran_types
+ self.send_packet(tran_type=tran_types, flag=ice_pkg)
def test_download_the_package_successfully(self):
- self.download_the_package(flag="true")
+ """
+ use the correct ice.pkg file; in rxonly mode, all packets should enter different queues of port 0
+ """
+ self.download_the_package(ice_pkg="true", safe_mode_support="false")
- def test_download_the_package_failed(self):
- self.download_the_package(flag="false")
+ def test_driver_enters_Safe_Mode_successfully(self):
+ """
+ use wrong ice.pkg and start testpmd with "safe-mode-suppor=1", all packets enter queue 0 of port 0
+ """
+ self.download_the_package(ice_pkg="false", safe_mode_support="true")
+
+ def test_driver_enters_Safe_Mode_failed(self):
+ """
+ use wrong ice.pkg and start testpmd without "safe-mode-suppor", no port is loaded in testpmd
+ """
+ self.download_the_package(ice_pkg="false", safe_mode_support="false")
def tear_down(self):
self.dut_testpmd.quit()
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases
2019-07-26 8:47 ` Peng, Yuan
@ 2019-07-29 7:59 ` Li, WenjieX A
0 siblings, 0 replies; 6+ messages in thread
From: Li, WenjieX A @ 2019-07-29 7:59 UTC (permalink / raw)
To: dts; +Cc: Li, WenjieX A
Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>
> -----Original Message-----
> From: Peng, Yuan
> Sent: Friday, July 26, 2019 4:48 PM
> To: Li, WenjieX A <wenjiex.a.li@intel.com>; dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: RE: [dts][PATCH V2 1/2]
> test_plans/enable_package_download_in_ice_driver:change cases
>
> Acked-by: Peng, Yuan <yuan.peng@intel.com>
>
> -----Original Message-----
> From: Li, WenjieX A
> Sent: Friday, July 26, 2019 11:55 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V2 1/2]
> test_plans/enable_package_download_in_ice_driver:change cases
>
> change test cases based on dpdk 603beeb970b5d87fa7.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> ...ckage_download_in_ice_driver_test_plan.rst | 33 ++++++++++++++++---
> 1 file changed, 29 insertions(+), 4 deletions(-)
>
> diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> index a6dcfc2..efe2f93 100644
> --- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> +++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> @@ -94,8 +94,8 @@ Test case 1: Download the package successfully
> with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
> the packets can be distributed to different rx queues.
>
> -Test case 2: failed to download pkg
> -===================================
> +Test case 2: Driver enters Safe Mode successfully
> +=================================================
>
> 1. Server power on, then put a new ice.pkg to
> /lib/firmware/intel/ice/ddp/ice.pkg.
> @@ -103,8 +103,9 @@ Test case 2: failed to download pkg
>
> 2. Start testpmd::
>
> - ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
> - --port-topology=chained
> + ./testpmd -c 0x3fe -n 6 \
> + -w PORT0_PCI,safe-mode-support=1 -w PORT1_PCI,safe-mode-support=1 \
> + -- -i --nb-cores=8 --rxq=8 --txq=8 --port-topology=chained
>
> There will be an error reported::
>
> @@ -133,3 +134,27 @@ Test case 2: failed to download pkg 5. Send
> UPD/TCP/SCTP+IPV4/IPV6 packets with packet generator
> with different IPV4/IPV6 address or TCP/UDP/SCTP ports,
> the packets can be only distributed to rx queue 0.
> +
> +Test case 3: Driver enters Safe Mode failed
> +===========================================
> +
> +1. Server power on, then put a new ice.pkg to
> + /lib/firmware/intel/ice/ddp/ice.pkg.
> + Make sure the new ice.pkg is different with the original one.
> +
> +2. Start testpmd::
> +
> + ./testpmd -c 0x3fe -n 6 -- -i --nb-cores=8 --rxq=8 --txq=8 \
> + --port-topology=chained
> +
> + There will be an error reported::
> +
> + ice_dev_init(): Failed to load the DDP package,Use
> + safe-mode-support=1 to enter Safe Mode
> +
> + The driver failed to go to safe mode.
> +
> +3. Check port info in testpmd::
> +
> + testpmd> show port info all
> +
> + There is no listed port info.
> \ No newline at end of file
> --
> 2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases
2019-07-26 8:51 ` Peng, Yuan
@ 2019-07-29 7:59 ` Li, WenjieX A
0 siblings, 0 replies; 6+ messages in thread
From: Li, WenjieX A @ 2019-07-29 7:59 UTC (permalink / raw)
To: dts; +Cc: Li, WenjieX A
Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>
> -----Original Message-----
> From: Peng, Yuan
> Sent: Friday, July 26, 2019 4:51 PM
> To: Li, WenjieX A <wenjiex.a.li@intel.com>; dts@dpdk.org
> Subject: RE: [dts][PATCH V2 2/2]
> tests/enable_package_download_in_ice_driver:change cases
>
> Acked-by: Peng, Yuan <yuan.peng@intel.com>
>
> -----Original Message-----
> From: Li, WenjieX A
> Sent: Friday, July 26, 2019 11:55 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V2 2/2]
> tests/enable_package_download_in_ice_driver:change cases
>
> change test cases based on dpdk 603beeb970b5d87fa7.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> V2: fix "warning: 1 line adds whitespace errors."
>
> ...e_enable_package_download_in_ice_driver.py | 77 +++++++++++++------
> 1 file changed, 53 insertions(+), 24 deletions(-)
>
> diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py
> b/tests/TestSuite_enable_package_download_in_ice_driver.py
> index b5e3e2f..9197198 100644
> --- a/tests/TestSuite_enable_package_download_in_ice_driver.py
> +++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
> @@ -54,6 +54,9 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
> self.tester_p0_mac = self.tester.get_mac(localPort0)
> self.dut_testpmd = PmdOutput(self.dut)
>
> + self.dut_p0_pci = self.dut.get_port_pci(self.dut_ports[0])
> + self.dut_p1_pci = self.dut.get_port_pci(self.dut_ports[1])
> +
> self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
> out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
> self.verify("No such file or directory" not in out, "Cannot find %s, please
> check you system/driver." % self.pkg_file) @@ -84,13 +87,20 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
> self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
> self.dut.send_expect("touch %s" % self.pkg_file, "#")
>
> - def start_testpmd(self, flag="true"):
> - out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --
> txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE))
> - if flag != "true":
> - error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for
> package", \
> - "ice_load_pkg(): failed to allocate buf of size 0 for package", \
> + def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
> + if safe_mode_support == "true":
> + self.eal_param="-w %s,safe-mode-support=1 -w %s,safe-mode-
> support=1" % (self.dut_p0_pci, self.dut_p1_pci)
> + else:
> + self.eal_param=""
> + out = self.dut_testpmd.start_testpmd("all", "--nb-cores=8 --rxq=%s --
> txq=%s --port-topology=chained" % (self.PF_QUEUE, self.PF_QUEUE),
> eal_param=self.eal_param)
> + if ice_pkg == "false":
> + if safe_mode_support == "true":
> + error_messages = ["ice_load_pkg(): failed to allocate
> + buf of size 0 for package", \
> "ice_dev_init(): Failed to load the DDP package,Entering Safe Mode",
> \
> "ice_init_rss(): RSS is not supported in safe mode"]
> + if safe_mode_support == "false":
> + error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for
> package", \
> + "ice_dev_init(): Failed to load the DDP package,Use
> + safe-mode-support=1 to enter Safe Mode"]
> for error_message in error_messages:
> self.verify(error_message in out, "There should be error messages in
> out: %s" % out)
> self.dut_testpmd.execute_cmd('set promisc all off') @@ -209,7 +219,8
> @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
>
> def verifyResult(self, tran_type, flag):
> """
> - Verify whether or not the result passes.
> + if flag == true: all packets should enter different queues of port 0
> + else: all packets enter queue 0 of port 0
> """
> if tran_type == "ipv4-other":
> self.tcpdump_stop_sniff()
> @@ -235,30 +246,48 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
> self.verify(len(list(set(queue_list))) == 1 and int(list(set(queue_list))[0])
> == 0, \
> "All packets should enter queue 0, but entered %s" % queue_list)
>
> - def download_the_package(self, flag):
> + def download_the_package(self, ice_pkg="true",
> safe_mode_support="false"):
> """
> - if flag == true: use the correct ice.pkg file; in rxonly mode, all packets
> should enter different queues of port 0
> - else: use wrong ice.pkg, all packets enter queue 0 of port 0
> + if ice_pkg == true: use the correct ice.pkg file; in rxonly mode, all packets
> should enter different queues of port 0
> + else: use wrong ice.pkg
> + if safe_mode_support == true, start testpmd with "safe-mode-suppor=1",
> all packets enter queue 0 of port 0
> + else safe_mode_support == false, start testpmd without
> + "safe-mode-suppor", no port is loaded in testpmd
> """
> - self.use_correct_ice_pkg(flag=flag)
> - self.start_testpmd(flag=flag)
> - self.dut_testpmd.execute_cmd('set fwd mac')
> - self.dut_testpmd.execute_cmd('start')
> - self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
> - self.send_packet(tran_type="ipv4-other", flag=flag)
> + self.use_correct_ice_pkg(ice_pkg)
> + self.start_testpmd(ice_pkg, safe_mode_support)
> + if ice_pkg == "false" and safe_mode_support == "false":
> + out = self.dut_testpmd.execute_cmd('show port info all')
> + self.verify("Infos for port" not in out, "There should be no listed port
> info.")
> + else:
> + self.dut_testpmd.execute_cmd('set fwd mac')
> + self.dut_testpmd.execute_cmd('start')
> + self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
> + self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
>
> - self.dut_testpmd.execute_cmd('stop')
> - self.dut_testpmd.execute_cmd('set fwd rxonly')
> - self.dut_testpmd.execute_cmd('start')
> - for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp",
> "ipv6-sctp"]:
> - print tran_types
> - self.send_packet(tran_type=tran_types, flag=flag)
> + self.dut_testpmd.execute_cmd('stop')
> + self.dut_testpmd.execute_cmd('set fwd rxonly')
> + self.dut_testpmd.execute_cmd('start')
> + for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-
> udp", "ipv6-sctp"]:
> + print tran_types
> + self.send_packet(tran_type=tran_types, flag=ice_pkg)
>
> def test_download_the_package_successfully(self):
> - self.download_the_package(flag="true")
> + """
> + use the correct ice.pkg file; in rxonly mode, all packets should enter
> different queues of port 0
> + """
> + self.download_the_package(ice_pkg="true",
> + safe_mode_support="false")
>
> - def test_download_the_package_failed(self):
> - self.download_the_package(flag="false")
> + def test_driver_enters_Safe_Mode_successfully(self):
> + """
> + use wrong ice.pkg and start testpmd with "safe-mode-suppor=1", all
> packets enter queue 0 of port 0
> + """
> + self.download_the_package(ice_pkg="false",
> + safe_mode_support="true")
> +
> + def test_driver_enters_Safe_Mode_failed(self):
> + """
> + use wrong ice.pkg and start testpmd without "safe-mode-suppor", no port
> is loaded in testpmd
> + """
> + self.download_the_package(ice_pkg="false",
> + safe_mode_support="false")
>
> def tear_down(self):
> self.dut_testpmd.quit()
> --
> 2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-29 8:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 15:55 [dts] [PATCH V2 1/2] test_plans/enable_package_download_in_ice_driver:change cases Wenjie Li
2019-07-26 8:47 ` Peng, Yuan
2019-07-29 7:59 ` Li, WenjieX A
2019-07-26 15:55 ` [dts] [PATCH V2 2/2] tests/enable_package_download_in_ice_driver:change cases Wenjie Li
2019-07-26 8:51 ` Peng, Yuan
2019-07-29 7:59 ` Li, WenjieX A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).