<div dir="ltr">Hi Stephen, Thomas,<div><br></div><div>On a related note <a href="http://w.r.to" target="_blank">w.r.to</a> commit 1dd6cffb6571f816d5a0d1fd620f43532240b40b (app/procinfo: provide way to request info on owned ports), we see this change:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">-static uint32_t enabled_port_mask;<br></font><font face="monospace">+static unsigned long enabled_port_mask;</font></blockquote><div><br></div><div>While this is ok for 64-bit machines, where <font face="monospace">unsigned long</font> is 64-bit, on 32-bit machines <font face="monospace">unsigned long</font> is 32-bits.</div><div>Should we change this to <font face="monospace">unsigned long long</font> which is guaranteed to be 64-bits on both architectures?</div><div><br></div><div>Specifying a mask of <font face="monospace">0xffffffffffffffff</font> on 32-bit platforms results in error:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(66,66,66);font-family:"Roboto Mono",monospace;font-size:12.8px;white-space:pre-wrap">+ sudo /usr/share/dpdk/tools/dpdk-procinfo -- --show-port -p 0xffffffffffffffff<br></span><span style="color:rgb(66,66,66);font-family:"Roboto Mono",monospace;font-size:12.8px;white-space:pre-wrap">Invalid portmask '0xffffffffffffffff'</span></blockquote><div><br></div><div>We have a script that runs periodically and it uses the dpdk-procinfo tool to collect information about the ports.</div><div>It will be ideal to use the same portmask in the script irrespective of the platform it runs on.</div><div><br></div><div>Kindly share your thoughts on this.</div><div><br></div><div><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Subendu.</div><div><br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 4, 2022 at 11:18 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</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">On Tue, 03 May 2022 10:47:58 +0200<br>
Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>> wrote:<br>
<br>
> 24/04/2022 07:34, Subendu Santra:<br>
> > Hi Stephen,<br>
> > <br>
> > We were going through the patch set: <a href="https://inbox.dpdk.org/dev/20200715212228.28010-7-stephen@networkplumber.org/" rel="noreferrer" target="_blank">https://inbox.dpdk.org/dev/20200715212228.28010-7-stephen@networkplumber.org/</a> and hoping to get clarification on the behaviour if post mask is not specified in the input to `dpdk-proc-info` tool.<br>
> > <br>
> > Specifically, In PATCH v3 6/7, we see this:<br>
> > + /* If no port mask was specified, one will be provided */<br>
> > + if (enabled_port_mask == 0) {<br>
> > + RTE_ETH_FOREACH_DEV(i) {<br>
> > + enabled_port_mask |= 1u << i;<br>
> > <br>
> > However, in PATCH v4 8/8, we see this:<br>
> > + /* If no port mask was specified, then show non-owned ports */<br>
> > + if (enabled_port_mask == 0) {<br>
> > + RTE_ETH_FOREACH_DEV(i)<br>
> > + enabled_port_mask = 1ul << i;<br>
> > + }<br>
> > <br>
> > Was there any specific reason to show just the last non-owned port in case the port mask was not specified?<br>
> > Should we show all non-owned ports in case the user doesn’t specify any port mask? <br>
> <br>
> It looks like a bug. It should be |=<br>
> Feel free to send a fix.<br>
> <br>
> <br>
<br>
Agree. Thats a bug.<br>
<br>
It would be good to have a "show all ports" flag to proc-info.<br>
To show all ports including owned.<br>
</blockquote></div>