<div dir="ltr"><div>Hi Rashi,</div><div><br></div><div>Please change the argument to rte_eal_init (), in your code, -c 0x2 will always bind it to 1st core . Change it to "-c", "0x30" for pinning core 4 and 5.</div><div><br></div><div><pre class="gmail-aLF-aPX-K0-aPE" style="font-family:"Courier New",Courier,monospace,arial,sans-serif;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-size:14px">int dpdk_argc = 8; char *dpdk_argv[] = { procName, "-c", "0x2", "--no-huge", filePrefix ,"-m","64" , "--log-level=eal,8"};</pre></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Thanks,<br><b>-Rajesh</b><br></div></div></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Feb 26, 2025 at 10:25 AM Rashi Agarwal <<a href="mailto:Rashi.Agarwal@mobileum.com">Rashi.Agarwal@mobileum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-27402858988659225">
<div lang="EN-IN" style="overflow-wrap: break-word;">
<div class="m_-27402858988659225WordSection1">
<p><strong><span style="font-family:Calibri,sans-serif;font-weight:normal">Hi DPDK Community,<u></u><u></u></span></strong></p>
<p>I am facing an issue where <strong><span style="font-family:Calibri,sans-serif">CPU affinity is not working as expected in RHEL8</span></strong> with DPDK 20.05, while it works fine in RHEL7.<u></u><u></u></p>
<p class="MsoNormal"><b>Problem Statement:<u></u><u></u></b></p>
<p class="MsoNormal"><span> </span><span style="font-family:Symbol">·</span><span> When running my
program with </span><span style="font-size:10pt;font-family:"Courier New"">numactl -C4,5 ./testRTE</span><span> on
<b>RHEL7</b>, the worker threads correctly bind to the assigned cores.<u></u><u></u></span></p>
<p class="MsoNormal"><span>
</span><span style="font-family:Symbol">·</span><span> However, on
<b>RHEL8</b>, the worker threads always bind to <b>core 1</b>, ignoring the specified CPU set.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:36pt"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><b>Environment Details:<u></u><u></u></b></p>
<ul type="disc">
<li class="MsoNormal">
<b><span>DPDK Version:</span></b><span> 20.05.0<u></u><u></u></span></li><li class="MsoNormal">
<b><span>OS:</span></b><span> RHEL8 (Issue) | RHEL7 (Works Fine)<u></u><u></u></span></li><li class="MsoNormal">
<b><span>CPU Affinity Tool:</span></b><span>
</span><span style="font-size:10pt;font-family:"Courier New"">numactl -C</span><span><u></u><u></u></span></li></ul>
<p class="MsoNormal"><b>Sample Program: </b>Attached<u></u><u></u></p>
<p class="MsoNormal"><b>Observations:<u></u><u></u></b></p>
<ul type="disc">
<li class="MsoNormal">
<span>In <b>RHEL7</b>, worker threads correctly bind to cores specified using
</span><span style="font-size:10pt;font-family:"Courier New"">numactl -C</span><span>.<u></u><u></u></span></li><li class="MsoNormal">
<span>In <b>RHEL8</b>, the threads always bind to
<b>core 1</b>, ignoring the CPU set.<u></u><u></u></span></li><li class="MsoNormal">
<span>Could DPDK be overriding the CPU affinity in RHEL8?<u></u><u></u></span></li></ul>
<p class="MsoNormal"><b>Questions:<u></u><u></u></b></p>
<ol start="1" type="1">
<li class="MsoNormal">
<span>Is there any known change in CPU affinity handling between RHEL7 and RHEL8 affecting DPDK?<u></u><u></u></span></li><li class="MsoNormal">
<span>Does DPDK override thread affinity when
</span><span style="font-size:10pt;font-family:"Courier New"">rte_eal_init()</span><span> is called?<u></u><u></u></span></li><li class="MsoNormal">
<span>Is there any workaround or EAL flag to ensure that CPU affinity is respected?<u></u><u></u></span></li></ol>
<p class="MsoNormal"><span>Any insights or suggestions would be greatly appreciated.<u></u><u></u></span></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Rashi Agarwal.<u></u><u></u></p>
</div>
</div>
</div></blockquote></div>