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 C5656A0032; Wed, 11 May 2022 09:37:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B88D54111B; Wed, 11 May 2022 09:37:05 +0200 (CEST) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by mails.dpdk.org (Postfix) with ESMTP id 88FCE40042 for ; Wed, 11 May 2022 09:37:04 +0200 (CEST) Received: by mail-yb1-f175.google.com with SMTP id r11so2351205ybg.6 for ; Wed, 11 May 2022 00:37:04 -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=xPLHLCTPAjPJr9S3OSo5rU3MzPhRljM++XZfughp+jk=; b=XD9Dq8AoONvGKQxnYlk5HPn37wx4KbAuQXN8m1nsLe7ku4fdJ6YurSvjk7tRSRUp2P xAqzx4IEMsjvQAKArSY5nIvmtmtMNNV76rpAg/IvBfdMcVgH+hnUxsa89npV96Enq5sO kWVRWUV3/pZFqIYWZlpfusJ3ZIGv75iJrP77ORejfs9IIfCMr1vACINzVb+W3NFbiReU OO+vNea3eo/oGjdGK84TmxFSCozK/XxZy/k2WAt9jEomo2dGG3fMuPoNrQJ8Pyklq7eU IlYQeFIpMQDuyHbVOID/+XQe10V8xInpXZvXCuMlDdS7td568aSrmCTZzb5oU6bWVh33 0gkw== 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=xPLHLCTPAjPJr9S3OSo5rU3MzPhRljM++XZfughp+jk=; b=Wfg384U+b93F3lljvP9BjV/LeLfSo68AwKyYNCQbKEm8ll/tozZlL9K3mneQSyAKGi LpoEEmBeMlKHEs/peJvDTgCxEVim+4PuwENWGHEYhkScfZPiDtu7DBFWfCGzrR23rkh3 oQ10GL9vFMttqA7e9KNd1PlZytetAM9a7gPIhTPbvpzMtm2KxvvvhcndD1zsNevOUGhT RfY0JvZ+szssST7cuqr4s/2N5sUw7sCIw6eB1PNcx32Fh55WyA4LSdd2Za5wib+u9QKy DMEdXfiH/KEYHfEUtFEaL5PXKSGvlxGJVIvpsRVSBfgOT6XYCSVAyXB8Hnme2X5nZ+bQ ItIg== X-Gm-Message-State: AOAM5315+cuXL5aykItGAOl1VEwcH9G+dZ8Cc58hcqgi3fuJ8yiDX8t8 gKNbWtE2Cou5C1kKQkitdnk5iRVRjEamzuEsyxK5 X-Google-Smtp-Source: ABdhPJxBcT/8kybSbUpu+pOhEAwW8GCQ6tglH/newSYHAdcq/2MmigU1tLMoFS1C6IHcaWUUTNN86FYyh6jxeiEUTsw= X-Received: by 2002:a25:8043:0:b0:648:51c2:8a69 with SMTP id a3-20020a258043000000b0064851c28a69mr22081513ybn.10.1652254623811; Wed, 11 May 2022 00:37:03 -0700 (PDT) MIME-Version: 1.0 References: <3710E2E2-5CCC-41F3-A12A-E8B6A884CC40@arista.com> <5574950.QJadu78ljV@thomas> <20220504104833.5e021a12@shemminger-XPS-13-9360> <20220510130238.1a4290ab@hermes.local> In-Reply-To: <20220510130238.1a4290ab@hermes.local> From: Subendu Santra Date: Wed, 11 May 2022 13:06:47 +0530 Message-ID: Subject: Re: [dpdk-dev] [PATCH v3 6/7] app/proc-info: provide way to request info on owned ports To: Stephen Hemminger Cc: Thomas Monjalon , dev@dpdk.org, hemant.agrawal@nxp.com, maryam.tahhan@intel.com, reshma.pattan@intel.com, Sriram Rajagopalan 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 Agreed. I will change it to uint64_t and send it for review. Thanks for your help. Regards, Subendu. On Wed, May 11, 2022 at 1:32 AM Stephen Hemminger wrote: > > On Tue, 10 May 2022 14:39:05 +0530 > Subendu Santra wrote: > > > Hi Stephen, Thomas, > > > > On a related note w.r.to commit 1dd6cffb6571f816d5a0d1fd620f43532240b40= b > > (app/procinfo: provide way to request info on owned ports), we see this > > change: > > > > -static uint32_t enabled_port_mask; > > > +static unsigned long enabled_port_mask; > > > > > > While this is ok for 64-bit machines, where unsigned long is 64-bit, on > > 32-bit machines unsigned long is 32-bits. > > Should we change this to unsigned long long which is guaranteed to be > > 64-bits on both architectures? > > > > Specifying a mask of 0xffffffffffffffff on 32-bit platforms results in > > error: > > > > > + sudo /usr/share/dpdk/tools/dpdk-procinfo -- --show-port -p > > > 0xffffffffffffffff > > > Invalid portmask '0xffffffffffffffff' > > > > > > We have a script that runs periodically and it uses the dpdk-procinfo t= ool > > to collect information about the ports. > > It will be ideal to use the same portmask in the script irrespective of= the > > platform it runs on. > > > > Kindly share your thoughts on this. > > > > Regards, > > Subendu. > > > > > > > > On Wed, May 4, 2022 at 11:18 PM Stephen Hemminger < > > stephen@networkplumber.org> wrote: > > > > > On Tue, 03 May 2022 10:47:58 +0200 > > > Thomas Monjalon wrote: > > > > > > > 24/04/2022 07:34, Subendu Santra: > > > > > Hi Stephen, > > > > > > > > > > We were going through the patch set: > > > https://inbox.dpdk.org/dev/20200715212228.28010-7-stephen@networkplum= ber.org/ > > > and hoping to get clarification on the behaviour if post mask is not > > > specified in the input to `dpdk-proc-info` tool. > > > > > > > > > > Specifically, In PATCH v3 6/7, we see this: > > > > > + /* If no port mask was specified, one will be provided */ > > > > > + if (enabled_port_mask =3D=3D 0) { > > > > > + RTE_ETH_FOREACH_DEV(i) { > > > > > + enabled_port_mask |=3D 1u << i; > > > > > > > > > > However, in PATCH v4 8/8, we see this: > > > > > + /* If no port mask was specified, then show non-owned ports *= / > > > > > + if (enabled_port_mask =3D=3D 0) { > > > > > + RTE_ETH_FOREACH_DEV(i) > > > > > + enabled_port_mask =3D 1ul << i; > > > > > + } > > > > > > > > > > Was there any specific reason to show just the last non-owned por= t in > > > case the port mask was not specified? > > > > > Should we show all non-owned ports in case the user doesn=E2=80= =99t specify > > > any port mask? > > > > > > > > It looks like a bug. It should be |=3D > > > > Feel free to send a fix. > > > > > > > > > > > > > > Agree. Thats a bug. > > > > > > It would be good to have a "show all ports" flag to proc-info. > > > To show all ports including owned. > > > > > Using uint64_t is better, but eventually many DPDK utilities need to be > fixed to handle > 64 ports.