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 AB0DC41C7D; Sun, 12 Feb 2023 20:44:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4460B40E09; Sun, 12 Feb 2023 20:44:19 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 26C2F400D7 for ; Sun, 12 Feb 2023 20:44:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676231058; x=1707767058; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=dwpdixbiBbEVnN6W/TwtwlPIAb9Brij11+kny9diqZM=; b=Gb/isgtKsNi9kA8TmUMrz2ucBRtxJzgOwMUjNXYTsZqV6EIoOoZQ8Apf +KaUGZPdgodQvfYQSwjtAvnMTGZFzi/FW/vDKWIVmhx8zDctQMlUqOWn1 LE31BgJBAy80WAo1cc2Al/qNi363Nb+YriwHP1yMZVgpdza8ap7WDzz5r FXeEqqtTQqUsMsJzt7oWZbl4vgz/Su/G+/bxWa4URulxa5GwQKgtAyZOc WfMcEI0L+xeu+GLT75wEr+WVDJY3xJPEXpy1npadf+D5n2fYZVgh1SIQ8 OKnGoFHNS8dIp41WjkOFci2sL2G01ZCDAi+7H/P8HIpDJFyHAB+8ArAbL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="332058784" X-IronPort-AV: E=Sophos;i="5.97,291,1669104000"; d="scan'208";a="332058784" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2023 11:44:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="668598739" X-IronPort-AV: E=Sophos;i="5.97,291,1669104000"; d="scan'208";a="668598739" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 12 Feb 2023 11:44:16 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.16; Sun, 12 Feb 2023 11:44:16 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sun, 12 Feb 2023 11:44:15 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Sun, 12 Feb 2023 11:44:15 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.48) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Sun, 12 Feb 2023 11:44:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i9avbpGNU1hYQ0ZCb+hibvp63M3J8sAhXcfTiKbr1U5XmqMk+Yyf/Mx/u0wIsRuOVZjMEwTFkeIAiDZ/cI0KcLgFvjqNwoyiqMRvwHyFb7oxbWOzBreFtUHsfu/V2/x6FoIetF+eisXPVZk5a/0jGf1aAiy5FltVNZ6mlNrOUDpPs5s4BuLsvSnT8wiWBBIcqm3GpwIj58KJsSupaoL9S+DWqLkMHjYEeJ1bTnIdeVOtQF9nPVIKOBx99kDqm9pyDoNT+Yoiy2WJTFntICMJmAFz63IaO+y5QzsMCRDwDEa5bUAPy3vxjqE97DuUHii1cojas1ttmeNCETL7208EMA== 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=ip3zO8B7MLnCGLsJqdT3Gy4sqrGQZHK5T8abVVLIrio=; b=a4ASe0tGbVT5yEQPajYxIbcxZ1O5lKdxSCEOfqlPSPh/WZoTd/4Tj7YZed0Ri+r29Us8ynoWUhIZha994LzfbiQMqi4ikmapw24WTe37HXx+A+hA3lHhmzQVyRcL1ZeNADvPFZwMgPVRnmwyOKyn54sdWe1jldCt2yhBWLkuRk55/xy+MH5U47kvzbPqV+jHebJpZNM71hsQq4h3PifHsbRNCaPx8L/UYnF2Oqd7SMD7otOkCYArs76WRweSIFyXZ3guROrQGf/FEvA/FPdAydyKQO3IPy/HUUDLjv0FgaR2s7Q++hpoDdH2V7Cz1R+jxfmzSAG67Nri5cFh3T/58Q== 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 DM4PR11MB7279.namprd11.prod.outlook.com (2603:10b6:8:109::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23; Sun, 12 Feb 2023 19:44:08 +0000 Received: from BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::83a5:d291:ab75:23fc]) by BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::83a5:d291:ab75:23fc%5]) with mapi id 15.20.6086.022; Sun, 12 Feb 2023 19:43:48 +0000 From: "Sevincer, Abdullah" To: Stephen Hemminger CC: "dev@dpdk.org" , "jerinj@marvell.com" Subject: RE: [PATCH v3] app/procinfo: display eventdev xstats for PMD data Thread-Topic: [PATCH v3] app/procinfo: display eventdev xstats for PMD data Thread-Index: AQHZOn+AbSZEmyGHgk+iQG5PBgS0gq7Cn4SAgAkeQ7A= Date: Sun, 12 Feb 2023 19:43:47 +0000 Message-ID: References: <20220409153056.1010236-1-timothy.mcdaniel@intel.com> <20230206230505.3029148-1-abdullah.sevincer@intel.com> <20230206162227.2a8234c3@hermes.local> In-Reply-To: <20230206162227.2a8234c3@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_|DM4PR11MB7279:EE_ x-ms-office365-filtering-correlation-id: 2573d332-ea22-4831-9c11-08db0d317543 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oIuTK5SzsJxP/Kf3FhiWEuWhnRrkLAR5Tt5QcbsS5qwhHh6FtRxyjXUR/Ezmbdo7v12YvmRKmYtyLDGjx3HyJUZAOIhngpU+2Fh1fRfpqt8PQbdSTokDxIF11QLFjNHpj7OOU3hBJT3n/RkCdodF8GLRZPtZCgF1HSKvzLDN36oFN/+JZhBAGrS9hyK/8PV0upd9kpzeuhB9NNCe2Pq0UCQmNSSBkahEGtTYw2/WjFpb5v6Zr4AA25FJodemeY3Op3xG1XQjXfRTGrGK6HNj2ISjHl6WcGVzp2+m9jnNz4XtAL6aRvLI0giNz12pKfCIAFEejNglDD8zemuLUrkRWx5+gBXAYrlCIv5L7KPQXaizKtw0wl2LGvSDCj5/tF8e3e0LnEQh9a+vej+ewndi6hCqKMwXGhhWlNYEIz/o3FQ1UR8t2AjUzb1zu8rjv+PYbwh8upDdedMgNF6i1+jWz9q6jNw2extGmSq/OJijuK3DonX/2C130zhy5Dh8Id6Mg3GFd8if5fsT51cdkY3N4sxRKq6Z5qMPD1FxEVB4H0mmh4GvKK8VWy3fSISp/iFj/sulY65/bgNztNqk6v3/vXJtqvMJm1/c81f2hM+0lePnXYga9WqBSM4PcIpW5WshqGzBcGO/bYUL72pza0xcRernITs/vlImAzGQ13LCrL/I3aAYQ8jFui+IR/vcXk/FV0WT3HvhB3oA89Lp8BtgiYfMf51k6ZTL8WxLDN6EWT0= 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:(13230025)(39860400002)(366004)(346002)(396003)(136003)(376002)(451199018)(316002)(38070700005)(83380400001)(33656002)(4326008)(6916009)(66556008)(64756008)(66446008)(76116006)(66476007)(66946007)(8676002)(55016003)(2906002)(71200400001)(8936002)(38100700002)(52536014)(7696005)(82960400001)(478600001)(86362001)(5660300002)(122000001)(53546011)(54906003)(6506007)(41300700001)(9686003)(26005)(186003)(181643002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qSSTmNW5VQ5UPT3+bvKflKbmHgR5rXGH4MTespHO5W1aBLGj07sDnaYRddKe?= =?us-ascii?Q?ndUH/nejplL8mepP6gl2TR0shNOTw2XiJt/FV0wawcXsFLoG3gtesO9er9LJ?= =?us-ascii?Q?j7cI1GWTaXRxzD8JHZzAOh2Bgx6kB3pwFEX06n3zzXG6o/niWYEUJQS4aOU/?= =?us-ascii?Q?1xOAP6TqkyIot8LnZl38GzLk1Nn1HvbC15L6PZzHQ98zOQU+4mvQ8LO447Rg?= =?us-ascii?Q?mFHICIKf2p66VKoU86hD49UtuUVZZL+zti9QtNdVbKGMsHkuPr62IRF+FFkv?= =?us-ascii?Q?EMmq3eu1AkHUWlxFFOq74YFFjp7Gl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ii?Q?P4FyPagI46lI5sKXgMkJlnGWCosyeeD5vJSwF6jtrmjX2yXyeJ9pdrIhhiir?= =?us-ascii?Q?/bG0hRgjed2MQZYHt7wXOUdeNtY6Kr8XSzSbTjHkRrCBnG7uRzKMhC522kcJ?= =?us-ascii?Q?cekaI9lAvOZ7ICYDq1o2IbjZgmuZO+OwkdLXzPIY6UzaMoLXXxdb0Ursq/ZA?= =?us-ascii?Q?DtJI1MhzD3xWMx8sfeHtW1VqvQLcmACW3vvJXbOOfl+lQ3Zy42Zgr8JUQSav?= =?us-ascii?Q?ADQ25z/RdB2S66TxXDsFPidn8ZrevUHehhUo0D1FIB2rucRX4j/7nGXEClL/?= =?us-ascii?Q?vNiSuaSyRLB4ZqdFzIVq8hvRFkwahRugqzBwlWTPqwROeGDzg/rJfnpzNICZ?= =?us-ascii?Q?5wwqDBaKjGEsLgb7c9R732Ex4kzJAAOdXWgdCsnEbBEGOl2A8zTH8VrxUpts?= =?us-ascii?Q?qQ=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: 2573d332-ea22-4831-9c11-08db0d317543 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Feb 2023 19:43:47.4355 (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: LxTNQ6O6so8/rfcPQyfrIPHjFgTz+N7eDuwfC9CjGLsbcGvRBcK1qfYfs42z8oy2Ph/BMN9hlHnJPhUSc+TmDEKcDwi0F/RXsSWEV1kqZt8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7279 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 Thanks Stephen, I will remove extra line there. Instead malloc using of calloc is required or just suggestion?=20 I can see allocation is done in same way with malloc in lib\eventdev\rte_ev= entdev.c (reference to eventdev_build_telemetry_data function). I will keep malloc as it is if there is no opposition. Thanks, Abdullah. -----Original Message----- From: Stephen Hemminger =20 Sent: Monday, February 6, 2023 4:22 PM To: Sevincer, Abdullah Cc: dev@dpdk.org; jerinj@marvell.com Subject: Re: [PATCH v3] app/procinfo: display eventdev xstats for PMD data On Mon, 6 Feb 2023 17:05:05 -0600 Abdullah Sevincer wrote: > + > + size =3D (unsigned int)ret; /* number of names */ > + > + /* Get memory to hold stat names, IDs, and values */ > + > + xstats_names =3D malloc(sizeof(struct rte_event_dev_xstats_name) * size= ); > + ids =3D malloc(sizeof(unsigned int) * size); > + > + > + if (!xstats_names || !ids) > + rte_panic("unable to alloc memory for stats retrieval\n"); You might want to use calloc() here. Seems like lots of extra blank lines.