[DPDK/core Bug 1761] rte_raw_cksum_mbuf obtain incorrect cksum when a packet in mbuf split mode.

bugzilla at dpdk.org bugzilla at dpdk.org
Wed Jul 30 17:18:23 CEST 2025


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

            Bug ID: 1761
           Summary: rte_raw_cksum_mbuf obtain incorrect cksum when a
                    packet in mbuf split mode.
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: core
          Assignee: dev at dpdk.org
          Reporter: yanglanping at bytedance.com
  Target Milestone: ---

Hi.

This issue is about calc cksum, in rte_raw_cksum_mbuf function, when the packet
data is stored in multiple mbufs, below code easy overflow.

File rte_cksum.h
    line 159: if (done & 1)
    line 160:     tmp = rte_bswap16((uint16_t)tmp); 
    line 161: sum += tmp;

The tmp(uint32_t) variable can easily be greater than 0xFFFF, so (uint16_t)tmp
will discard the high 16bit, cause incorrect result.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250730/75c575d3/attachment.htm>


More information about the dev mailing list