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 3831C41E9F; Wed, 15 Mar 2023 15:24:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C12E740A7A; Wed, 15 Mar 2023 15:24:33 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 96A9E40141 for ; Wed, 15 Mar 2023 15:24:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678890272; x=1710426272; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=z3+HVCIIDjNcgBxK66FAfo/tkR30ytZERy5/tEsX0DQ=; b=Ly6NiqsBsLphYRewlcVdJs/4jHY9IauoyODGnZtprqmQTkNglHrgQtBw aGpXFRNyK64a0HDPXsvhrzkUkPA3Ee1+ixXA7VNc/5lKTaRjY7Yrrg9LK JeLDpZboB51YqMDl5XnrGXtVgKgdsUBttY6eZLjYzeBwZqxy0/jYn2JeE mYbSJDIQIbBQ5lksld++9+48g8AxZhCC5nrRBOVf8UvIWkv6uzYwGxSBR 6P+wv/CN63OmXyCZ1dEgEv5dm4+iM8iZ0MzK61wi1sq0jTUN+X9X8S65+ C6/ctY1nXH7uP+h2h9kjEQsZVdroobArlXzq+wHU5jbZRI3wajo5JAqFU w==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="365399065" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="365399065" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 07:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="709699786" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="709699786" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 15 Mar 2023 07:24:29 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 15 Mar 2023 07:24:25 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 15 Mar 2023 07:24:24 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 15 Mar 2023 07:24:24 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.46) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Wed, 15 Mar 2023 07:24:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oQ8x3hYckoU/o8kLebT009MBCV01zVsVABp6z/bHEUvwrR8zkCq5e8PIyzXRrRkm1Km0q3L/C+TjdE4isV0sY9RJKp1ZhCag10U3DIeMXXhO1Bh1V3LQw1domJh/y425YdZ8evIpwpAohCsaP8QIb24nf7WEqVv4NN8uuMjeSoij86cTqbNkScNjzXr/xO8M7Q6dVK84JlIp3krtw/pDUi7UgB1DMwjbkrYFTfFmvrhNNFrpdahYIICi+3zpcBfJ3hr93VXSAaKfybrkMCAFysSu2spzYdH6gKW77fthgFfHvtCBDbeM4ulw0qhdpWR3hGTm3w73OkMCvwaxEmACBQ== 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=2E/f36O5LdJhfdiVIBojDi81FMx4cMgoJEAAI/10udQ=; b=OADZwGdTf5fgg4E855Z1j6OMVq75V8bBQxYWOus6jrI0f6M5+G0Yp/basdjqdPghYxA5n2sQRnxZaWsx9xuWYp+B7N8AGuGlFYNlvhuYvBE/zRRY5j+zqDDScqG/2q5Bxj26OZPLEKMuoR6LBhLeQAkoqUZ3Z27sLO+q+3/c+7+kssX4e4RBW4fZIyEWlm//D+QbZvQVCTszfO1vT+4gSyIdnk80nkwXpHxNXiRrESh6M5XrX/Ordawiz+o9HjcgjQSSuR/GWIiNTFsxRlyQPAHblqm9WkIl1kl475Ypq6gciGBGbkY89Ds3mcgcL4Wv4WYwv0LpKyRpm15R1ApeIg== 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 BYAPR11MB3366.namprd11.prod.outlook.com (2603:10b6:a03:7f::20) by DM4PR11MB5519.namprd11.prod.outlook.com (2603:10b6:5:39e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26; Wed, 15 Mar 2023 14:24:22 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::7d29:65ab:81a8:91b7]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::7d29:65ab:81a8:91b7%7]) with mapi id 15.20.6178.019; Wed, 15 Mar 2023 14:24:22 +0000 From: "Pattan, Reshma" To: "Sevincer, Abdullah" , "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: AQHZUrg3EIsFsS6FGE+/Q6xuEk1Zka773r4g Date: Wed, 15 Mar 2023 14:24:21 +0000 Message-ID: References: <20230223010819.4164765-1-abdullah.sevincer@intel.com> <20230309185143.1006949-1-abdullah.sevincer@intel.com> In-Reply-To: <20230309185143.1006949-1-abdullah.sevincer@intel.com> Accept-Language: en-GB, 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: BYAPR11MB3366:EE_|DM4PR11MB5519:EE_ x-ms-office365-filtering-correlation-id: c64ec984-3b2d-4960-e1a6-08db2560f873 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j6JxeT4aIA0KJPTGkstgqcRNPLuMPnLefAjB3zp/hNp1mGfNcvN3d8jXXJ54mJTaj3qsHpRQ1kGpeooEGspZWgHaiYVLp7NWR9EgH7zrSCFqREjRgCZtGbV6TzeWZoJ5u9tHT0rcYCR+eFULxyHbugrpzgycwOBbGXjNpdbiVtmhyyxTsEYXbBkx3K0p39sGkVPYdyhHfbos6ZsgCR4cFi38QB/HHIWdrC+OcIVOhz3uGF5+7zTpk92aTWCT7Rz/p2FZ6B0vRZH/eRxRR3kvcpAtYj0Cb/Xvbga5oBkSUXN8g1m4VAT+5xzCpL73rog+goym8UWJJ48H+SbhMq7h5uOiLbBMFMnnw72y5ciV8wADnsHXwocJpOtqORuEeqyq43HMf/oQI2McP5eAnxpXlFG2O1VSpQ3F7XZFJEAner+7ah9yXeHv77CtN7aCrRLa2nYm5KBMFVelZ4IKhqgxNcoV0RThsb0jK/D2rfPRRasAWqkv92gOHivHH9iUB3a/VCjSHffrnyOBC+8HtvorD6a0AzKYgQNNdGMFQm68p4PcYwUBJXrhUzibCherHcX3n759Y4c09eN+5biyobuZ3kh+puosMlFFjrKRCQcF0y11t8rgkIsM8UPcaM1m2ndyjJy6y32UlYryFVUe4wABvpvLLEj9eYNLYwGTI8iiDS0XoJ8ruM5n4PQrWDKg6cDCigY7Ds6wRYA9gUAgQGHzqQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(396003)(376002)(39860400002)(366004)(136003)(346002)(451199018)(38070700005)(86362001)(82960400001)(33656002)(122000001)(26005)(38100700002)(55016003)(8936002)(4326008)(66446008)(8676002)(66556008)(64756008)(66476007)(76116006)(66946007)(110136005)(41300700001)(478600001)(52536014)(316002)(83380400001)(4744005)(5660300002)(2906002)(7696005)(9686003)(186003)(6506007)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZeahB+hjLD5NaazN0RVyRAAmnxWmxvN9wTC1QmxeucrU/NsU7FktCavaUmls?= =?us-ascii?Q?DqaARw5iV3g8msiwfnG0LQomX2UojWT73VnD/NRqkjxh9Y61EktMHCLR4fwN?= =?us-ascii?Q?2Gz+f63QpJb7bk+yePQOrSYhwwRVEU0LlF4slvvxYUqbBVzkvSwr+88ZGswN?= =?us-ascii?Q?tsVuXzbOpRvQ6AdhlGYfAor6Ejvi07mmLq1bLqAd/et8KsVblkDHk2j82D0/?= =?us-ascii?Q?qbHZkvBm6p0aVJEIQTPC9XaZIfjhjvaeRr1kHdetXI3/rpUkP7bWzY2YyWV9?= =?us-ascii?Q?YFlAeiknHKj4T6ViZzcAS9TIDFk/b4gU4yDVTn1ac2AaLKahmmQzwLWA9rN0?= =?us-ascii?Q?MmHW2gT9ADkJTGDKiV5On/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Q?sd+76H1XFUDO6UX3luRQtgwvI+r7lxw77DwOnublNyHHOvUf5ExHhKJyP0PK?= =?us-ascii?Q?ftirSOGA7FAwv0JJ5z8pvvsNxDOzCdm7qInYeO8nreyj6s3nt27Ptkg8ZUmJ?= =?us-ascii?Q?YvKJLJwu0ri1tgM+wlMAXm1LyYUZH0RdFpOLUATP3cP2aizgPTm+pR9YzK5U?= =?us-ascii?Q?Mm5An6oj+ZcmaAkbGgIwOux3c2mvE9E6KLPNb1o3IrQjYmhZqAF0/dSy0aoL?= =?us-ascii?Q?FOzKbkBmiTpgMviYTpQEWy7mo93/69CgzN7lcLP1U10JCBoUeaW8+FHX8HAJ?= =?us-ascii?Q?wD+v5ssGRqkl0oGrVWKTWrbdN+UDHCxOChD3ccUy?= 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: BYAPR11MB3366.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c64ec984-3b2d-4960-e1a6-08db2560f873 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2023 14:24:21.8333 (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: oT4PqSOCOGvi0/XsC9ZQ6y50Srp8pKRHJNMMYuOG1op7DWEOovdG/sGYeeBjIuN2dw4U1T7V4icRkd0fX9Xetg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5519 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 > -----Original Message----- > From: Sevincer, Abdullah > +static void > +get_eventdev_xstats(uint8_t dev_id, You can separate this function (basically the code inside this function) in= to 3 functions, one for reset and one for display stats values. And move the common code(stats storage calculation logic and getting stats = name logic) to a another function, so you can call that function from rese= t and display functions. > + > + 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 st= ats, do not mix display and resets by just passing reset bool value.=20 Thanks, Reshma