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 1AE71A0542; Mon, 6 Jun 2022 16:20:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C37E41181; Mon, 6 Jun 2022 16:20:31 +0200 (CEST) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by mails.dpdk.org (Postfix) with ESMTP id 726F2406B4 for ; Mon, 6 Jun 2022 16:20:30 +0200 (CEST) Received: by mail-yb1-f180.google.com with SMTP id g4so25893045ybf.12 for ; Mon, 06 Jun 2022 07:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gCNG11XDvCzYC5xtHdEAXi9XV8tdSjFfdSCtH46SziE=; b=FvuP0CU2P3pObN1yEevkpq8U4qDRgDEIhWecx1ryfDCjxlD/CYeqIkPOdMSoEpPzTK vFLBcjmldaRi1bl3Yj/9obARehQlNC6ihh2wCsAsxoY0swXisXT+dHkTPW89EopBWGWJ BCwm8OBcrvQ9VHsROkfqKWZ90WdJgbII4KZtdBTWyvoWIUa9RjM0cMTx5WhqALlx8EsP B/wWPxgayuGc8SZexyP6e6zXqCOmPF6tIP+/ve3zO9GrtotH3SxSPgb13Qhww/Q2upN6 wxCm0nP4Ly3B77+olTVNoiUWpmQDZprsaPPa7qajAZ1KTT8k9X5JNSSeO2dN62K9oYM3 xjVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gCNG11XDvCzYC5xtHdEAXi9XV8tdSjFfdSCtH46SziE=; b=ZEjF/it9OYYBPXcdOiajG3aGKjpagzxdgI2/wFqSrMC9Dmzs31jMkCO4b+pbMAOPvL Gik5YULqIio1zaSb/PfizDSqduHByC26bBFQRMcHW3WrcJiIxNT3KqvhdQpIOosSW3/F Lc6a+X9v9SKKbwa3MHdVXkIiaUY1QtdAhFoTf3kVbCUJmBZCDx/i2RdaICEJobrUMGOB FSzbk2EuMuOfPvEWH1CcIL6q4fsYkdoxt86dx3XEu7iPBjiy3Q5uDJx3E/JlJD8JGQHe WRJ5g8bhhAdGhHQ5NLblUkHIiGuxQCzmvcRlmJD0RfY9rGXxiGNHAxDjCyrE+WDG4jKQ dowQ== X-Gm-Message-State: AOAM533MKfA6fnSu8hxoRu0v65hkMcjJG2NrtICVNgXGBAHY1KI3ERqP RWUGvoDPHvyCMbhZ9eLgDEWRXqggDFeC+NXW1FqF X-Google-Smtp-Source: ABdhPJyB7NuMWKDgZqMtF71F+YSgFF+Rty7lshMz+SDdAxaZECmFXiMVJ4jIZVLqKX8gyHOX3yBA5QX2d2JbHLi/svo= X-Received: by 2002:a25:2ac8:0:b0:65d:34f3:d52b with SMTP id q191-20020a252ac8000000b0065d34f3d52bmr25460792ybq.198.1654525229716; Mon, 06 Jun 2022 07:20:29 -0700 (PDT) MIME-Version: 1.0 References: <20220525054604.16161-1-subendu@arista.com> <20220524230405.5e21cfc8@hermes.local> <98CBD80474FA8B44BF855DF32C47DC35D870AD@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D870AD@smartserver.smartshare.dk> From: Subendu Santra Date: Mon, 6 Jun 2022 19:50:13 +0530 Message-ID: Subject: Re: [PATCH v2] app/procinfo: show all non-owned ports To: Thomas Monjalon Cc: Stephen Hemminger , Maryam Tahhan , Reshma Pattan , Hemant Agrawal , dev@dpdk.org, =?UTF-8?Q?Morten_Br=C3=B8rup?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Thomas, How does this patch look? Is there anything that needs to be done from my s= ide? Regards, Subendu. On Wed, May 25, 2022 at 12:44 PM Morten Br=C3=B8rup wrote: > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > Sent: Wednesday, 25 May 2022 08.04 > > > > 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 =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); > > > > Ok, looks good. parens on that line are unnecessary > > > > Note: this still will have issues with >32 ports on 32 bit platforms. > > The default max_ethports value in meson_options.txt is 32, so the probabi= lity is low. > > > But other tools probably have same problem. > > 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. > > However, as Stephen also mentions, this is not unique to this tool, so we= 'll just ignore it. > > > > > Acked-by: Stephen Hemminger > > Acked-by: Morten Br=C3=B8rup >