<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LayerscapeのトピックRe: Issue DPAA2 PMD and chained mbuf</title>
    <link>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1637104#M12305</link>
    <description>Hi June,&lt;BR /&gt;&lt;BR /&gt;Yes, I can see there are tests for the DPDK mbufs. Unfortunately that does not really help.&lt;BR /&gt;&lt;BR /&gt;The problem is that the mempool gets corrupted when mbufs are returned to it after being sent by the DPAA2 PMD. This only appears to happen when all of the following conditions are true:&lt;BR /&gt;&lt;BR /&gt;1. NXP's DPAA2 PMD is used to send the packets - the exact same DPDK code does not fail for other PMDs.&lt;BR /&gt;2. rte_pktmbuf_chain is used to attach another mbuf to the end of the mbuf being transmitted.&lt;BR /&gt;3. Enough packets have been processed for a cache of mbufs sent by NXP's PMD to be returned to the pool and allocated to rte_pktmbuf_alloc.&lt;BR /&gt;&lt;BR /&gt;Put another way, the DPAA2 PMD is the only thing returning mbufs to the mempool in question and a sanity check failure is occurring when allocating mbufs from that pool.</description>
    <pubDate>Thu, 20 Apr 2023 09:40:42 GMT</pubDate>
    <dc:creator>womble</dc:creator>
    <dc:date>2023-04-20T09:40:42Z</dc:date>
    <item>
      <title>Issue DPAA2 PMD and chained mbuf</title>
      <link>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1632308#M12244</link>
      <description>&lt;P&gt;I am encountering some odd behaviour which I think might be caused by the DPAA2 DPDK poll mode driver. I have a DPDK 22.11.1 LTS application (on a LX2160A SoC) which does the following:&lt;/P&gt;&lt;P&gt;1. receive a queue of mbufs from an input queue, and process each mbuf:&lt;/P&gt;&lt;P&gt;2. allocate a trailer for the mbuf using rte_pktmbuf_alloc. This allocation occurs from the same pool used to allocate received packets.&lt;/P&gt;&lt;P&gt;3. chain the trailer to the received mbuf using rte_pktmbuf_chain(rx, trailer)&lt;/P&gt;&lt;P&gt;4. transmit the mbuf chain via a second dpaa2 port.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The issue I am seeing is that the call to&amp;nbsp;rte_pktmbuf_alloc fails (after processing a few thousand packets) with a panic:&lt;BR /&gt;"PANIC in __rte_mbuf_raw_sanity_check():"&lt;BR /&gt;assert "m-&amp;gt;next == ((void *)0)" failed.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This sanity check is a check on the consistency of the mbufs allocated from the pool (including whether they have the "next" pointer set to NULL as it should be). I only see this panic behaviour when previous operations have created mbuf chain using the rte_pktmbuf_chain API.&lt;BR /&gt;&lt;BR /&gt;I think the issue is that the PMD is releasing a chained mbuf back to the pool (after transmit) without setting the next field to NULL first. This results in a panic when an allocation from the pool occurs when using an API that calls&amp;nbsp; __rte_mbuf_raw_sanity_check. It would be very helpful to confirm this with someone familiar with the DPDK PMD code).&lt;BR /&gt;&lt;BR /&gt;I could look to put together a reproducible example if someone from NXP is available to help with this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 16:07:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1632308#M12244</guid>
      <dc:creator>womble</dc:creator>
      <dc:date>2023-04-12T16:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue DPAA2 PMD and chained mbuf</title>
      <link>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1637038#M12303</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;SPAN&gt;You can refer test/test/&lt;/SPAN&gt;&lt;SPAN&gt;test_mbuf.c to assess allocation and free of mbufs.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 08:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1637038#M12303</guid>
      <dc:creator>June_Lu</dc:creator>
      <dc:date>2023-04-20T08:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue DPAA2 PMD and chained mbuf</title>
      <link>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1637104#M12305</link>
      <description>Hi June,&lt;BR /&gt;&lt;BR /&gt;Yes, I can see there are tests for the DPDK mbufs. Unfortunately that does not really help.&lt;BR /&gt;&lt;BR /&gt;The problem is that the mempool gets corrupted when mbufs are returned to it after being sent by the DPAA2 PMD. This only appears to happen when all of the following conditions are true:&lt;BR /&gt;&lt;BR /&gt;1. NXP's DPAA2 PMD is used to send the packets - the exact same DPDK code does not fail for other PMDs.&lt;BR /&gt;2. rte_pktmbuf_chain is used to attach another mbuf to the end of the mbuf being transmitted.&lt;BR /&gt;3. Enough packets have been processed for a cache of mbufs sent by NXP's PMD to be returned to the pool and allocated to rte_pktmbuf_alloc.&lt;BR /&gt;&lt;BR /&gt;Put another way, the DPAA2 PMD is the only thing returning mbufs to the mempool in question and a sanity check failure is occurring when allocating mbufs from that pool.</description>
      <pubDate>Thu, 20 Apr 2023 09:40:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Issue-DPAA2-PMD-and-chained-mbuf/m-p/1637104#M12305</guid>
      <dc:creator>womble</dc:creator>
      <dc:date>2023-04-20T09:40:42Z</dc:date>
    </item>
  </channel>
</rss>

