[dts] [PATCH] l4 hardware checksum: Bugfix for bug 529

Chen, BoX C box.c.chen at intel.com
Thu Aug 27 09:35:51 CEST 2020


Tested Failed by: xix.zhang at intel.com

There may be two more errors:
1.The Iface here is a function variable, not an Iface defined by scapy. I think you forgot to put quotation marks

@@ -374,7 +374,7 @@ class TestChecksumOffload(TestCase):
     def replay_pcap_file_on_tester(self, iface, packet_file_path):
         self.tester.send_expect("scapy", ">>>")
         self.scapy_exec(f"packets = rdpcap('{packet_file_path}')")
-        self.scapy_exec(f"sendp(packets, iface={iface})")
+        self.scapy_exec(f"sendp(packets, iface='{iface}')")
         self.tester.send_expect("quit()", "# ")
    
2.SyntaxError: invalid syntax(This format should not appear :UDP(chksum=chksum=0xf))
    File "/usr/lib/python3.6/code.py", line 64, in runsource
    code = self.compile(source, filename, symbol)
  File "/usr/lib/python3.6/codeop.py", line 168, in __call__
    return _maybe_compile(self.compiler, source, filename, symbol)
  File "/usr/lib/python3.6/codeop.py", line 99, in _maybe_compile
    raise err1
  File "/usr/lib/python3.6/codeop.py", line 87, in _maybe_compile
    code1 = compiler(source + "\n", filename, symbol)
  File "/usr/lib/python3.6/codeop.py", line 133, in __call__
    codeob = compile(source, filename, symbol, self.flags, 1)
  File "<console>", line 1
    sendp(eth/IP()/UDP(chksum=0xf)/VXLAN()/IP()/UDP(chksum=chksum=0xf)/('X'*50), iface=iface)

> -----Original Message-----
> From: dts <dts-bounces at dpdk.org> On Behalf Of Owen Hilyard
> Sent: August 26, 2020 23:53
> To: dts at dpdk.org
> Cc: Zhang, XiX <xix.zhang at intel.com>; Zhang, XuemingX
> <xuemingx.zhang at intel.com>; Ma, LihongX <lihongx.ma at intel.com>; Owen
> Hilyard <ohilyard at iol.unh.edu>
> Subject: [dts] [PATCH] l4 hardware checksum: Bugfix for bug 529
> 
> added missing quote in template for scapy packets.
> 
> Signed-off-by: Owen Hilyard <ohilyard at iol.unh.edu>
> ---
>  tests/TestSuite_checksum_offload.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/TestSuite_checksum_offload.py
> b/tests/TestSuite_checksum_offload.py
> index c4a877d..b07ae16 100644
> --- a/tests/TestSuite_checksum_offload.py
> +++ b/tests/TestSuite_checksum_offload.py
> @@ -703,7 +703,7 @@ class TestChecksumOffload(TestCase):
>          for l4 in l4_protos:
>              for chksum in "", "chksum=0xf":
>                  vf = self.send_pkt_expect_good_bad_from_flag_catch_failure(
> -                    f"eth/IP({chksum})/{l4}()/(X'*50)",
> +                    f"eth/IP({chksum})/{l4}()/('X'*50)",
>                      "PKT_RX_IP_CKSUM_", f"{l4}",
>                      should_pass=(chksum == ""))
>                  if vf is not None:
> --
> 2.25.1



More information about the dts mailing list