[DPDK/other Bug 1941] net/tap: wrong ptype leads to checksum failure

bugzilla at dpdk.org bugzilla at dpdk.org
Thu Apr 30 18:39:55 CEST 2026


http://bugs.dpdk.org/show_bug.cgi?id=1941

            Bug ID: 1941
           Summary: net/tap: wrong ptype leads to checksum failure
           Product: DPDK
           Version: 26.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
          Assignee: dev at dpdk.org
          Reporter: ktraynor at redhat.com
  Target Milestone: ---

Adding bugzilla for issue reported by Robin in [0], so we can link in release
notes:

Since commit 1f250674085a ("net: fix packet type for stacked VLAN"),
rte_net_get_ptype() uses |= to set the L2 ptype inside the VLAN
parsing loop. Since pkt_type is already initialized with
RTE_PTYPE_L2_ETHER (0x1), or-ing it with RTE_PTYPE_L2_ETHER_VLAN
(0x6) results in RTE_PTYPE_L2_ETHER_QINQ (0x7). This causes single
VLAN frames to be misidentified as QinQ.

This was detected while testing DPDK 25.11.1 in grout. The net/tap
driver calls rte_net_get_ptype() in tap_verify_csum() to determine
the L2 header length. With the wrong ptype, l2_len is set to 22
(ether + QinQ = 14 + 8) instead of 18 (ether + VLAN = 14 + 4),
shifting the IP header pointer by 4 bytes. The checksum is then
computed on garbage data, causing valid packets to be dropped.


[0] https://mails.dpdk.org/archives/dev/2026-April/336248.html

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


More information about the dev mailing list