* [dts] [PATCH] checksum_offload: Support this test in vector mode
@ 2019-06-26 10:13 pvukkisala
2019-07-03 9:41 ` Tu, Lijuan
0 siblings, 1 reply; 5+ messages in thread
From: pvukkisala @ 2019-06-26 10:13 UTC (permalink / raw)
To: dts; +Cc: avijay, fmasood, Phanendra Vukkisala
From: Phanendra Vukkisala <pvukkisala@marvell.com>
Send and sniff 4 packets to support vector mode cavium HW stops calculating
check sums upon receiving first incorrect checksum. So accept unknown also as bad
Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
---
tests/TestSuite_checksum_offload.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index db0663e..7176cb9 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -129,7 +129,7 @@ class TestChecksumOffload(TestCase):
self.tester.scapy_foreground()
for packet_type in packets_sent.keys():
- self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
+ self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface))
self.tester.scapy_execute()
out = self.dut.get_session_output(timeout=1)
lines = out.split("\r\n")
@@ -146,7 +146,10 @@ class TestChecksumOffload(TestCase):
if (flag == 1):
self.verify("PKT_RX_L4_CKSUM_GOOD" in line, "Packet Rx L4 checksum valid-flags error!")
elif (flag == 0):
- self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!")
+ if self.nic == "cavium_a063":
+ self.verify("PKT_RX_L4_CKSUM_BAD" in line or "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags error!")
+ else:
+ self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!")
else:
if "PKT_RX_L4_CKSUM" not in line:
self.verify(0, "There is no L4 checksum flags appeared!")
@@ -185,11 +188,11 @@ class TestChecksumOffload(TestCase):
self.tester.send_expect("exit()", "#")
- inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent),
+ inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent)*4,
filters=[{'layer': 'ether', 'config': {'src': sniff_src}}])
for packet_type in packets_sent.keys():
- self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
+ self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface))
self.tester.scapy_execute()
p = self.tester.load_tcpdump_sniff_packets(inst)
@@ -197,7 +200,7 @@ class TestChecksumOffload(TestCase):
reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]
out = string.join(reslist, ",")
packets_received = out.split(',')
- self.verify(len(packets_sent) == len(packets_received), "Unexpected Packets Drop")
+ self.verify(len(packets_sent)*4 == len(packets_received), "Unexpected Packets Drop")
for packet_received in packets_received:
ip_checksum, tcp_checksum, udp_checksum, sctp_checksum = packet_received.split(';')
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH] checksum_offload: Support this test in vector mode
2019-06-26 10:13 [dts] [PATCH] checksum_offload: Support this test in vector mode pvukkisala
@ 2019-07-03 9:41 ` Tu, Lijuan
0 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2019-07-03 9:41 UTC (permalink / raw)
To: pvukkisala, dts; +Cc: avijay, fmasood
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> pvukkisala@marvell.com
> Sent: Wednesday, June 26, 2019 6:14 PM
> To: dts@dpdk.org
> Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] checksum_offload: Support this test in vector mode
>
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
>
> Send and sniff 4 packets to support vector mode cavium HW stops
> calculating check sums upon receiving first incorrect checksum. So accept
> unknown also as bad
>
> Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
> ---
> tests/TestSuite_checksum_offload.py | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> index db0663e..7176cb9 100644
> --- a/tests/TestSuite_checksum_offload.py
> +++ b/tests/TestSuite_checksum_offload.py
> @@ -129,7 +129,7 @@ class TestChecksumOffload(TestCase):
> self.tester.scapy_foreground()
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
> self.tester.scapy_execute()
> out = self.dut.get_session_output(timeout=1)
> lines = out.split("\r\n")
> @@ -146,7 +146,10 @@ class TestChecksumOffload(TestCase):
> if (flag == 1):
> self.verify("PKT_RX_L4_CKSUM_GOOD" in line, "Packet Rx
> L4 checksum valid-flags error!")
> elif (flag == 0):
> - self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx
> L4 checksum valid-flags error!")
> + if self.nic == "cavium_a063":
> + self.verify("PKT_RX_L4_CKSUM_BAD" in line or
> "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags
> error!")
> + else:
> + self.verify("PKT_RX_L4_CKSUM_BAD"
> + in line, "Packet Rx L4 checksum valid-flags error!")
> else:
> if "PKT_RX_L4_CKSUM" not in line:
> self.verify(0, "There is no L4 checksum flags appeared!")
> @@ -185,11 +188,11 @@ class TestChecksumOffload(TestCase):
>
> self.tester.send_expect("exit()", "#")
>
> - inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> count=len(packets_sent),
> + inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> + count=len(packets_sent)*4,
> filters=[{'layer': 'ether', 'config': {'src': sniff_src}}])
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
>
> self.tester.scapy_execute()
> p = self.tester.load_tcpdump_sniff_packets(inst)
> @@ -197,7 +200,7 @@ class TestChecksumOffload(TestCase):
> reslist =
> [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.
> chksum%") for i in range(nr_packets)]
> out = string.join(reslist, ",")
> packets_received = out.split(',')
> - self.verify(len(packets_sent) == len(packets_received), "Unexpected
> Packets Drop")
> + self.verify(len(packets_sent)*4 == len(packets_received),
> + "Unexpected Packets Drop")
>
> for packet_received in packets_received:
> ip_checksum, tcp_checksum, udp_checksum, sctp_checksum =
> packet_received.split(';')
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH] checksum_offload: Support this test in vector mode
2019-06-26 7:01 ` Tu, Lijuan
@ 2019-06-26 10:14 ` Phanendra Vukkisala
0 siblings, 0 replies; 5+ messages in thread
From: Phanendra Vukkisala @ 2019-06-26 10:14 UTC (permalink / raw)
To: Tu, Lijuan, dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood
Hi Lijuan,
Submitted patch.
Regards,
Phanendra
-----Original Message-----
From: Tu, Lijuan <lijuan.tu@intel.com>
Sent: Wednesday, June 26, 2019 12:31 PM
To: Phanendra Vukkisala <pvukkisala@marvell.com>; dts@dpdk.org
Cc: Vijaya Bhaskar Annayyolla <avijay@marvell.com>; Faisal Masood <fmasood@marvell.com>
Subject: RE: [dts] [PATCH] checksum_offload: Support this test in vector mode
Hi Phanendra,
Could you please rework the patch, applied failed , maybe because the code baseline changed.
Applying: checksum_offload: Support this test in vector mode
error: patch failed: tests/TestSuite_checksum_offload.py:174
error: tests/TestSuite_checksum_offload.py: patch does not apply Patch failed at 0001 checksum_offload: Support this test in vector mode
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> pvukkisala@marvell.com
> Sent: Friday, June 14, 2019 7:13 PM
> To: dts@dpdk.org
> Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] checksum_offload: Support this test in vector
> mode
>
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
>
> Send and sniff 4 packets to support vector mode cavium HW stops
> calculating check sums upon receiving first incorrect checksum. So
> accept unknown also as bad
>
> Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
> ---
> tests/TestSuite_checksum_offload.py | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> index 6541ba5..d4021b9 100644
> --- a/tests/TestSuite_checksum_offload.py
> +++ b/tests/TestSuite_checksum_offload.py
> @@ -118,7 +118,7 @@ class TestChecksumOffload(TestCase):
> self.tester.scapy_foreground()
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
> self.tester.scapy_execute()
> out = self.dut.get_session_output(timeout=1)
> lines = out.split("\r\n") @@ -146,7 +146,10 @@ class
> TestChecksumOffload(TestCase):
> self.verify("PKT_RX_L4_CKSUM_GOOD" in
> line, "Packet Rx
> L4 checksum valid-flags error!")
> self.verify("PKT_RX_IP_CKSUM_GOOD" in
> line, "Packet Rx IP checksum valid-flags error!")
> elif (flag == 0):
> - self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx
> L4 checksum valid-flags error!")
> + if self.nic == "cavium_a063":
> + self.verify("PKT_RX_L4_CKSUM_BAD"
> + in line or
> "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags
> error!")
> + else:
> + self.verify("PKT_RX_L4_CKSUM_BAD"
> + in line, "Packet Rx L4 checksum valid-flags error!")
> self.verify("PKT_RX_IP_CKSUM_BAD" in
> line, "Packet Rx IP checksum valid-flags error!")
>
> self.dut.send_expect("stop", "testpmd>") @@ -174,11 +177,11
> @@ class TestChecksumOffload(TestCase):
>
> self.tester.send_expect("exit()", "#")
>
> - inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> count=len(packets_sent),
> + inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> + count=len(packets_sent)*4,
> filters=[{'layer':'ether', 'config':{'src':
> sniff_src}}])
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
>
> self.tester.scapy_execute()
> p = self.tester.load_tcpdump_sniff_packets(inst)
> @@ -186,7 +189,7 @@ class TestChecksumOffload(TestCase):
> reslist =
> [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.
> chksum%") for i in range(nr_packets)]
> out = string.join(reslist, ",")
> packets_received = out.split(',')
> - self.verify(len(packets_sent) == len(packets_received), "Unexpected
> Packets Drop")
> + self.verify(len(packets_sent)*4 == len(packets_received),
> + "Unexpected Packets Drop")
>
> for packet_received in packets_received:
> ip_checksum, tcp_checksum, udp_checksum, sctp_checksum =
> packet_received.split(';')
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH] checksum_offload: Support this test in vector mode
2019-06-14 11:12 pvukkisala
@ 2019-06-26 7:01 ` Tu, Lijuan
2019-06-26 10:14 ` Phanendra Vukkisala
0 siblings, 1 reply; 5+ messages in thread
From: Tu, Lijuan @ 2019-06-26 7:01 UTC (permalink / raw)
To: pvukkisala, dts; +Cc: avijay, fmasood
Hi Phanendra,
Could you please rework the patch, applied failed , maybe because the code baseline changed.
Applying: checksum_offload: Support this test in vector mode
error: patch failed: tests/TestSuite_checksum_offload.py:174
error: tests/TestSuite_checksum_offload.py: patch does not apply
Patch failed at 0001 checksum_offload: Support this test in vector mode
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> pvukkisala@marvell.com
> Sent: Friday, June 14, 2019 7:13 PM
> To: dts@dpdk.org
> Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] checksum_offload: Support this test in vector mode
>
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
>
> Send and sniff 4 packets to support vector mode cavium HW stops
> calculating check sums upon receiving first incorrect checksum. So accept
> unknown also as bad
>
> Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
> ---
> tests/TestSuite_checksum_offload.py | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> index 6541ba5..d4021b9 100644
> --- a/tests/TestSuite_checksum_offload.py
> +++ b/tests/TestSuite_checksum_offload.py
> @@ -118,7 +118,7 @@ class TestChecksumOffload(TestCase):
> self.tester.scapy_foreground()
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
> self.tester.scapy_execute()
> out = self.dut.get_session_output(timeout=1)
> lines = out.split("\r\n")
> @@ -146,7 +146,10 @@ class TestChecksumOffload(TestCase):
> self.verify("PKT_RX_L4_CKSUM_GOOD" in line, "Packet Rx
> L4 checksum valid-flags error!")
> self.verify("PKT_RX_IP_CKSUM_GOOD" in line, "Packet Rx
> IP checksum valid-flags error!")
> elif (flag == 0):
> - self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx
> L4 checksum valid-flags error!")
> + if self.nic == "cavium_a063":
> + self.verify("PKT_RX_L4_CKSUM_BAD" in line or
> "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags
> error!")
> + else:
> + self.verify("PKT_RX_L4_CKSUM_BAD"
> + in line, "Packet Rx L4 checksum valid-flags error!")
> self.verify("PKT_RX_IP_CKSUM_BAD" in line, "Packet Rx IP
> checksum valid-flags error!")
>
> self.dut.send_expect("stop", "testpmd>") @@ -174,11 +177,11 @@
> class TestChecksumOffload(TestCase):
>
> self.tester.send_expect("exit()", "#")
>
> - inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> count=len(packets_sent),
> + inst = self.tester.tcpdump_sniff_packets(intf=rx_interface,
> + count=len(packets_sent)*4,
> filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
>
> for packet_type in packets_sent.keys():
> - self.tester.scapy_append('sendp([%s], iface="%s")' %
> (packets_sent[packet_type], tx_interface))
> + self.tester.scapy_append('sendp([%s], iface="%s", count=4)'
> + % (packets_sent[packet_type], tx_interface))
>
> self.tester.scapy_execute()
> p = self.tester.load_tcpdump_sniff_packets(inst)
> @@ -186,7 +189,7 @@ class TestChecksumOffload(TestCase):
> reslist =
> [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.
> chksum%") for i in range(nr_packets)]
> out = string.join(reslist, ",")
> packets_received = out.split(',')
> - self.verify(len(packets_sent) == len(packets_received), "Unexpected
> Packets Drop")
> + self.verify(len(packets_sent)*4 == len(packets_received),
> + "Unexpected Packets Drop")
>
> for packet_received in packets_received:
> ip_checksum, tcp_checksum, udp_checksum, sctp_checksum =
> packet_received.split(';')
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH] checksum_offload: Support this test in vector mode
@ 2019-06-14 11:12 pvukkisala
2019-06-26 7:01 ` Tu, Lijuan
0 siblings, 1 reply; 5+ messages in thread
From: pvukkisala @ 2019-06-14 11:12 UTC (permalink / raw)
To: dts; +Cc: avijay, fmasood, Phanendra Vukkisala
From: Phanendra Vukkisala <pvukkisala@marvell.com>
Send and sniff 4 packets to support vector mode
cavium HW stops calculating check sums upon receiving first incorrect checksum. So accept unknown also as bad
Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
---
tests/TestSuite_checksum_offload.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 6541ba5..d4021b9 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -118,7 +118,7 @@ class TestChecksumOffload(TestCase):
self.tester.scapy_foreground()
for packet_type in packets_sent.keys():
- self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
+ self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface))
self.tester.scapy_execute()
out = self.dut.get_session_output(timeout=1)
lines = out.split("\r\n")
@@ -146,7 +146,10 @@ class TestChecksumOffload(TestCase):
self.verify("PKT_RX_L4_CKSUM_GOOD" in line, "Packet Rx L4 checksum valid-flags error!")
self.verify("PKT_RX_IP_CKSUM_GOOD" in line, "Packet Rx IP checksum valid-flags error!")
elif (flag == 0):
- self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!")
+ if self.nic == "cavium_a063":
+ self.verify("PKT_RX_L4_CKSUM_BAD" in line or "PKT_RX_L4_CKSUM_UNKNOWN" in line, "Packet Rx L4 checksum valid-flags error!")
+ else:
+ self.verify("PKT_RX_L4_CKSUM_BAD" in line, "Packet Rx L4 checksum valid-flags error!")
self.verify("PKT_RX_IP_CKSUM_BAD" in line, "Packet Rx IP checksum valid-flags error!")
self.dut.send_expect("stop", "testpmd>")
@@ -174,11 +177,11 @@ class TestChecksumOffload(TestCase):
self.tester.send_expect("exit()", "#")
- inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent),
+ inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent)*4,
filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
for packet_type in packets_sent.keys():
- self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
+ self.tester.scapy_append('sendp([%s], iface="%s", count=4)' % (packets_sent[packet_type], tx_interface))
self.tester.scapy_execute()
p = self.tester.load_tcpdump_sniff_packets(inst)
@@ -186,7 +189,7 @@ class TestChecksumOffload(TestCase):
reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]
out = string.join(reslist, ",")
packets_received = out.split(',')
- self.verify(len(packets_sent) == len(packets_received), "Unexpected Packets Drop")
+ self.verify(len(packets_sent)*4 == len(packets_received), "Unexpected Packets Drop")
for packet_received in packets_received:
ip_checksum, tcp_checksum, udp_checksum, sctp_checksum = packet_received.split(';')
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-03 9:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 10:13 [dts] [PATCH] checksum_offload: Support this test in vector mode pvukkisala
2019-07-03 9:41 ` Tu, Lijuan
-- strict thread matches above, loose matches on Subject: below --
2019-06-14 11:12 pvukkisala
2019-06-26 7:01 ` Tu, Lijuan
2019-06-26 10:14 ` Phanendra Vukkisala
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).