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 AE52142B2F; Thu, 18 May 2023 01:30:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AB4740E25; Thu, 18 May 2023 01:30:07 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id F252F40698 for ; Thu, 18 May 2023 01:30:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684366205; x=1715902205; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3caqAVoQcBVDBQrYVrHskblpz8i4ELJ1JJerUMrlcQU=; b=E/1auolcchTheqCKEoLPgo/OWo1dloec/IjnDeo+CiVoEYREas6TSiP/ N4df2a/7hIH9ASH4ZuNXKTTgsyJvQL8ICO3wMzploaalszfkOhGZhBoQk 2o4jH/83ksMsUyEEWyI+xdLd21h+GcdpEAvw3jo8cAT0b/YNSva0NV/de zW0993xbPcIBrsXsHpN8OVdb8g1K7VZNrBS/5zWPwmtCXP5Pse7v2NXMq mC/h/Qz6E+GhoWQ25/YYEKRCC3EUngFq+1KfuyCIKg98Z+B0dDgOCzlJ2 zvm1XGMFnMxZ5aOiA4d9B5R6fCUboDESPHmBuErAJQ20L8JyKm+QiUoqL g==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="331519921" X-IronPort-AV: E=Sophos;i="5.99,283,1677571200"; d="scan'208";a="331519921" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 16:30:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="734864395" X-IronPort-AV: E=Sophos;i="5.99,283,1677571200"; d="scan'208";a="734864395" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP; 17 May 2023 16:30:03 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 17 May 2023 16:30:03 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 17 May 2023 16:30:02 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 17 May 2023 16:30:02 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 17 May 2023 16:30:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E5uAsTir37UZCt7IMCxHDIWeudHobzOxXAx8GFRoKQLbXX1gmwjCamER6yO3dePtqBVU1unkRG/9RML5PsRbUcT4oMn6aJbmV5UYle5tGT9qy3hdJ3fzPpsi8FgHO7Yc8T7qzNhhCsd7k1gco0p/HGmRAjeWlRwvyj8Lsq7VsK9fy8Er42QrtOSqsAqz4PHtL6w3yKBvTcHKnbZ04vPF+h1TZjiRMWVVdW3O5xaWa6SOplzkZ8pAmpsOnbIPAJTkLow81HxKFGVYc4aYFHw5+mjt6xoyuRU7AthvmTvXi+QEjRHrQzJPOHp7X822oIRr2x0oWB4g3C0AJ06FG6F6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZRxYTAgN+uDQv1XUnDWafJpYj4eg89XHu0unHVsMJp0=; b=mPpMrpuSZ68Ly/5YUnLM2kU99yAzzkGcjn4bQGnWvWuL+mMsTW+C+NAsJ0cvWPhUnI9n8altOWQm44Y1ST8zdDBQj5WLmkhVUsIg65abgpO5sb1nV8jj8wCRPb/byOnArTcMkh/oJ2hQ5mCcFVCE1HTA9xIH7fd25QGp8/WHXwnllJPic09nAG791CmTdGmWerxrEUMNsE2/RNzLkgmH8K8z/+ktN5+86qTcsZUVqfX1Q5Gv/YryCrcv+sAeRht3UN2nfaeVebr8cGkjePkayAxW6Dp4uN3ku23JOIXx0JwriJXXk6fn0SFF0Sk5wHAxP97RcTJnDg0ZYBNVQ4v6TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3158.namprd11.prod.outlook.com (2603:10b6:a03:1c::29) by PH7PR11MB7516.namprd11.prod.outlook.com (2603:10b6:510:275::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.33; Wed, 17 May 2023 23:30:00 +0000 Received: from BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::b1e1:5a1b:4b01:5f73]) by BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::b1e1:5a1b:4b01:5f73%6]) with mapi id 15.20.6387.033; Wed, 17 May 2023 23:30:00 +0000 From: "Sevincer, Abdullah" To: Stephen Hemminger CC: "dev@dpdk.org" , "jerinj@marvell.com" , "Pattan, Reshma" Subject: RE: [PATCH v14] app/procinfo: display eventdev xstats Thread-Topic: [PATCH v14] app/procinfo: display eventdev xstats Thread-Index: AQHZiRAs0HlDi/r3wk+GELYJMEJUv69fEIAAgAAKxOA= Date: Wed, 17 May 2023 23:30:00 +0000 Message-ID: References: <20230320022316.2298874-1-abdullah.sevincer@intel.com> <20230517223724.2417630-1-abdullah.sevincer@intel.com> <20230517154544.55c83121@hermes.local> In-Reply-To: <20230517154544.55c83121@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR11MB3158:EE_|PH7PR11MB7516:EE_ x-ms-office365-filtering-correlation-id: c1e69ed5-686a-4645-d7c4-08db572ea21d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jW9kAMzQrZmmWMPJrnsLAz1s1ESyEATFT+/tsN1//thtnn2A++JlArc561FpM6e9DEgyVp4qo7LS53NNeBgjpgXA96vSNAU/S+4h2C47IktqjQDpcttuLbaf5hUr7qimcPYpb7XSPAX3WxK9pk9ys8rWr6OULhqYKFwwgZL4WwE3yTnA4EgwcYMrzfxi5KzSnE+bHWr4/3vlurBXSu3oqx9QaRXTA4eqqym8FiqN1J5K4WXn352KSh14jPWoZnR8erpfcaVI4Z1QSPnqVxGq3BohA3u4Zell2d49LvujKdtKxjopYV0y0G0mQ0kPYTsJi7efw8Sn8UnxcNxdGS0aPDm7WYaM62iXTZQE9X8wvvxcuTuGYnRxkA/BIzkZv3Am/8F0OYXJ5tc6Qe9Wq9ItZAhxVg50YCUQ3Kh6y0UgRiGOF4TdqFMFvLWRmZAiQIIjl+Tzor030IAGxh2xI0T5dniqx3l3vqF/QgkzZTUlP2xuUzPUfGab869EnsLUmVmxneRDk5MIBCpfiDYX58s6Ww8hodukrE1HFI/eoD7EIzo3/I+/MxdjKADYSnZSsCtIiaRafuNyx4Myd+GvP3dGMIqMqKxNPcNjW6nTLJJZAxZ7p+6tXDbSQgxDJ8Nk9rOv x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3158.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(39860400002)(366004)(376002)(396003)(346002)(451199021)(4744005)(2906002)(41300700001)(54906003)(186003)(316002)(6916009)(4326008)(66946007)(64756008)(76116006)(66556008)(71200400001)(66476007)(66446008)(478600001)(107886003)(7696005)(52536014)(6506007)(5660300002)(26005)(8936002)(8676002)(9686003)(55016003)(38100700002)(82960400001)(38070700005)(33656002)(122000001)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rfd/OgmmvzYgl/+KN7v0wd2ypwbZZBpfkh28S+J0PTQRLNgn0Pey6liuZ/ka?= =?us-ascii?Q?h05LHG61elCyTmSlPOURCOUqs5rQ72UxCKdHMLDUDtzb+/nef/DuABN0IRVA?= =?us-ascii?Q?arJk7zFUmDKaFWUZgUDP5atvQPW/RIjpfNqE/Z+i5GzzObqWqU5vsmNGdvg6?= =?us-ascii?Q?3pJzzqoiw2wsTOCZuBboKt7mEUZcKGnkiiB8wk1C7sX//+gbSFMBB4GGaIH+?= =?us-ascii?Q?gXy0+8WHHt4ZOh3clTQ1gctiaQfjgDKj0HN3gUe2oOrqffFgRILRS7L2esOC?= =?us-ascii?Q?XQNP2C/FXIeRVB532SOsRTtz4+Hktmdiv5oItBwZGJyAAj+fEGtx57SDDViP?= =?us-ascii?Q?qLyLSJpJfn2S5IV779B38LSXAzbLZtgSMobB1a8aGNUCf7DPs9t/7L7NUcST?= =?us-ascii?Q?eJl9ebY4waw43Kio7oiMtubM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?= =?us-ascii?Q?cNnvKXc/fQ3uBo/In4+Z1xBYiQEcGI0en1F50R/v0y440AlqXUBoKCMW0dlp?= =?us-ascii?Q?j1LNfT+rIYb2u5SGUvLU8koeCqF/CZga3CLTE2b2FWtOo3t34YSTpKDFsSGn?= =?us-ascii?Q?IauxpZ7fr0QVB12aQXpZX9bHhsTDKhNlnUugFFaDRapizTKTzO0s6IrkQEEk?= =?us-ascii?Q?QZSL6mE5JiMgOh8nOC38RUkkI8HYfoZmBLxR3YVT8sLGfvsirWe2HCLQzQgN?= =?us-ascii?Q?usIRvPU8gyqqKMXkZ7LsKQhOhH136gdxkfcwMOsUmu1VSaFtgg/GzTGeRBrG?= =?us-ascii?Q?OQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1e69ed5-686a-4645-d7c4-08db572ea21d X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2023 23:30:00.2809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wKDVW3MLh2tmyqEQcsHekdHtRikzb/hA/yQr9RJmuwK3iBrH7OkORJ6hhfNcLsvlBLrcVumWJp1Tidl5AcPojoppkwjlvORKdy94+0o89QI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7516 X-OriginatorOrg: intel.com 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 > +The cast will cause truncation of large values, so this might be a nop. > +If you really want to check, then something like: > + unsigned long evdev_id; > + char *endp; > + evdev_id =3D strtoul(list, &endp, 0); > + if (!*list || !*endp || evdev_id >=3D RTE_EVENT_MAX_DEVS) { > + fprintf(stderr, "Invalid eventdev id: %s\n", list); > + return -EINVAL; > + } Thanks Stephen, you are right it will truncate large values, RTE_EVENT_MAX_= DEVS is 16, so I thought Uint8_t is enough to hold the id. I am not sure if we will have a large num= ber of evdevs, so ids. But your suggestion seems better I will change it.