[v1] dts: fix attribute error in checksum offload suite

Message ID 20250116181700.25180-1-dmarx@iol.unh.edu (mailing list archive)
State Accepted
Delegated to: Patrick Robb
Headers
Series [v1] dts: fix attribute error in checksum offload suite |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues
ci/loongarch-compilation warning apply patch failure
ci/iol-testing warning apply patch failure

Commit Message

Dean Marx Jan. 16, 2025, 6:17 p.m. UTC
Fix a variable naming error within the verify method
that was causing an attribute error during runtime.

Fixes: 05d7ad873798 ("dts: resolve mypy type errors")

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

Comments

Patrick Robb Jan. 19, 2025, 10:56 p.m. UTC | #1
Reviewed-by: Patrick Robb <probb@iol.unh.edu>

Applied to next-dts - thanks for finding this.
  

Patch

diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py
index c1680bd388..14b246d16f 100644
--- a/dts/tests/TestSuite_checksum_offload.py
+++ b/dts/tests/TestSuite_checksum_offload.py
@@ -88,8 +88,8 @@  def send_packet_and_verify_checksum(
         verbose_output = testpmd.extract_verbose_output(testpmd.stop())
         for testpmd_packet in verbose_output:
             if testpmd_packet.dst_mac == id:
-                isIP = PacketOffloadFlag.RTE_MBUF_F_RX_IP_CKSUM_GOOD in packet.ol_flags
-                isL4 = PacketOffloadFlag.RTE_MBUF_F_RX_L4_CKSUM_GOOD in packet.ol_flags
+                isIP = PacketOffloadFlag.RTE_MBUF_F_RX_IP_CKSUM_GOOD in testpmd_packet.ol_flags
+                isL4 = PacketOffloadFlag.RTE_MBUF_F_RX_L4_CKSUM_GOOD in testpmd_packet.ol_flags
         self.verify(isL4 == goodL4, "Layer 4 checksum flag did not match expected checksum flag.")
         self.verify(isIP == goodIP, "IP checksum flag did not match expected checksum flag.")