<?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>topic Re: Secondary failed allocate mbuff from DPDK Pool in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408976#M16838</link>
    <description>thanks i will try these options and update you by tomorrow</description>
    <pubDate>Thu, 27 Aug 2026 17:23:16 GMT</pubDate>
    <dc:creator>Chidananda22</dc:creator>
    <dc:date>2026-08-27T17:23:16Z</dc:date>
    <item>
      <title>Secondary failed allocate mbuff from DPDK Pool</title>
      <link>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408883#M16836</link>
      <description>&lt;P&gt;hi All,&lt;/P&gt;&lt;P&gt;Using : LX2160&amp;nbsp; LSDK 2108 main&amp;nbsp;&lt;BR /&gt;MC firmware version: 10.32.0&lt;/P&gt;&lt;P&gt;DPDK Version :&amp;nbsp;dpdk_19_11_tags_LSDK20.04-isc-09&lt;/P&gt;&lt;P&gt;Primary ( DPDK ) Process : Create a mbuff Pool using [&amp;nbsp;rte_pktmbuf_pool_create("dlmempool", ]&lt;/P&gt;&lt;P&gt;Secondary ( DPDK ) Process : fails to allocate mbuff using API [&amp;nbsp;rte_pktmbuf_alloc(mempool) ]&lt;/P&gt;&lt;P&gt;In Secondary i can see mempool is correct. I can see mbuff available is full. The failure happens for 1st mbuff allocation using&amp;nbsp;&amp;nbsp;rte_pktmbuf_alloc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any solution for this. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2026 11:06:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408883#M16836</guid>
      <dc:creator>Chidananda22</dc:creator>
      <dc:date>2026-08-27T11:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary failed allocate mbuff from DPDK Pool</title>
      <link>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408967#M16837</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;The secondary process must map hugepages at the same virtual address as the primary. If ASLR is active, the secondary will resolve the mempool pointer to a different virtual address, causing the first allocation to fail.&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;&lt;SPAN class="hljs-built_in"&gt;echo&lt;/SPAN&gt; 0 &amp;gt; /proc/sys/kernel/randomize_va_space
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="l8rrz23 _1ibi0s3dp _1ibi0s332 _1ibi0s3eo _1ibi0s3bm _1ibi0s3ce"&gt;
&lt;DIV class="lqznwq0" style="mask-image: url('/images/copy.svg'); vertical-align: text-bottom; height: 14px; min-width: 14px; width: 14px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="p8i6j01 paragraph"&gt;Run this before launching either the primary or secondary process.&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;2. Provision Sufficient DPMCP Objects&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;Create as many DPMCP objects as the total number of processes (primary + secondary). For 1 primary + 1 secondary, you need at least 2 DMPCPs: &lt;A id="base-ui-:r2uj:" class="wdbi343 wdbi341 _1ibi0s3ec _1ibi0s376" tabindex="0" role="button" href="https://www.nxp.com.cn/docs/en/user-guide/LSDKYOCTOUG.pdf" rel="noreferrer" aria-expanded="false" aria-haspopup="dialog" data-base-ui-click-trigger="" data-label="1" aria-label="Citation 1" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;&lt;SPAN class="hljs-built_in"&gt;export&lt;/SPAN&gt; DPMCP_COUNT=3   &lt;SPAN class="hljs-comment"&gt;# for 1 Primary + 2 Secondary (always provision +1 as buffer)&lt;/SPAN&gt;
./dynamic_dpl.sh dpmac.X
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;
&lt;H4 class="_9k2iva0 p8i6j0c _1ibi0s314 heading4 _9k2iva1"&gt;3. Provision Sufficient DPIO Objects&lt;/H4&gt;
&lt;P class="p8i6j01 paragraph"&gt;Each process needs its own DPIO portals. The formula is: &lt;A id="base-ui-:r2up:" class="wdbi343 wdbi341 _1ibi0s3ec _1ibi0s376" tabindex="0" role="button" href="https://www.nxp.com.cn/docs/en/user-guide/LSDKYOCTOUG.pdf" rel="noreferrer" aria-expanded="false" aria-haspopup="dialog" data-base-ui-click-trigger="" data-label="1" aria-label="Citation 1" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE class="p8i6j03"&gt;
&lt;P class="p8i6j01 paragraph"&gt;&lt;STRONG&gt;(Total Processes) × (cores per process + 1 extra per process)&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P class="p8i6j01 paragraph"&gt;For example, 1 primary (2 cores) + 1 secondary (2 cores) = at minimum 9 DPIOs.&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;&lt;SPAN class="hljs-built_in"&gt;export&lt;/SPAN&gt; DPIO_COUNT=20   &lt;SPAN class="hljs-comment"&gt;# set generously&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;
&lt;H4 class="_9k2iva0 p8i6j0c _1ibi0s314 heading4 _9k2iva1"&gt;4. Correctly Blacklist/Whitelist Devices in the Secondary&lt;/H4&gt;
&lt;P class="p8i6j01 paragraph"&gt;The secondary process must NOT re-initialize I/O devices (dpni, dpbp, dpcon, dpseci). Only &lt;CODE class="p8i6j0f"&gt;dpio&lt;/CODE&gt; and &lt;CODE class="p8i6j0f"&gt;dpmcp&lt;/CODE&gt; should be initialized by the secondary. Pass the correct blacklist flags: &lt;A id="base-ui-:r2uv:" class="wdbi343 wdbi341 _1ibi0s3ec _1ibi0s376" tabindex="0" role="button" href="https://www.nxp.com.cn/docs/en/user-guide/LSDKYOCTOUG.pdf" rel="noreferrer" aria-expanded="false" aria-haspopup="dialog" data-base-ui-click-trigger="" data-label="1" aria-label="Citation 1" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;&lt;SPAN class="hljs-comment"&gt;# Secondary process example — blacklist all dpni/dpbp/dpcon, allow only dpio + dpmcp&lt;/SPAN&gt;
./your_secondary_app --proc-type=secondary \
  -b fslmc:dpni.X \
  -b fslmc:dpbp.X \
  -b fslmc:dpcon.X \
  -- [app args]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="l8rrz23 _1ibi0s3dp _1ibi0s332 _1ibi0s3eo _1ibi0s3bm _1ibi0s3ce"&gt;
&lt;DIV class="lqznwq0" style="mask-image: url('/images/copy.svg'); vertical-align: text-bottom; height: 14px; min-width: 14px; width: 14px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="p8i6j01 paragraph"&gt;Or alternatively, explicitly whitelist only the dpio and dpmcp objects assigned to the secondary:&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;./your_secondary_app --proc-type=secondary \
  -w fslmc:dpio.Y \
  -w fslmc:dpmcp.Z \
  -- [app args]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;
&lt;H4 class="_9k2iva0 p8i6j0c _1ibi0s314 heading4 _9k2iva1"&gt;5. Use &lt;CODE class="p8i6j0f"&gt;--proc-type=secondary&lt;/CODE&gt; EAL Argument&lt;/H4&gt;
&lt;P class="p8i6j01 paragraph"&gt;Ensure the secondary is launched with the correct EAL flag: &lt;A id="base-ui-:r2v8:" class="wdbi343 wdbi341 _1ibi0s3ec _1ibi0s376" tabindex="0" role="button" href="https://www.nxp.com.cn/docs/en/user-guide/LSDKYOCTOUG.pdf" rel="noreferrer" aria-expanded="false" aria-haspopup="dialog" data-base-ui-click-trigger="" data-label="1" aria-label="Citation 1" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash p8i6j0e hljs language-bash _12n1b832"&gt;./your_secondary_app -c &amp;lt;coremask&amp;gt; -n 1 --proc-type=secondary ...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="l8rrz23 _1ibi0s3dp _1ibi0s332 _1ibi0s3eo _1ibi0s3bm _1ibi0s3ce"&gt;
&lt;DIV class="lqznwq0" style="mask-image: url('/images/copy.svg'); vertical-align: text-bottom; height: 14px; min-width: 14px; width: 14px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="p8i6j01 paragraph"&gt;Or use &lt;CODE class="p8i6j0f"&gt;--proc-type=auto&lt;/CODE&gt; to let DPDK auto-detect.&lt;/P&gt;
&lt;HR /&gt;
&lt;H4 class="_9k2iva0 p8i6j0c _1ibi0s314 heading4 _9k2iva1"&gt;6. Verify the Mempool Lookup in Secondary&lt;/H4&gt;
&lt;P class="p8i6j01 paragraph"&gt;In the secondary, do not call &lt;CODE class="p8i6j0f"&gt;rte_pktmbuf_pool_create&lt;/CODE&gt; again. Instead, look up the existing pool created by the primary:&lt;/P&gt;
&lt;DIV class="l8rrz21 _1ibi0s3en" data-ui-element="code-block-container"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-c p8i6j0e hljs language-c _12n1b832"&gt;&lt;SPAN class="hljs-comment"&gt;// In secondary process:&lt;/SPAN&gt;
&lt;SPAN class="hljs-class"&gt;&lt;SPAN class="hljs-keyword"&gt;struct&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;rte_mempool&lt;/SPAN&gt; *&lt;SPAN class="hljs-title"&gt;mempool&lt;/SPAN&gt; =&lt;/SPAN&gt; rte_mempool_lookup(&lt;SPAN class="hljs-string"&gt;"dlmempool"&lt;/SPAN&gt;);
&lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (mempool == &lt;SPAN class="hljs-literal"&gt;NULL&lt;/SPAN&gt;) {
    &lt;SPAN class="hljs-comment"&gt;// Error: pool not found — ASLR or hugepage mapping issue&lt;/SPAN&gt;
}
&lt;SPAN class="hljs-class"&gt;&lt;SPAN class="hljs-keyword"&gt;struct&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;rte_mbuf&lt;/SPAN&gt; *&lt;SPAN class="hljs-title"&gt;m&lt;/SPAN&gt; =&lt;/SPAN&gt; rte_pktmbuf_alloc(mempool);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="l8rrz23 _1ibi0s3dp _1ibi0s332 _1ibi0s3eo _1ibi0s3bm _1ibi0s3ce"&gt;
&lt;DIV class="l8rrz25 _1ibi0s3eb"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lqznwq0" style="mask-image: url('/images/copy.svg'); vertical-align: text-bottom; height: 14px; min-width: 14px; width: 14px;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="p8i6j01 paragraph"&gt;If &lt;CODE class="p8i6j0f"&gt;rte_mempool_lookup&lt;/CODE&gt; returns a valid non-NULL pointer but &lt;CODE class="p8i6j0f"&gt;rte_pktmbuf_alloc&lt;/CODE&gt; still returns NULL, the issue is almost certainly the DPIO portal not being initialized for the secondary's thread/core.&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2026 16:26:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408967#M16837</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2026-08-27T16:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Secondary failed allocate mbuff from DPDK Pool</title>
      <link>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408976#M16838</link>
      <description>thanks i will try these options and update you by tomorrow</description>
      <pubDate>Thu, 27 Aug 2026 17:23:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Secondary-failed-allocate-mbuff-from-DPDK-Pool/m-p/2408976#M16838</guid>
      <dc:creator>Chidananda22</dc:creator>
      <dc:date>2026-08-27T17:23:16Z</dc:date>
    </item>
  </channel>
</rss>

