All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/testpmd Bug 1672] [dpdk-25.03] vf_offload/checksum_offload_tunnel_enable: gtpu packet checksum error packet
Date: Tue, 11 Mar 2025 02:31:19 +0000	[thread overview]
Message-ID: <bug-1672-3@http.bugs.dpdk.org/> (raw)

[-- Attachment #1: Type: text/plain, Size: 5511 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1672

            Bug ID: 1672
           Summary: [dpdk-25.03]
                    vf_offload/checksum_offload_tunnel_enable: gtpu packet
                    checksum error packet
           Product: DPDK
           Version: 25.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: testpmd
          Assignee: dev@dpdk.org
          Reporter: songx.jiale@intel.com
  Target Milestone: ---

Environment
===========
DPDK version: 5f37ee9c859f3ce08ca4364f1d8c0e70ec33ac83 version: 25.03.0-rc2
OS: Ubuntu24.04.1 LTS (Noble Numbat)/6.8.0-41-generic
Compiler:  gcc version 13.2.0
Hardware platform: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz
NIC hardware: CVL(Intel Corporation Ethernet Controller E810-C for SFP
[8086:1593])
NIC firmware: 
  driver: vfio-pci
  kdriver: ice-1.16.3
  firmware-version: 4.70 0x8001f79e 1.3755.0
  pkg: ice comms 1.3.53.0
scapy:2.4.4

Test Setup
Steps to reproduce
==================
1. create 1 vf and set vf 
echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
ip link set enp24s0f0np0 vf 0 trust on
ip link set enp24s0f0np0 vf 0 spoofchk off
modprobe vfio-pci
./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0

2. start testpmd 
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-3 -n 4 -a 0000:18:01.0 -- -i
--enable-rx-cksum

3. set testpmd 
set verbose 1
set promisc 0 on
set fwd csum
port stop all
csum set ip hw 0
csum set udp hw 0
csum set tcp hw 0
csum set sctp hw 0
csum set outer-ip hw 0
csum set outer-udp hw 0
csum parse-tunnel on 0
port start all
start

4. tcpdump captures packets forwarded by testpmd
tcpdump -ei ens8 -Q in -w 1.pcap

5. scapy send packets
from scapy.contrib.gtp import *
p=Ether(dst="76:D4:6B:F1:BF:7A", src="52:00:00:00:00:00") / IP(src =
"10.0.0.1", chksum = 0xff) / UDP(dport = 2182, chksum = 0xff) /
GTP_U_Header(gtp_type=255, teid=0x123456) / IP(src = "10.0.0.1", chksum = 0xff)
/ UDP(sport = 29999, dport = 30000, chksum = 0xff) / Raw("x" * 100) 
sendp(p, iface='ens8', count=1)

6. ^C exit tcpdump and scapy or wireshark parsing data packets
scapy parsing data packets:
from scapy.contrib.gtp import *
pkt=rdpcap('1.pcap')
pkt[0].show2()


Results: 
========
>>> pkt[0].show2()
###[ Ethernet ]###
  dst= 02:00:00:00:00:00
  src= 7e:45:ee:26:3a:23
  type= IPv4
###[ IP ]###
     version= 4
     ihl= 5
     tos= 0x0
     len= 164
     id= 1
     flags=
     frag= 0
     ttl= 64
     proto= udp
     chksum= 0xf146
     src= 10.0.0.1
     dst= 127.0.0.1
     \options\
###[ UDP ]###
        sport= 2152
        dport= 2182
        len= 144
        chksum= 0x7c10
###[ GTP-U Header ]###
           version= 1
           PT= 1
           reserved= 0
           E= 0
           S= 0
           PN= 0
           gtp_type= g_pdu
           length= 128
           teid= 1193046
###[ IP ]###
              version= 4
              ihl= 5
              tos= 0x0
              len= 128
              id= 1
              flags=
              frag= 0
              ttl= 64
              proto= udp
              chksum= 0xff
              src= 10.0.0.1
              dst= 127.0.0.1
              \options\
###[ UDP ]###
                 sport= 29999
                 dport= 30000
                 len= 108
                 chksum= 0xff
###[ Raw ]###
                    load=
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Expected Result:
================
>>> pkt[0].show2()
###[ Ethernet ]###
  dst= 02:00:00:00:00:00
  src= 7e:45:ee:26:3a:23
  type= IPv4
###[ IP ]###
     version= 4
     ihl= 5
     tos= 0x0
     len= 164
     id= 1
     flags=
     frag= 0
     ttl= 64
     proto= udp
     chksum= 0xf146
     src= 10.0.0.1
     dst= 127.0.0.1
     \options\
###[ UDP ]###
        sport= 2152
        dport= 2182
        len= 144
        chksum= 0x8894
###[ GTP-U Header ]###
           version= 1
           PT= 1
           reserved= 0
           E= 0
           S= 0
           PN= 0
           gtp_type= g_pdu
           length= 128
           teid= 1193046
###[ IP ]###
              version= 4
              ihl= 5
              tos= 0x0
              len= 128
              id= 1
              flags=
              frag= 0
              ttl= 64
              proto= udp
              chksum= 0xf16a
              src= 10.0.0.1
              dst= 127.0.0.1
              \options\
###[ UDP ]###
                 sport= 29999
                 dport= 30000
                 len= 108
                 chksum= 0x42d
###[ Raw ]###
                    load=
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

bad commit:
===========
commit 76730c7b9b5a35d1a74d45a08153a03bdb1b26f8
Author: Jie Hai <haijie1@huawei.com>
Date:   Fri Feb 14 09:56:38 2025 +0800

    app/testpmd: use packet type parsing API

    1. Use rte_net_get_ptype() to parse packets instead.
    2. Support TSO for packets with IPv6 extension header.

    Signed-off-by: Jie Hai <haijie1@huawei.com>

 app/test-pmd/csumonly.c | 522 ++++++++++++------------------------------------
 1 file changed, 128 insertions, 394 deletions

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 7625 bytes --]

             reply	other threads:[~2025-03-11  2:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11  2:31 bugzilla [this message]
2025-06-11  9:06 ` [DPDK/testpmd Bug 1672] [dpdk-25.03] vf_offload/checksum_offload_tunnel_enable: gtpu packet checksum error packet bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-1672-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.