* [dts][PATCH V2] tests/vf_offload: fix syntax errors
@ 2023-01-10 9:30 Weiyuan Li
2023-01-10 9:51 ` Xu, Ke1
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Weiyuan Li @ 2023-01-10 9:30 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li
Scapy send package count can't have quotation marks. Otherwise, send the packet fails.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
v2:
-Modify the traversal comparison and expectation of the captured packet results.
tests/TestSuite_vf_offload.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index a212133c..5def34c1 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -752,7 +752,7 @@ class TestVfOffload(TestCase):
rx_stats == tx_stats
and all(
[
- int(payload_size_list[0]) == loading_size
+ int(payload_size_list[j]) == loading_size
for j in range(packet_count)
]
),
@@ -887,7 +887,7 @@ class TestVfOffload(TestCase):
)
mac = self.vm0_testpmd.get_port_mac(0)
- self.vm0_testpmd.execute_cmd("set verbose 1", "testpmd> ", 120)
+ self.vm0_testpmd.execute_cmd("set verbose 0", "testpmd> ", 120)
self.vm0_testpmd.execute_cmd("set fwd csum", "testpmd>", 120)
self.vm0_testpmd.execute_cmd("set promisc 0 on", "testpmd> ", 120)
self.vm0_testpmd.execute_cmd("set promisc 1 on", "testpmd> ", 120)
@@ -934,7 +934,7 @@ class TestVfOffload(TestCase):
(
'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/'
+ pkts_outer[key_outer]
- + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count = %s)'
+ + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)'
)
% (mac, loading_size, tx_interface, packet_count)
)
@@ -952,7 +952,7 @@ class TestVfOffload(TestCase):
rx_stats == tx_stats
and all(
[
- payload_size_list == loading_size
+ int(payload_size_list[j]) == loading_size
for j in range(packet_count)
]
),
@@ -994,11 +994,12 @@ class TestVfOffload(TestCase):
self.tester.scapy_append(
"from scapy.contrib.gtp import GTP_U_Header"
)
+ self.logger.info([mac, loading_size, tx_interface, packet_count])
self.tester.scapy_append(
(
'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/'
+ pkts_outer[key_outer]
- + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
+ + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s", count=%s)'
)
% (mac, loading_size, tx_interface, packet_count)
)
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [dts][PATCH V2] tests/vf_offload: fix syntax errors
2023-01-10 9:30 [dts][PATCH V2] tests/vf_offload: fix syntax errors Weiyuan Li
@ 2023-01-10 9:51 ` Xu, Ke1
2023-01-11 2:00 ` Jiale, SongX
2023-01-11 5:27 ` lijuan.tu
2 siblings, 0 replies; 4+ messages in thread
From: Xu, Ke1 @ 2023-01-10 9:51 UTC (permalink / raw)
To: Li, WeiyuanX, dts; +Cc: Li, WeiyuanX
> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Tuesday, January 10, 2023 5:30 PM
> To: dts@dpdk.org
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V2] tests/vf_offload: fix syntax errors
>
> Scapy send package count can't have quotation marks. Otherwise, send the
> packet fails.
>
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
This patch is to fix some potential bugs.
Line 752: Fix wrong packet checking that only checked packet No.0.
Line 887: Fix long verbose that may crash the buffer causing timeout.
Line 934: Remove white space that format check does not check for the string-ed
command line format where we prefer not adding extra white space for kwargs.
Line 952: The payload_size_list is not index-ed, may cause bugs. Adding extra int()
may help prevent wrong type input though the new method ensures an int return.
Line 994: Add log. Add missed packet count.
Acked-by: Ke Xu <ke1.xu@intel.com>
>
> v2:
> -Modify the traversal comparison and expectation of the captured packet
> results.
>
> tests/TestSuite_vf_offload.py | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [dts][PATCH V2] tests/vf_offload: fix syntax errors
2023-01-10 9:30 [dts][PATCH V2] tests/vf_offload: fix syntax errors Weiyuan Li
2023-01-10 9:51 ` Xu, Ke1
@ 2023-01-11 2:00 ` Jiale, SongX
2023-01-11 5:27 ` lijuan.tu
2 siblings, 0 replies; 4+ messages in thread
From: Jiale, SongX @ 2023-01-11 2:00 UTC (permalink / raw)
To: Li, WeiyuanX, dts; +Cc: Li, WeiyuanX
> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Tuesday, January 10, 2023 5:30 PM
> To: dts@dpdk.org
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V2] tests/vf_offload: fix syntax errors
>
> Scapy send package count can't have quotation marks. Otherwise, send the
> packet fails.
>
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
Tested-by: Song Jiale <songx.jiale@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V2] tests/vf_offload: fix syntax errors
2023-01-10 9:30 [dts][PATCH V2] tests/vf_offload: fix syntax errors Weiyuan Li
2023-01-10 9:51 ` Xu, Ke1
2023-01-11 2:00 ` Jiale, SongX
@ 2023-01-11 5:27 ` lijuan.tu
2 siblings, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2023-01-11 5:27 UTC (permalink / raw)
To: dts, Weiyuan Li; +Cc: Weiyuan Li
On Tue, 10 Jan 2023 17:30:13 +0800, Weiyuan Li <weiyuanx.li@intel.com> wrote:
> Scapy send package count can't have quotation marks. Otherwise, send the packet fails.
>
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-11 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 9:30 [dts][PATCH V2] tests/vf_offload: fix syntax errors Weiyuan Li
2023-01-10 9:51 ` Xu, Ke1
2023-01-11 2:00 ` Jiale, SongX
2023-01-11 5:27 ` lijuan.tu
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).