DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/2] dts: fix docstring typo in checksum suite
@ 2025-07-22 17:22 Dean Marx
  2025-07-22 17:22 ` [PATCH v1 2/2] dts: add exception handling to checksum verify method Dean Marx
  0 siblings, 1 reply; 2+ messages in thread
From: Dean Marx @ 2025-07-22 17:22 UTC (permalink / raw)
  To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek
  Cc: dev, Dean Marx

Current test suite docstring for checksum offload suite
says there are 6 test cases when it should say 7.

Fixes: 8c9a7471a0e6 ("dts: add checksum offload test suite")

Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
 dts/tests/TestSuite_checksum_offload.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py
index c9efdcaa1c..b03c3d46ed 100644
--- a/dts/tests/TestSuite_checksum_offload.py
+++ b/dts/tests/TestSuite_checksum_offload.py
@@ -36,7 +36,7 @@
 class TestChecksumOffload(TestSuite):
     """Checksum offload test suite.
 
-    This suite consists of 6 test cases:
+    This suite consists of 7 test cases:
     1. Insert checksum on transmit packet
     2. Do not insert checksum on transmit packet
     3. Hardware checksum check L4 Rx
-- 
2.50.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v1 2/2] dts: add exception handling to checksum verify method
  2025-07-22 17:22 [PATCH v1 1/2] dts: fix docstring typo in checksum suite Dean Marx
@ 2025-07-22 17:22 ` Dean Marx
  0 siblings, 0 replies; 2+ messages in thread
From: Dean Marx @ 2025-07-22 17:22 UTC (permalink / raw)
  To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek
  Cc: dev, Dean Marx

Current implementation of the checksum offload test suite
contains a section in the verify checksum method
that causes NameError exceptions when the packet is
dropped. Add a try block to encapsulate this section
and handle any errors created.

Fixes: 8c9a7471a0e6 ("dts: add checksum offload test suite")

Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
 dts/tests/TestSuite_checksum_offload.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py
index b03c3d46ed..9dfbcb8028 100644
--- a/dts/tests/TestSuite_checksum_offload.py
+++ b/dts/tests/TestSuite_checksum_offload.py
@@ -89,8 +89,11 @@ def send_packet_and_verify_checksum(
             if testpmd_packet.l4_dport == id:
                 is_IP = PacketOffloadFlag.RTE_MBUF_F_RX_IP_CKSUM_GOOD in testpmd_packet.ol_flags
                 is_L4 = PacketOffloadFlag.RTE_MBUF_F_RX_L4_CKSUM_GOOD in testpmd_packet.ol_flags
-        self.verify(is_L4 == good_L4, "Layer 4 checksum flag did not match expected checksum flag.")
-        self.verify(is_IP == good_IP, "IP checksum flag did not match expected checksum flag.")
+        try:
+            self.verify(is_L4 == good_L4, "Layer 4 checksum flag did not match expected checksum flag.")
+            self.verify(is_IP == good_IP, "IP checksum flag did not match expected checksum flag.")
+        except NameError:
+            self.verify(False, "Test packet was dropped when it should have been received.")
 
     def setup_hw_offload(self, testpmd: TestPmdShell) -> None:
         """Sets IP, UDP, and TCP layers to hardware offload.
-- 
2.50.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-22 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-22 17:22 [PATCH v1 1/2] dts: fix docstring typo in checksum suite Dean Marx
2025-07-22 17:22 ` [PATCH v1 2/2] dts: add exception handling to checksum verify method Dean Marx

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).