* Re: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time
2019-11-26 17:18 [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time Wenjie Li
@ 2019-11-26 8:34 ` Li, WenjieX A
2019-11-27 8:53 ` Ma, LihongX
1 sibling, 0 replies; 3+ messages in thread
From: Li, WenjieX A @ 2019-11-26 8:34 UTC (permalink / raw)
To: dts; +Cc: Li, WenjieX A
[-- Attachment #1: Type: text/plain, Size: 1880 bytes --]
Tested-by: Li, WenjieX A <wenjiex.a.li@intel.com>
> -----Original Message-----
> From: Li, WenjieX A
> Sent: Wednesday, November 27, 2019 1:19 AM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts][PATCH V1] tests/interrupt_pmd: reduce the execution time
>
> It is unnecessary to start/close scapy when sending every packet.
> The execution time could be reduced to 1 minute from 9.
>
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
> tests/TestSuite_interrupt_pmd.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_interrupt_pmd.py
> b/tests/TestSuite_interrupt_pmd.py
> index a0467bd..4e99cf4 100644
> --- a/tests/TestSuite_interrupt_pmd.py
> +++ b/tests/TestSuite_interrupt_pmd.py
> @@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase):
> """
> Send a packet to port
> """
> + self.tester.send_expect("scapy", ">>>", 30)
> for i in range(len(self.dut_ports[:portnum])):
> for j in range(num):
> txport = self.tester.get_local_port(self.dut_ports[i])
> mac = self.dut.get_mac_address(self.dut_ports[i])
> txItf = self.tester.get_interface(txport)
> - self.tester.scapy_append(
> - 'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)],
> iface="%s")' % (j, txItf))
> - self.tester.scapy_execute()
> +
> self.tester.send_expect('sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*1
> 8)], iface="%s")' % (j, txItf), ">>>")
> + self.tester.send_expect("quit()", "#", 30)
>
> def tear_down(self):
> """
> Run after each test case.
> """
> + self.dut.kill_all()
> pass
>
> def tear_down_all(self):
> --
> 2.17.1
[-- Attachment #2: TestInterruptPmd.log --]
[-- Type: application/octet-stream, Size: 60586 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time
@ 2019-11-26 17:18 Wenjie Li
2019-11-26 8:34 ` Li, WenjieX A
2019-11-27 8:53 ` Ma, LihongX
0 siblings, 2 replies; 3+ messages in thread
From: Wenjie Li @ 2019-11-26 17:18 UTC (permalink / raw)
To: dts; +Cc: Wenjie Li
It is unnecessary to start/close scapy when sending every packet.
The execution time could be reduced to 1 minute from 9.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
tests/TestSuite_interrupt_pmd.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py
index a0467bd..4e99cf4 100644
--- a/tests/TestSuite_interrupt_pmd.py
+++ b/tests/TestSuite_interrupt_pmd.py
@@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase):
"""
Send a packet to port
"""
+ self.tester.send_expect("scapy", ">>>", 30)
for i in range(len(self.dut_ports[:portnum])):
for j in range(num):
txport = self.tester.get_local_port(self.dut_ports[i])
mac = self.dut.get_mac_address(self.dut_ports[i])
txItf = self.tester.get_interface(txport)
- self.tester.scapy_append(
- 'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf))
- self.tester.scapy_execute()
+ self.tester.send_expect('sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf), ">>>")
+ self.tester.send_expect("quit()", "#", 30)
def tear_down(self):
"""
Run after each test case.
"""
+ self.dut.kill_all()
pass
def tear_down_all(self):
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time
2019-11-26 17:18 [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time Wenjie Li
2019-11-26 8:34 ` Li, WenjieX A
@ 2019-11-27 8:53 ` Ma, LihongX
1 sibling, 0 replies; 3+ messages in thread
From: Ma, LihongX @ 2019-11-27 8:53 UTC (permalink / raw)
To: Li, WenjieX A, dts; +Cc: Li, WenjieX A
Hi, Wenjie
It is better use the Packet function instead of execute scapy in suite.
Like:
Pkt = Packet()
Str='Ether()/IP(dst="198.0.0.1")/UDP()/Raw(\'X\'*18)'
Pkt.append_pkt(str)
Pkt. send_pkt(crb=self.tester, tx_port=txItf)
By the way, the value " txport", " mac", " txItf" can move to outer loopback from inner loopback, because the value does not change after outer loopback.
-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
Sent: Wednesday, November 27, 2019 1:19 AM
To: dts@dpdk.org
Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time
It is unnecessary to start/close scapy when sending every packet.
The execution time could be reduced to 1 minute from 9.
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
tests/TestSuite_interrupt_pmd.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_interrupt_pmd.py b/tests/TestSuite_interrupt_pmd.py
index a0467bd..4e99cf4 100644
--- a/tests/TestSuite_interrupt_pmd.py
+++ b/tests/TestSuite_interrupt_pmd.py
@@ -106,19 +106,20 @@ class TestInterruptPmd(TestCase):
"""
Send a packet to port
"""
+ self.tester.send_expect("scapy", ">>>", 30)
for i in range(len(self.dut_ports[:portnum])):
for j in range(num):
txport = self.tester.get_local_port(self.dut_ports[i])
mac = self.dut.get_mac_address(self.dut_ports[i])
txItf = self.tester.get_interface(txport)
- self.tester.scapy_append(
- 'sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf))
- self.tester.scapy_execute()
+ self.tester.send_expect('sendp([Ether()/IP(dst="198.0.0.%d")/UDP()/Raw(\'X\'*18)], iface="%s")' % (j, txItf), ">>>")
+ self.tester.send_expect("quit()", "#", 30)
def tear_down(self):
"""
Run after each test case.
"""
+ self.dut.kill_all()
pass
def tear_down_all(self):
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-27 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 17:18 [dts] [PATCH V1] tests/interrupt_pmd: reduce the execution time Wenjie Li
2019-11-26 8:34 ` Li, WenjieX A
2019-11-27 8:53 ` Ma, LihongX
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).