From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C11D5A0548; Wed, 25 May 2022 08:04:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1F9D400EF; Wed, 25 May 2022 08:04:11 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 26C34400D6 for ; Wed, 25 May 2022 08:04:10 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id i1so17709978plg.7 for ; Tue, 24 May 2022 23:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OmZoOiKX8dIeUNYDN3SiuvXGg2rT+A1HDkI8lpG855A=; b=FIMR14Tf9ctlrAvkkg3Xxjgodffo9gAzFIfSFhp6NawhdTgbSIc9E4D5VTYPyiWyUI 9YoQesRaRUKH6P8TNpTC+CnDxkblMg612J2ctYjSvlrpNQH+G7dVSr/2MlJX0J/eTZIe qLKvmDSYS8R/t+0bDI3upVRlsDyBAX8Gy19Upl33WnZXulWG5dseFROmfhPmOKuvrnTy 9QOwU4ujuAO05R51oW6A6pZcLED3j4zu93CJ8c0H9uxYJBJmjyfsAm0i/iqCVqMb/SOZ bokibDww0ht2dH/HS0OqLkfzmHkECFyassIVGkdGZfx4eaGfuhVwUdv5jY1D3m5nSzdR DwDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OmZoOiKX8dIeUNYDN3SiuvXGg2rT+A1HDkI8lpG855A=; b=kp0ZZ1X/3C1ZHU+/gkeZA0TbSuuwA8R1pAL49aVT6nEoIiECxtUuuk1uOkKSeM/R7m wdcezFR5lp2q5KxCQvef1fm3HzU78V7rIkSDvubyO1GUqLQZlPciJ0wqplh9DdT1Ht/I A4qUma7q9hMHnOzOcgnB0qPttdL9lDpwZndnS9NMvcZBtnfds3ZVP3KIUH1OtX7HYXHM XPdzfMyS69iCvGc7nNMdi3nrY6IJqXUG+jtZerD7q1Tm8k0Gnp3PzL12gnVpxj8GEqd3 aCeOz/3mfFYrU8H3HgQgxc2couGUXveJ7SS+4gOv9q1WH68BKPMm9JF8fiw526dOrtqU t+4Q== X-Gm-Message-State: AOAM530uM6b0h/egXY8oaDcgNYfqZFQuRddinFt2+WQ4GC9SSmXnC+Jr F3p47wQYs64m+vI1FwiciVDazw== X-Google-Smtp-Source: ABdhPJyYZCeWjCRnLAhfPJluYNL9Jh+fC8lEOAotVAwX5m02qT1IDlMmV1eMb8+BGgR6t9ACgy9EDA== X-Received: by 2002:a17:90b:1a81:b0:1e0:3314:2447 with SMTP id ng1-20020a17090b1a8100b001e033142447mr8421109pjb.121.1653458649342; Tue, 24 May 2022 23:04:09 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id y6-20020a62ce06000000b005082a7fd144sm10509046pfg.3.2022.05.24.23.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 23:04:08 -0700 (PDT) Date: Tue, 24 May 2022 23:04:05 -0700 From: Stephen Hemminger To: Subendu Santra Cc: Maryam Tahhan , Reshma Pattan , Hemant Agrawal , dev@dpdk.org Subject: Re: [PATCH v2] app/procinfo: show all non-owned ports Message-ID: <20220524230405.5e21cfc8@hermes.local> In-Reply-To: <20220525054604.16161-1-subendu@arista.com> References: <20220525054604.16161-1-subendu@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 24 May 2022 22:46:05 -0700 Subendu Santra wrote: > 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. > > Fixes: 1dd6cffb6571 ("app/procinfo: provide way to request info on owned > ports") > Cc: stephen@networkplumber.org > > Signed-off-by: Subendu Santra > --- > 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 == 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 == 0) { > RTE_ETH_FOREACH_DEV(i) > - enabled_port_mask = 1ul << i; > + enabled_port_mask |= (1ul << i); Ok, looks good. parens on that line are unnecessary Note: this still will have issues with >32 ports on 32 bit platforms. But other tools probably have same problem. Acked-by: Stephen Hemminger