DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/core Bug 1761] rte_raw_cksum_mbuf obtain incorrect cksum when a packet in mbuf split mode.
@ 2025-07-30 15:18 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2025-07-30 15:18 UTC (permalink / raw)
  To: dev

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

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@dpdk.org
          Reporter: yanglanping@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.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-30 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30 15:18 [DPDK/core Bug 1761] rte_raw_cksum_mbuf obtain incorrect cksum when a packet in mbuf split mode bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).