[PATCH] test/cksum: fix EtherType of IPv6 TCP packet
Morten Brørup
mb at smartsharesystems.com
Wed Dec 2 08:53:34 CET 2026
> From: Scott Mitchell [mailto:scott.k.mitch1 at gmail.com]
> Sent: Tuesday, 1 December 2026 22.59
>
> The IPv6/TCP test packet has EtherType 0x0800 (IPv4), so its IPv6
> header is not recognized and test_l4_cksum() skips it. Use 0x86dd
> (IPv6).
>
> Fixes: 30a65c6cb769 ("test/cksum: add L3/L4 checksum API test")
> Cc: stable at dpdk.org
>
> Signed-off-by: Scott Mitchell <scott.k.mitch1 at gmail.com>
> ---
> app/test/test_cksum.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_cksum.c b/app/test/test_cksum.c
> index d94539820a..7eba82fe16 100644
> --- a/app/test/test_cksum.c
> +++ b/app/test/test_cksum.c
> @@ -42,7 +42,7 @@ static const char test_cksum_ipv4_tcp[] = {
> /* generated in scapy with Ether()/IPv6()/TCP()) */
> static const char test_cksum_ipv6_tcp[] = {
> 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
> - 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x60, 0x00,
> + 0x00, 0x00, 0x00, 0x00, 0x86, 0xdd, 0x60, 0x00,
> 0x00, 0x00, 0x00, 0x14, 0x06, 0x40, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
> --
> 2.54.0 (Apple Git-157)
Good catch.
While reviewing, searching for same bug elsewhere, I noticed the Ether()/IPv6()/UDP() below uses the correct EtherType.
And the IP header of the packet is actually IPv6.
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
More information about the stable
mailing list