[Bug 1312] When iterating through the mbufs, mbuf->nb_segs indicates there are 21 segments, but when reaching the 8th mbuf, its mbuf->next pointer is NULL

bugzilla at dpdk.org bugzilla at dpdk.org
Thu Nov 9 13:34:01 CET 2023


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

            Bug ID: 1312
           Summary: When iterating through the mbufs, mbuf->nb_segs
                    indicates there are 21 segments, but when reaching the
                    8th mbuf, its mbuf->next pointer is NULL
           Product: DPDK
           Version: 20.11
          Hardware: ARM
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev at dpdk.org
          Reporter: tingsong.zheng at gmail.com
  Target Milestone: ---

The version of DPDK is 20.11.

When iterating through the mbufs, mbuf->nb_segs indicates there are 21
segments, but when reaching the 8th mbuf, its mbuf->next pointer is NULL.

I used ASAN tool to check and found no memory out-of-bounds errors before
encountering the NULL value in the mbuf's 'next' pointer.

My scenario involves sending approximately 30,000 large packets using a sender
via the kernel protocol stack, where the network card's MTU is 1500. On the
receiver side, I'm using DPDK to capture these packets. In Thread 1, I'm
receiving the packets using rte_eth_rx_burst, then processing them through the
IP fragment reassembly process. Upon receiving a complete packet, I enqueue the
mbuf into an 'rte_ring' named 'test'. In Thread 2, I dequeue the mbufs from the
'test' rte_ring. I then iterate through these mbufs to copy data from each
segment mbuf. However, I encounter an issue with some mbufs having a 'next'
pointer set as NULL."

-- 
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/20231109/e5bc3861/attachment.htm>


More information about the dev mailing list