* [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
@ 2019-07-17 15:21 Wenjie Li
2019-07-17 6:27 ` Li, WenjieX A
2019-08-07 3:49 ` Tu, Lijuan
0 siblings, 2 replies; 4+ messages in thread
From: Wenjie Li @ 2019-07-17 15:21 UTC (permalink / raw)
To: dts; +Cc: Wenjie Li
1. recover dpdk in test case 128_queues, instead of in tear_down.
2. verify test result after recover and rebuild dpdk.
3. change tab to space.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
tests/TestSuite_generic_filter.py | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
index e7f480b..461db95 100644
--- a/tests/TestSuite_generic_filter.py
+++ b/tests/TestSuite_generic_filter.py
@@ -704,9 +704,11 @@ class TestGeneric_filter(TestCase):
def test_128_queues(self):
# testpmd can't support assign queue to received packet, so can't test
+ set_filter_flag = 1
+ packet_flag = 1
if self.kdriver == "ixgbe":
- self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
- self.dut.build_install_dpdk(self.target)
+ self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
+ self.dut.build_install_dpdk(self.target)
global valports
total_mbufs = self.request_mbufs(128) * len(valports)
self.pmdout.start_testpmd(
@@ -730,11 +732,14 @@ class TestGeneric_filter(TestCase):
if i == 2:
out = self.dut.send_expect(
"set stat_qmap rx %s %s %s" % (valports[0], queue[i], (i + 1)), "testpmd> ")
- self.verify('Invalid RX queue %s' %
- (queue[i]) in out, "set filters error")
+ if 'Invalid RX queue %s' % (queue[i]) not in out:
+ set_filter_flag = 0
+ break
out = self.dut.send_expect(
"5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port %s src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue %s " % (valports[0], (i + 1), queue[i]), "testpmd> ")
- self.verify('error' in out, "set filters error")
+ if 'error' not in out:
+ set_filter_flag = 0
+ break
continue
else:
self.dut.send_expect("set stat_qmap rx %s %s %s" %
@@ -753,10 +758,14 @@ class TestGeneric_filter(TestCase):
scanner = re.compile(result_scanner, re.DOTALL)
m = scanner.search(out)
cur_pkt = m.group(1)
- self.verify(
- int(cur_pkt) == frames_to_send, "packet pass assert error")
-
+ if int(cur_pkt) != frames_to_send:
+ packet_flag = 0
+ break
self.dut.send_expect("quit", "#")
+ self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
+ self.dut.build_install_dpdk(self.target)
+ self.verify(set_filter_flag == 1, "set filters error")
+ self.verify(packet_flag == 1, "packet pass assert error")
else:
self.verify(False, "%s not support this test" % self.nic)
@@ -840,5 +849,6 @@ class TestGeneric_filter(TestCase):
Run after each test case.
"""
self.dut.kill_all()
- self.dut.send_expect("sed -i -e 's/#define IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
- self.dut.build_install_dpdk(self.target)
+
+ def tear_down_all(self):
+ pass
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
2019-07-17 15:21 [dts] [PATCH V1] tests/generic_filter: optimize 128_queues Wenjie Li
@ 2019-07-17 6:27 ` Li, WenjieX A
2019-07-17 6:28 ` Wu, ChangqingX
2019-08-07 3:49 ` Tu, Lijuan
1 sibling, 1 reply; 4+ messages in thread
From: Li, WenjieX A @ 2019-07-17 6:27 UTC (permalink / raw)
To: dts; +Cc: Li, WenjieX A
Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>
> -----Original Message-----
> From: Li, WenjieX A
> Sent: Wednesday, July 17, 2019 11:21 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V1] tests/generic_filter: optimize 128_queues
>
> 1. recover dpdk in test case 128_queues, instead of in tear_down.
> 2. verify test result after recover and rebuild dpdk.
> 3. change tab to space.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> tests/TestSuite_generic_filter.py | 30 ++++++++++++++++++++----------
> 1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
> index e7f480b..461db95 100644
> --- a/tests/TestSuite_generic_filter.py
> +++ b/tests/TestSuite_generic_filter.py
> @@ -704,9 +704,11 @@ class TestGeneric_filter(TestCase):
>
> def test_128_queues(self):
> # testpmd can't support assign queue to received packet, so can't test
> + set_filter_flag = 1
> + packet_flag = 1
> if self.kdriver == "ixgbe":
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> - self.dut.build_install_dpdk(self.target)
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> + self.dut.build_install_dpdk(self.target)
> global valports
> total_mbufs = self.request_mbufs(128) * len(valports)
> self.pmdout.start_testpmd(
> @@ -730,11 +732,14 @@ class TestGeneric_filter(TestCase):
> if i == 2:
> out = self.dut.send_expect(
> "set stat_qmap rx %s %s %s" % (valports[0], queue[i], (i + 1)),
> "testpmd> ")
> - self.verify('Invalid RX queue %s' %
> - (queue[i]) in out, "set filters error")
> + if 'Invalid RX queue %s' % (queue[i]) not in out:
> + set_filter_flag = 0
> + break
> out = self.dut.send_expect(
> "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port %s
> src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue %s " %
> (valports[0], (i + 1), queue[i]), "testpmd> ")
> - self.verify('error' in out, "set filters error")
> + if 'error' not in out:
> + set_filter_flag = 0
> + break
> continue
> else:
> self.dut.send_expect("set stat_qmap rx %s %s %s" % @@ -753,10
> +758,14 @@ class TestGeneric_filter(TestCase):
> scanner = re.compile(result_scanner, re.DOTALL)
> m = scanner.search(out)
> cur_pkt = m.group(1)
> - self.verify(
> - int(cur_pkt) == frames_to_send, "packet pass assert error")
> -
> + if int(cur_pkt) != frames_to_send:
> + packet_flag = 0
> + break
> self.dut.send_expect("quit", "#")
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> + self.dut.build_install_dpdk(self.target)
> + self.verify(set_filter_flag == 1, "set filters error")
> + self.verify(packet_flag == 1, "packet pass assert error")
> else:
> self.verify(False, "%s not support this test" % self.nic)
>
> @@ -840,5 +849,6 @@ class TestGeneric_filter(TestCase):
> Run after each test case.
> """
> self.dut.kill_all()
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> - self.dut.build_install_dpdk(self.target)
> +
> + def tear_down_all(self):
> + pass
> --
> 2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
2019-07-17 6:27 ` Li, WenjieX A
@ 2019-07-17 6:28 ` Wu, ChangqingX
0 siblings, 0 replies; 4+ messages in thread
From: Wu, ChangqingX @ 2019-07-17 6:28 UTC (permalink / raw)
To: Li, WenjieX A, dts; +Cc: Li, WenjieX A
Tested-by: Wu, ChangqingX <changqingx.wu@intel.com>
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Li, WenjieX A
Sent: Wednesday, July 17, 2019 2:27 PM
To: dts@dpdk.org
Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: Re: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>
> -----Original Message-----
> From: Li, WenjieX A
> Sent: Wednesday, July 17, 2019 11:21 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V1] tests/generic_filter: optimize 128_queues
>
> 1. recover dpdk in test case 128_queues, instead of in tear_down.
> 2. verify test result after recover and rebuild dpdk.
> 3. change tab to space.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> tests/TestSuite_generic_filter.py | 30 ++++++++++++++++++++----------
> 1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/tests/TestSuite_generic_filter.py
> b/tests/TestSuite_generic_filter.py
> index e7f480b..461db95 100644
> --- a/tests/TestSuite_generic_filter.py
> +++ b/tests/TestSuite_generic_filter.py
> @@ -704,9 +704,11 @@ class TestGeneric_filter(TestCase):
>
> def test_128_queues(self):
> # testpmd can't support assign queue to received packet, so
> can't test
> + set_filter_flag = 1
> + packet_flag = 1
> if self.kdriver == "ixgbe":
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES
> 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> - self.dut.build_install_dpdk(self.target)
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES
> 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> + self.dut.build_install_dpdk(self.target)
> global valports
> total_mbufs = self.request_mbufs(128) * len(valports)
> self.pmdout.start_testpmd( @@ -730,11 +732,14 @@ class
> TestGeneric_filter(TestCase):
> if i == 2:
> out = self.dut.send_expect(
> "set stat_qmap rx %s %s %s" % (valports[0],
> queue[i], (i + 1)), "testpmd> ")
> - self.verify('Invalid RX queue %s' %
> - (queue[i]) in out, "set filters error")
> + if 'Invalid RX queue %s' % (queue[i]) not in out:
> + set_filter_flag = 0
> + break
> out = self.dut.send_expect(
> "5tuple_filter %s add dst_ip 2.2.2.5 src_ip
> 2.2.2.4 dst_port %s src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0
> priority 3 queue %s " % (valports[0], (i + 1), queue[i]), "testpmd> ")
> - self.verify('error' in out, "set filters error")
> + if 'error' not in out:
> + set_filter_flag = 0
> + break
> continue
> else:
> self.dut.send_expect("set stat_qmap rx %s %s %s"
> % @@ -753,10
> +758,14 @@ class TestGeneric_filter(TestCase):
> scanner = re.compile(result_scanner, re.DOTALL)
> m = scanner.search(out)
> cur_pkt = m.group(1)
> - self.verify(
> - int(cur_pkt) == frames_to_send, "packet pass assert error")
> -
> + if int(cur_pkt) != frames_to_send:
> + packet_flag = 0
> + break
> self.dut.send_expect("quit", "#")
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128$/#define IXGBE_NONE_MODE_TX_NB_QUEUES
> 64/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> + self.dut.build_install_dpdk(self.target)
> + self.verify(set_filter_flag == 1, "set filters error")
> + self.verify(packet_flag == 1, "packet pass assert error")
> else:
> self.verify(False, "%s not support this test" % self.nic)
>
> @@ -840,5 +849,6 @@ class TestGeneric_filter(TestCase):
> Run after each test case.
> """
> self.dut.kill_all()
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define IXGBE_NONE_MODE_TX_NB_QUEUES
> 128/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> - self.dut.build_install_dpdk(self.target)
> +
> + def tear_down_all(self):
> + pass
> --
> 2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
2019-07-17 15:21 [dts] [PATCH V1] tests/generic_filter: optimize 128_queues Wenjie Li
2019-07-17 6:27 ` Li, WenjieX A
@ 2019-08-07 3:49 ` Tu, Lijuan
1 sibling, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2019-08-07 3:49 UTC (permalink / raw)
To: Li, WenjieX A, dts; +Cc: Li, WenjieX A
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Wednesday, July 17, 2019 11:21 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1] tests/generic_filter: optimize 128_queues
>
> 1. recover dpdk in test case 128_queues, instead of in tear_down.
> 2. verify test result after recover and rebuild dpdk.
> 3. change tab to space.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> tests/TestSuite_generic_filter.py | 30 ++++++++++++++++++++----------
> 1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/tests/TestSuite_generic_filter.py
> b/tests/TestSuite_generic_filter.py
> index e7f480b..461db95 100644
> --- a/tests/TestSuite_generic_filter.py
> +++ b/tests/TestSuite_generic_filter.py
> @@ -704,9 +704,11 @@ class TestGeneric_filter(TestCase):
>
> def test_128_queues(self):
> # testpmd can't support assign queue to received packet, so can't test
> + set_filter_flag = 1
> + packet_flag = 1
> if self.kdriver == "ixgbe":
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/'
> drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
> - self.dut.build_install_dpdk(self.target)
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/'
> drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
> + self.dut.build_install_dpdk(self.target)
> global valports
> total_mbufs = self.request_mbufs(128) * len(valports)
> self.pmdout.start_testpmd(
> @@ -730,11 +732,14 @@ class TestGeneric_filter(TestCase):
> if i == 2:
> out = self.dut.send_expect(
> "set stat_qmap rx %s %s %s" % (valports[0], queue[i], (i + 1)),
> "testpmd> ")
> - self.verify('Invalid RX queue %s' %
> - (queue[i]) in out, "set filters error")
> + if 'Invalid RX queue %s' % (queue[i]) not in out:
> + set_filter_flag = 0
> + break
> out = self.dut.send_expect(
> "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port %s
> src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue %s " %
> (valports[0], (i + 1), queue[i]), "testpmd> ")
> - self.verify('error' in out, "set filters error")
> + if 'error' not in out:
> + set_filter_flag = 0
> + break
> continue
> else:
> self.dut.send_expect("set stat_qmap rx %s %s %s" % @@ -
> 753,10 +758,14 @@ class TestGeneric_filter(TestCase):
> scanner = re.compile(result_scanner, re.DOTALL)
> m = scanner.search(out)
> cur_pkt = m.group(1)
> - self.verify(
> - int(cur_pkt) == frames_to_send, "packet pass assert error")
> -
> + if int(cur_pkt) != frames_to_send:
> + packet_flag = 0
> + break
> self.dut.send_expect("quit", "#")
> + self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64/' drivers/net/ixgbe/ixgbe_ethdev.h",
> "# ",30)
> + self.dut.build_install_dpdk(self.target)
> + self.verify(set_filter_flag == 1, "set filters error")
> + self.verify(packet_flag == 1, "packet pass assert error")
> else:
> self.verify(False, "%s not support this test" % self.nic)
>
> @@ -840,5 +849,6 @@ class TestGeneric_filter(TestCase):
> Run after each test case.
> """
> self.dut.kill_all()
> - self.dut.send_expect("sed -i -e 's/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 64$/#define
> IXGBE_NONE_MODE_TX_NB_QUEUES 128/'
> drivers/net/ixgbe/ixgbe_ethdev.h", "# ",30)
> - self.dut.build_install_dpdk(self.target)
> +
> + def tear_down_all(self):
> + pass
> --
> 2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-07 3:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 15:21 [dts] [PATCH V1] tests/generic_filter: optimize 128_queues Wenjie Li
2019-07-17 6:27 ` Li, WenjieX A
2019-07-17 6:28 ` Wu, ChangqingX
2019-08-07 3:49 ` Tu, Lijuan
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).