From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E583CA055E;
	Sun, 26 Jun 2022 17:26:28 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 815CE41144;
	Sun, 26 Jun 2022 17:26:28 +0200 (CEST)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com
 [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id A7AE241141
 for <dev@dpdk.org>; Sun, 26 Jun 2022 17:26:26 +0200 (CEST)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id 0C24B32008FD;
 Sun, 26 Jun 2022 11:26:24 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Sun, 26 Jun 2022 11:26:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm2; t=1656257184; x=
 1656343584; bh=2Jqw67ukgUxtTwyErQt1zx+zxWzrNofsYCca6tXM0VY=; b=A
 d/OFD94dNG0Xmo7J9IjXf1iWhnaY4RjTI5MwjQdeATXF79U7k6XNXLL23xAz0nVh
 1+6+KeIjtHfn7+FNMJsUmghnBwkvib+JvogywcgQuDAWAZ3lQ+Vep0ZB4/+df3i+
 fSmPiNKBW10pSordyDCTKKhBTbecWxietzpQHXWKJ54/AhowNx1UEfKtBPWIKFTs
 U8L6Umj/gYo/f3T612EOmK76j28XH48QY3oqAx7pFW6NrfyUtjDwEKJFoZUQOzy8
 427QxyRcObvLXqQd4CmlMYKnnybWK/snrxu//isYj7ZciRevhleLYIAbzx3BiQN+
 OrXCCLAsyA8Dw+Ej7sRsw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1656257184; x=
 1656343584; bh=2Jqw67ukgUxtTwyErQt1zx+zxWzrNofsYCca6tXM0VY=; b=K
 XmYIp5JTqXHa4lsuvAkkhIaW+kmngN3Cykfe9pzLO3nq18Qk2tewMBbtZAtTfem3
 dYIwcdXobBR2eMCjX/OhIisDYrZMrdVqo2fzK37ba8f+z7vu/WaY3RdL5/VQ/0QZ
 shlla9EYqmFbUZ+vZYQowpGbhGqMzru8kLDms2c5BzRBHM2ccqwGICNCLILHtf5N
 EHk6J+PhdgVt6sT0q/vyk1D+TMXdouW99p2PvLyaLeO6m+i6VtgANLmxJ53Y/wGT
 rZZTbcRZh0waGtXCQL9MqDUFxkx0YRkzeelpUKfM8/2QokALVU/Y9CIdus1GkShC
 wFnWGNqhpukvAAf2JPTqA==
X-ME-Sender: <xms:oHq4YradEdUZsA2_hE-k7IqZRFJ2ERaV-jHcihnxVQscGBlj80tDcA>
 <xme:oHq4YqbG7wty8WhDOQYeuiiLexcZJ2tINroZAWEK0Ct0DcQgcg9HYDsZwjzNJsWHK
 eVs8imfLXzxx-3hMA>
X-ME-Received: <xmr:oHq4Yt8Q-Y3Chu3ft7ZQoibDH4DgjmMK1gjdhmkYW4PQtmzT1qV9tLvJazOFTU3Y--Q6KfZ28ceN4icrBdX2ftOGBA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudegfedgkeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu
 vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:oHq4Yhr1q2yfjO1p1NsYjpUOcr-hlbRVTAnMdgEcupMo-0K5JvVLRw>
 <xmx:oHq4Ymp8qH_DSciKQyVf0F_mRHIS8KTE8DjgeyTds9AOki7EsKDFyA>
 <xmx:oHq4YnTRItkiJJzh0UJ5XJd3eLazz0ClGvSvAt3FkES0y-SOyuRYog>
 <xmx:oHq4YjB7Vsvh0y8hR7uxnrYxPUHYq6aqJjC8i76eG-eTm2oSFQWJxQ>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 26 Jun 2022 11:26:23 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Subendu Santra <subendu@arista.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Maryam Tahhan <maryam.tahhan@intel.com>,
 Reshma Pattan <reshma.pattan@intel.com>,
 Hemant Agrawal <hemant.agrawal@nxp.com>, dev@dpdk.org,
 Morten =?ISO-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com>
Subject: Re: [PATCH v2] app/procinfo: show all non-owned ports
Date: Sun, 26 Jun 2022 17:26:21 +0200
Message-ID: <4535710.0oRPG1VZx4@thomas>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D870AD@smartserver.smartshare.dk>
References: <20220525054604.16161-1-subendu@arista.com>
 <20220524230405.5e21cfc8@hermes.local>
 <98CBD80474FA8B44BF855DF32C47DC35D870AD@smartserver.smartshare.dk>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

25/05/2022 09:14, Morten Br=F8rup:
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Wednesday, 25 May 2022 08.04
> >=20
> > On Tue, 24 May 2022 22:46:05 -0700
> > Subendu Santra <subendu@arista.com> wrote:
> >=20
> > > Show all non-owned ports when no port mask is specified
> > >
> > > show-port option without the mask option, displays only the last
> > > non-owned port. Show all the non-owned ports instead.

I think it is easier to understand if using past tense
for the previous behaviour. I reword it like this:

    The show-port option, without the mask option,
    was showing only the last non-owned port.
    Show all the non-owned ports instead.


> > > Fixes: 1dd6cffb6571 ("app/procinfo: provide way to request info on
> > owned
> > > ports")
> > > Cc: stephen@networkplumber.org

+   Cc: stable@dpdk.org

> > >
> > > Signed-off-by: Subendu Santra <subendu@arista.com>
> > > ---
> > >  app/proc-info/main.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/app/proc-info/main.c b/app/proc-info/main.c
> > > index 56070a3317..2be24b584e 100644
> > > --- a/app/proc-info/main.c
> > > +++ b/app/proc-info/main.c
> > > @@ -1504,10 +1504,10 @@ main(int argc, char **argv)
> > >  	if (nb_ports =3D=3D 0)
> > >  		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
> > >
> > > -	/* If no port mask was specified, then show non-owned ports */
> > > +	/* If no port mask was specified, then show all non-owned ports
> > */
> > >  	if (enabled_port_mask =3D=3D 0) {
> > >  		RTE_ETH_FOREACH_DEV(i)
> > > -			enabled_port_mask =3D 1ul << i;
> > > +			enabled_port_mask |=3D (1ul << i);
> >=20
> > Ok, looks good. parens on that line are unnecessary

parens removed

> >=20
> > Note: this still will have issues with >32 ports on 32 bit platforms.
>=20
> The default max_ethports value in meson_options.txt is 32, so the probabi=
lity is low.
>=20
> > But other tools probably have same problem.
>=20
> It was decided many years ago to extend the port_id type from uint8_t to =
uint16_t, mainly to support a high number of virtual ports. So it is not go=
od that the applications have not been updated accordingly.
>=20
> However, as Stephen also mentions, this is not unique to this tool, so we=
'll just ignore it.
>=20
> >=20
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
>=20
> Acked-by: Morten Br=F8rup <mb@smartsharesystems.com>

Applied with small changes, thanks.