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 E6A5041EC0; Sat, 18 Mar 2023 19:49:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B15340691; Sat, 18 Mar 2023 19:49:39 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id C03E340151 for ; Sat, 18 Mar 2023 19:49:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679165377; x=1710701377; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7JmN00muxoQv1Pk5seHTqPrwUDURWB/vCR9+mC+n7ZY=; b=busEAs4HiuKPfOWA4/J4QvLkFk85OP5lk1xSNG4GL8ZUh6YxIrK69o11 0JLja07EXXqtg5o17KqLq7kLWex5rnRPlhjP4k3QWph5bI5OhJAq00YhC 901eU+H2feGdbPOfJ/dRrix1GzizzG8zAtzODgBJ4TkhR+BZKdF11SN/7 lWynoNU7PObVZZNlb8//ycha4qV5LfzrC0oGWoR+nRJs0zoN/sINyiAER V3VcRz9AGg7YfNHzg9iZJGWCeYZmDNDoAM/ZR94PcoLUvXJZhZ0C4mL3k a1gcpwxgkU7w1UefGV4TRnTiPzxnWJBe82NGbIJ2p9oOARbiSTQjiKgNo Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10653"; a="318109135" X-IronPort-AV: E=Sophos;i="5.98,272,1673942400"; d="scan'208";a="318109135" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2023 11:49:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10653"; a="926512138" X-IronPort-AV: E=Sophos;i="5.98,272,1673942400"; d="scan'208";a="926512138" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 18 Mar 2023 11:49:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Sat, 18 Mar 2023 11:49:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.21; Sat, 18 Mar 2023 11:49:35 -0700 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.21 via Frontend Transport; Sat, 18 Mar 2023 11:49:35 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.46) 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.21; Sat, 18 Mar 2023 11:49:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnJ/ZCwqBR2Z8E62rPHN0OjCfillzRC1LtvkYZ4jKpH16AqMrxl5ZmdS3pxEPA8MrmYUjtkvekwtw4DyekZol4Zeot/gV83zBF/B7SDkhHHIUtPWArTl/E9W3cJ6GBVjknbfplX9FQJQJ30UmspMnQ8hftFNy/OIA02eMS+6l5EDQrb6bqZ8yPtsY5zFIocnK6a9ZTbJilIXCCz6b8tF1TRdXfDPYefEc2bqsWSiODTPcgPLSBWVnzIVxyV/SErervYFswT79IcQB6HT4huX+DF33gdGSh1Pfs23vvMvWLvGDAi9JfwwEn2cFV36dGbdGvgn/K2fov6Sbva6ocggyQ== 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=gi62Xh4DzAlymhFJ9r8brOTCKic1CGdRDBY6ibnLdS8=; b=PcxgAk6NWcOkn1G51Mrz3q3yBPF10PmJXyx4960WDViR+QrVl3BzegCes2TB5xLA+HXaSFXt8Z0LKWua61OPmyBYbzShxTThKtA3LTLUmPJKUBJWvW3rLWttwcmnOOMHsGo+MzebsIgTzS9nqjGhGcLCljqiEnRFofQYLcGvWHBJMZp/eFVIN/YAETXFOEcmA93J06DGHwsXsByTenoG6x6iBTO3dz0gVNo2fItXrWkpAO31Q/9hsPmWbM1OyJaiHgh+WBfdggljqneknRS+SJldFw/JYvxRZIU+oA6jCy5ttVmmL+rEwNGnQ+9T51zUSubiPrlimGEe93SXd9cvMQ== 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 SJ0PR11MB5771.namprd11.prod.outlook.com (2603:10b6:a03:424::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.36; Sat, 18 Mar 2023 18:49:33 +0000 Received: from BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::2f9c:a84e:88c9:e857]) by BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::2f9c:a84e:88c9:e857%4]) with mapi id 15.20.6178.036; Sat, 18 Mar 2023 18:49:33 +0000 From: "Sevincer, Abdullah" To: "Pattan, Reshma" , "dev@dpdk.org" CC: "jerinj@marvell.com" Subject: RE: [PATCH v8] app/procinfo: display eventdev xstats Thread-Topic: [PATCH v8] app/procinfo: display eventdev xstats Thread-Index: AQHZUrg3x2OtsK/ntkOCg73WsT7QHq777jqAgAT/4RA= Date: Sat, 18 Mar 2023 18:49:32 +0000 Message-ID: References: <20230223010819.4164765-1-abdullah.sevincer@intel.com> <20230309185143.1006949-1-abdullah.sevincer@intel.com> In-Reply-To: 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_|SJ0PR11MB5771:EE_ x-ms-office365-filtering-correlation-id: 2a53532a-87ad-4f60-c59a-08db27e1837b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZUWKL5KOHwGzvcWqYaFYUZwawTsH6aySN1bbRb82g3iplUkKJdOVvKJ4Ojbxy5p7y4ggFdwKrKSnLg3EsdwqkwpBWv8SjzR6tk3B1Bf7N2xeuG30QMeqcgKk5KhfEOrGeTl0EQeQNjppZP99AygYWzZYiK7ZgOWWKcsRglBAzudgNbUR4m1dq06HReOPyMuOwFmdk2aBNt3qg/DLLhyxMyeI/8SJJVz0IV9TRMOaNP8bwvyBJlSAEc6MGPY1VNK6VWwMldIs8f5fczYTFeTWLuwxTZ25ybdgC7jDhmnh0oWfl0gKT5ElyQdCUkiR8zamCLb6GoHMkzMrleAFA/c5zwz2pjVkAf9gOJhSbS8DLgkEqAjkwmkD/ciyN28oGn0bYi84Q1Ht9G06XYe8R5SXkRBvED2R5orSZQDxpwte3BYxp23vshFBLB+jsQmnNZ2He3GoA7NKRS+Uoclz8QBGh/gs6qTu1g+0MNgo14tEgnx0KQy+bEvjBmIvb1FlRXpRY9tFRpat09KRaZysQ/YVXq+jkK//lq9J9ohnkCN9TG2NftQY3g4aXZJ0Kp+03GtCCkSQLy362RJ3ux2TWox1RDqujX7BmzLtq0AGZLmCxPeGRwiO1xHwWTNveYpSRslFOgGRjGPIfQ8gu46WuScf7IjGTWE7odoLze5bjDJ2ShRX8h4c7QLeZKok65zbIBhbPeis4PuWyeQ73PqFOmD3QQ== 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)(136003)(346002)(376002)(366004)(396003)(39860400002)(451199018)(33656002)(41300700001)(64756008)(110136005)(76116006)(66946007)(66556008)(66476007)(66446008)(478600001)(4326008)(52536014)(8936002)(5660300002)(8676002)(316002)(38070700005)(86362001)(7696005)(6506007)(26005)(186003)(122000001)(55016003)(82960400001)(9686003)(2906002)(38100700002)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?i2cPWp+KZHrk0jBm4UsaFOMZU3fO0Xd6UYAkN0Ffd6a6zHhi8rO6fVdmtpJ3?= =?us-ascii?Q?7c34mzav/sCvJeOfHrLUP+X21HHSFfPclOtFS0cYQ4taND+0C/v4u4vvXXMY?= =?us-ascii?Q?rn7hc0q38/RjRVfzoGRAA2zwXyHMA+L+xM1HAgZKub62Xz841c9vkRfiutRQ?= =?us-ascii?Q?IgBGXfrWJbqRfSHk0/bgxx9gk7qDdFEdUH2d/L4EM2QY5K/LFeHiVIz0Xy1N?= =?us-ascii?Q?CvK2MM0gQch0YcGK+vxlB7fQJjspf2c0NRHaVcR32OQi6u7E8ayfYP46YLEc?= =?us-ascii?Q?NGhe1ZKspkOE8dSOckTAtz6LdDkKJtTNogF84kGRULYLBcSp4dKZwvwlGjRQ?= =?us-ascii?Q?kz6ByKYGQ8vpgEvcJjFwWT2MmUQ/LF+1JA8Maqh4DbjPGVLBQ0WY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knEsyKtcrFTo5nyXJ5Gw9saWxyh4pZo6V10dD+HoSpmnYe?= =?us-ascii?Q?6i9B7e+1HcCo5/VVIT0HnS2Ze0kqoTJDMOx9Z2SRHaUmnSVKPu8o+4IVCZsQ?= =?us-ascii?Q?Pfmupst7qE4/NfI6Hr8SKmEMkKTfPDlER/GBbNLF+xpwVUK+4bN6EGaJUX1Z?= =?us-ascii?Q?0dqAu6IMBhOk8Hogvd8n6e70SAlO9e4edgOCn7UxqcIGzCOXTzAjPoOSoS1c?= =?us-ascii?Q?zY/lFQFsksUA36rNJ4wiNdU6Wqoh7rHofV0rxnlY0aQX6InbeCGTGaU8Tthk?= =?us-ascii?Q?m0wmT1M5s9ElxqCzEVACAgcMo9Q3UWkofpEu+ycTyT5UQKFVJ0UwmNIkpefM?= =?us-ascii?Q?pQ=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: 2a53532a-87ad-4f60-c59a-08db27e1837b X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2023 18:49:32.9796 (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: DfE+tDXwGF8iLcE8mJjsOC9DfnJnNiwE49VLD35SEQGyoXZsODfzvPkpN6GpkLo3aDlwiNYs+LhLXDWUMfY9jVGriHKeYFcauv7KLDZOzf8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5771 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 > +static void > +get_eventdev_xstats(uint8_t dev_id, >+You can separate this function (basically the code inside this function) = into 3 functions, one for reset and one for display stats values. >+And move the common code(stats storage calculation logic and getting stat= s name logic) to a another function, so you can call that function from re= set and display functions. This can be done, but we will have 2 API calls for each now, if we have= this flag we will be able to reset withing one API call.=20 > + > + if (enable_dump_eventdev_xstats) { > + ret =3D rte_event_dev_dump(evdev_id, stdout); > + if (ret) > + rte_panic("dump failed with err=3D%d\n", ret); > + } > + > + process_eventdev_xstats(false); > + > + if (enable_eventdev_reset_xstats) > + process_eventdev_xstats(true); >+For easy code readability, I would say have a sperate function for reset = stats, do not mix display and resets by just passing reset bool value.=20 Same for this one as above, one API call to the xstats instead of two s= eparate calls if we use this flag.=20 Thanks, Reshma