diff mbox series

l4 hardware checksum: Bugfix for bug 529

Message ID 20200826155329.281082-1-ohilyard@iol.unh.edu (mailing list archive)
State Superseded
Headers show
Series l4 hardware checksum: Bugfix for bug 529 | expand

Commit Message

Owen Hilyard Aug. 26, 2020, 3:53 p.m. UTC
added missing quote in template for scapy packets.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 tests/TestSuite_checksum_offload.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen, BoX C Aug. 27, 2020, 7:35 a.m. UTC | #1
Tested Failed by: xix.zhang@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@dpdk.org> On Behalf Of Owen Hilyard
> Sent: August 26, 2020 23:53
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>; Zhang, XuemingX
> <xuemingx.zhang@intel.com>; Ma, LihongX <lihongx.ma@intel.com>; Owen
> Hilyard <ohilyard@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@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
Ma, LihongX Sept. 1, 2020, 2:55 a.m. UTC | #2
Hi, Owen
Can you add the patch version of the patch, and the subject of the patch format like below: 
[dts][PATCH V1]tests/checksum_offload: Bugfix for bug 529

Regards,
Ma,lihong

> -----Original Message-----
> From: Owen Hilyard <ohilyard@iol.unh.edu>
> Sent: Wednesday, August 26, 2020 11:53 PM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>; Zhang, XuemingX
> <xuemingx.zhang@intel.com>; Ma, LihongX <lihongx.ma@intel.com>; Owen
> Hilyard <ohilyard@iol.unh.edu>
> Subject: [PATCH] l4 hardware checksum: Bugfix for bug 529
> 
> added missing quote in template for scapy packets.
> 
> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
> ---
>  tests/TestSuite_checksum_offload.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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: