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 C93B2A0093; Tue, 10 May 2022 22:02:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 645DF410EE; Tue, 10 May 2022 22:02:44 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id C2D59406B4 for ; Tue, 10 May 2022 22:02:42 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d17so17755351plg.0 for ; Tue, 10 May 2022 13:02:42 -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=SPGhGbIU1wY+Op3ppItKcV2EOk2emQxTn4mjSbhBz/8=; b=wuV/j2AXA3ne2FhH2M9DcD2OD/mXajP8Em9eTolfMhPI2dssZWUjxYwGNN0i9jg96H C6jN70d7W6Od1rvAGo18Olxjo39p1Fux9PFDNuqaZk05D/b3Nzwwnqlxr/HP+Zz+aOfB B6jpSbYDN7mhwZW2JsI3QTK3DHDm06VzTRUwnV1S9VbvRCiuGXt+Ve+HkDwQFwHc6Y72 ZbgxhhEPb939t84sg5E4CudXDF9H3qMGyHPCVo1viQ+XUdaZjvZ/gv0ALl1vi/qs53Pp DGWrVMkKe4e2YQMZj6FFuDEkXtvBybf9AXZQIhsgLsK0ybeESs1C3w7YyFkYH2kxKo9n MMrA== 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=SPGhGbIU1wY+Op3ppItKcV2EOk2emQxTn4mjSbhBz/8=; b=yKCWVTcaFGBL6w/wV7zpTwRahtbB9bSNgD76NFwIm+YK82ugU8gR6Sr0JsHZIJudaW tIseAdyCsXWywesCzjKkosjSQd5Ck4JwHQSgiTeVQiKb0WXk57e2cKqVvBhT61Ay4VA2 k/hH8TW2D0n7sDoCN75edKgwo/AKGIamICRW2WiDIlzJCq1hMqJ6+MdMxBE/lylbY/iZ YV3PDp45YCfh74HiOWX82zqosKivjTYFoind/rdo0mmAuQdr3kHxaDxxTnp5SmH65cLh q/pt17VJQpRqPgbeus0E/8GpaTHo224tKlFctaSyWXRY5XvZ6ZBKOgxxRy3tUwW+wavr nHxg== X-Gm-Message-State: AOAM531f5pT73H2Zrb7Xpr3LDfGxJ5yve4JzJUZZchGoLXVMMq8f/EjB ac4FLkf4qcb6KfeMJuHgosU4oA== X-Google-Smtp-Source: ABdhPJyi56ilmB59IQBHhMALr63Ha3u4+wSOsOq+9qm2STmd2m6rgcDoqzm1tgA7OrxszgVzSpIhzg== X-Received: by 2002:a17:90a:9b0d:b0:1dc:e81d:6c18 with SMTP id f13-20020a17090a9b0d00b001dce81d6c18mr1552450pjp.72.1652212961693; Tue, 10 May 2022 13:02:41 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q6-20020a170902b10600b0015e9f45c1f4sm11755plr.186.2022.05.10.13.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 13:02:41 -0700 (PDT) Date: Tue, 10 May 2022 13:02:38 -0700 From: Stephen Hemminger To: Subendu Santra Cc: Thomas Monjalon , dev@dpdk.org, hemant.agrawal@nxp.com, maryam.tahhan@intel.com, reshma.pattan@intel.com, Sriram Rajagopalan Subject: Re: [dpdk-dev] [PATCH v3 6/7] app/proc-info: provide way to request info on owned ports Message-ID: <20220510130238.1a4290ab@hermes.local> In-Reply-To: References: <3710E2E2-5CCC-41F3-A12A-E8B6A884CC40@arista.com> <5574950.QJadu78ljV@thomas> <20220504104833.5e021a12@shemminger-XPS-13-9360> MIME-Version: 1.0 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 On Tue, 10 May 2022 14:39:05 +0530 Subendu Santra wrote: > Hi Stephen, Thomas, >=20 > On a related note w.r.to commit 1dd6cffb6571f816d5a0d1fd620f43532240b40b > (app/procinfo: provide way to request info on owned ports), we see this > change: >=20 > -static uint32_t enabled_port_mask; > > +static unsigned long enabled_port_mask; =20 >=20 >=20 > 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? >=20 > Specifying a mask of 0xffffffffffffffff on 32-bit platforms results in > error: >=20 > > + sudo /usr/share/dpdk/tools/dpdk-procinfo -- --show-port -p > > 0xffffffffffffffff > > Invalid portmask '0xffffffffffffffff' =20 >=20 >=20 > We have a script that runs periodically and it uses the dpdk-procinfo tool > to collect information about the ports. > It will be ideal to use the same portmask in the script irrespective of t= he > platform it runs on. >=20 > Kindly share your thoughts on this. >=20 > Regards, > Subendu. >=20 >=20 >=20 > On Wed, May 4, 2022 at 11:18 PM Stephen Hemminger < > stephen@networkplumber.org> wrote: =20 >=20 > > On Tue, 03 May 2022 10:47:58 +0200 > > Thomas Monjalon wrote: > > =20 > > > 24/04/2022 07:34, Subendu Santra: =20 > > > > Hi Stephen, > > > > > > > > We were going through the patch set: =20 > > https://inbox.dpdk.org/dev/20200715212228.28010-7-stephen@networkplumbe= r.org/ > > and hoping to get clarification on the behaviour if post mask is not > > specified in the input to `dpdk-proc-info` tool. =20 > > > > > > > > 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 port = in =20 > > case the port mask was not specified? =20 > > > > Should we show all non-owned ports in case the user doesn=E2=80=99t= specify =20 > > any port mask? =20 > > > > > > It looks like a bug. It should be |=3D > > > Feel free to send a fix. > > > > > > =20 > > > > Agree. Thats a bug. > > > > It would be good to have a "show all ports" flag to proc-info. > > To show all ports including owned. > > =20 Using uint64_t is better, but eventually many DPDK utilities need to be fixed to handle > 64 ports.