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 37AD7427E4; Mon, 20 Mar 2023 18:29:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18DA4410D0; Mon, 20 Mar 2023 18:29:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 976A440A80 for ; Mon, 20 Mar 2023 18:29:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679333367; x=1710869367; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=pyh9D2RzKksI5mswbqW7HLdeBIltFofigjp2Zq9LyYg=; b=HnOuhKuWPoG6B7iP2taybgV7yxUYacUVO6LbowH2r8tz5ECZhQY1PEUJ jLb62cW6seTY2KQKqaiyAIKNWsVcmp77vgLRTGKPbMknBp/tII0+GH+iK emPU/1wOJk9AG/5HqRoZNoDXS3p5ZYn2rOcpk8EDPQsdIV9kDc/uvFy4K HPUPHzf1aR8MZ1TKq2DeaLDts7BeoxQqQYDbAMPu7LVU3eTy9cNViNFZj T3tPcvWve74TXCyExGKDCYbGHa2a/AZnnlzXOO46vnNXkmTgmViryiXeE KSFdX0crZbV/RDwmEc3TQz0kq1lAT5IxKwQ2CsqB+p6aKD2JkHxZmrzl4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="322569053" X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="322569053" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2023 10:29:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="824569585" X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="824569585" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 20 Mar 2023 10:29:26 -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; Mon, 20 Mar 2023 10:29:25 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Mon, 20 Mar 2023 10:29:25 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.21 via Frontend Transport; Mon, 20 Mar 2023 10:29:25 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) 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; Mon, 20 Mar 2023 10:29:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GM17G6K0be4598o9bzunCAk5pY2GsG//1vT+duthGPe7VaofegEYyPAh8Ub7Pb+mPux3gp3A/BqfwUrlPIGeVvVglyEaEtNV6y9ZQE+BeNsVUMoyzjjSOTYbzBXE4z3DrxXEHX55bG1DEqb/Z3JFkAGF+5xu6KEKTTFRbNiodiC0NI1GWJYnNgtmIYDDdIvo3G737b0slnXtvTi5TNDcaU2Uwrl7VfW1kFGHc3u8z7iNgV7qk69AvzjiP66Lo3hX7/80Pw/Ns7ahFi66AzYIttNYodLDNT7/YlsDD48nHrMw3vFZLpoZwDkMMGiCc/5NYFln2piCaFPeaTEVnWA0lA== 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=6ISnkfwMzsjmAVnZmJ7P3j7pJ2hJiwr9fZYheppGSKo=; b=MfWlqFEzPv5Da97xevV/HQ1N8L1qhgyN81YLJGxJqJoi2Xwo7GqlpPDDrxUr3GaRYy1neN/Zjq4SeocmM6Dc5WRZ2EBNZpA5tOfoL743prjnk6W3GTzU6tBYToO+RfYN25ZX8Q0H2E0f75KzMlchqP/VXPnCBjJ4CCwk5EpJlTPuaBJN+vN/nzxo16UYi4qWbAufSMxAdjDcGiw59TSC/GdlBIjSodZx8b/pfqDyWO+qFxYObHsB+St4hBHmeq6XiGAXl+wSBW2rW3AOEf7QOz9/ndvmmpXQ1uy7nzH/LQFJXt8FLjdmn5bvyfmzh21BC9gPuMbl86KXZ9AuHEpO8g== 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 CY5PR11MB6163.namprd11.prod.outlook.com (2603:10b6:930:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 17:29:23 +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.037; Mon, 20 Mar 2023 17:29:23 +0000 From: "Pattan, Reshma" To: "Sevincer, Abdullah" , "dev@dpdk.org" CC: "jerinj@marvell.com" Subject: RE: [PATCH v12] app/procinfo: display eventdev xstats Thread-Topic: [PATCH v12] app/procinfo: display eventdev xstats Thread-Index: AQHZWtL0Do/ADha4vUS1y45YFoV5Ka8DsrEA Date: Mon, 20 Mar 2023 17:29:22 +0000 Message-ID: References: <20230309185143.1006949-1-abdullah.sevincer@intel.com> <20230320022316.2298874-1-abdullah.sevincer@intel.com> In-Reply-To: <20230320022316.2298874-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_|CY5PR11MB6163:EE_ x-ms-office365-filtering-correlation-id: a27247de-b934-47e4-3126-08db2968a54c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jkErIUloRXAnosqBIY8rwYOenNDTsBXBBc+ernHLr9VZw9lFxZIVRmspzmDJvXM+rLpo7dYOX6u77YMAb1DYVeLWZz9VH3ZUFidMH33vvkGh3cJc84xG+EzBB8hHGqOsfxBmji+GuBpYdfAS0t4+62Go9ju9VCWCoU8rFWqDsPTuU4lA0ekfsfcI4Q3njCTFLuadjlQf80Z3qFZWJAxpT+fruYOWB5w5amxKj82XhJqAtaXi/wR4POvbBfHfbvAb0OBh5O0dzJlNms+Rk7c6j5XcEeiCZKZxiqf/NAVy2ytYgM/jBcxb8E11rcb4r1L8b2JV6lM3CBeOix7A3X5gdC+SOEpsC9o6Un7K2ERgJlcziAEi7vXRHwA25OhBKZNG/Jq+E3RQ+Zndy0drwREPlf/OCfyF0MI3mD8RQXVfrZpGC+5i6sf6vostfGgE74AT5yHhVDGkU0RTCVFkJ6v6/6mwupLJUjh4l3NTdgBIQ+XAEy0WJY3PsCK72hAH2A7V3tpsBRcbOjJz83Z2be72TFWETK9007exxzGUFoWe7hnfQ3MLvoMPuOR3VxoI8FXsv6mWkmuPyXQBX7+H9+ssj54ZmjZuiBExLtT48cZSFsJIj7w1xxxuv8jon7G66W4Sg4PpHE5IMi7/E57d0pBOZSIuwOCYa0SDZ5S8z5+dgg9Q8WiX2Qbu198qMMsTIVRdb8uS0NdXz1O2BkIv05IC2A== 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)(346002)(136003)(376002)(39860400002)(396003)(366004)(451199018)(66476007)(66556008)(66946007)(66446008)(64756008)(76116006)(8676002)(4326008)(7696005)(71200400001)(52536014)(8936002)(82960400001)(33656002)(9686003)(55016003)(186003)(5660300002)(2906002)(86362001)(83380400001)(122000001)(41300700001)(26005)(110136005)(316002)(6506007)(38070700005)(38100700002)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?W+85b6mrGYsW9eegFvnbjShpitRnFbE4n82tUJmelXKgew7o3k/J+VuTENv8?= =?us-ascii?Q?nK2UgMp9qSlBfQoMgliU5/gBmAxuRQWyL/DJfOZuTktb0OoVqJ/wJAcpkYFt?= =?us-ascii?Q?JD67ihxjEhZ/IJnzgwLV69ecyFF4C2WvYXeNHMMth+DVzszGcBd/DgyR3lpO?= =?us-ascii?Q?iRjN7lAe1AduhuLRH27UD07kj4a8+m8jnpt2fNTj5pVZs8vCtj5+qcWTpjT4?= =?us-ascii?Q?QR2RnRvstBvAjj8pNTn5H+8mwpZ1XfGgD+gdRVHbCRqqbZXdWyTLfIhUuudP?= =?us-ascii?Q?DmTt1xOp1ec9T62/PWFrxNSJ7rfGf2ZmnLDsnfJtV2QnwqsTVYt+/VbYuPMt?= =?us-ascii?Q?p0lMeAAIrHE982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ii?Q?SF5gtKbOlvb/AOgmV2jViRmvsaiVh7J4TiqnIZgufudWnml+3T6pNWjQKPqd?= =?us-ascii?Q?o2Edp+xlhLCx6V7+uefJ+ZmTW+J2ODOiyw/gPPISJZwP7aJicN9fF4TvyBp9?= =?us-ascii?Q?xCw1neCpSw4AMFW6AMug6gMBDK9lphF2zRonhTdZGaCCWoS6vc158QnNGlKL?= =?us-ascii?Q?rhSVqrKGBWiu0qaxduYmqtYRZ5C5vEPLAIlX29zjZdmi8WEctKM7gzeAFIgw?= =?us-ascii?Q?gTeDtjKIHLdbJDpLlNaqCrmRTbMA+OowX552JREK2UMvW2lpeVAe+suYod1C?= =?us-ascii?Q?CEde4QjhflJIeGNaiR4jtnJVsASGx8bt/qrmr6S5?= 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: a27247de-b934-47e4-3126-08db2968a54c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2023 17:29:22.9316 (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: /JuyfNTzzHL91eeorwabn+f9KuOwuSw8QTlbB2eK24ggKEvF8bDtFPIuFDdrcZzSdzhyGx3JqoWyH+ZCd9ppYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6163 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 uint8_t evdev_id; > +static uint8_t num_ports; > +static uint8_t ports[MAX_PORTS_QUEUES];=20 >+static uint8_t num_queues; > +static uint8_t queues[MAX_PORTS_QUEUES]; > +static uint32_t enable_shw_all_eventdev_queues; static uint32_t > +enable_shw_all_eventdev_ports; static uint32_t > +enable_dump_eventdev_xstats; static uint32_t > +enable_eventdev_reset_xstats; static uint32_t > +enable_shw_eventdev_device_xstats; How about keeping a struct to maintain all the data together that way you= know on which all ports and queues of eventdev we have requested display.= =20 You can refer the existing code "struct desc_param" to see how this is done Then you can declare global variables of type struct eventdev_params eventd= ev_var[MAX_EVENTDEV_DEV] to handle data of all evendev ids as an array, ins= tead of keeping many global variables. . Ex:=20 struct eventdev_params { unit8_t eventdev_id; unit8_t ports[MAX_PORTS_QUEUES] unit8_t queues[MAX_PORTS_QUEUES] static uint8_t num_queues static uint8_t num_ports static uint32_t enable_shw_all_eventdev_queues; static uint32_t enable_shw_all_eventdev_ports; static uint32_t enable_dump_eventdev_xstats; static uint32_t enable_eventdev_reset_xstats; static uint32_t enable_shw_eventdev_device_xstats; } > + if (show_edev_xstats()) { I don't think we really need the show_edev_xstats() function. You can dire= ctly call process_eventdev_xstats() here. > + const uint8_t ndevs =3D rte_event_dev_count(); > + > + if (ndevs =3D=3D 0) > + rte_panic("No event devs found. Do you need" > + " to pass in a --vdev flag?\n"); > + > + /* Verify the command line options */ > + if (evdev_id >=3D rte_event_dev_count()) > + rte_panic("invalid event device %hhu\n", evdev_id); Also, You can move above eventdev id validation code to a small separate f= unction(). =20 That new function can be called from parse_eventdev_queue_params() and pars= e_eventdev_port_params(), to validate the event dev id. So you no need to do this eventdev validation here. > + > + 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); > + } Also I guess you can move the below piece of code to be part of the process= _eventdev_xstats() > diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.= rst > index cf3502a8cb..f0a7d37e41 100644 > - --show-tx-descriptor queue_id:offset:num ] > + --show-tx-descriptor queue_id:offset:num | --show-edev-queue- > xstats=3Dqueue_num | > + --show-edev-port-xstats=3Dport_num | --edev-dump-xstats | --edev-rese= t- > xstats | > + --show-edev-device-xstats] >=20 Need to edit these eventdev commands to show the new format port:eventdev= id, queue:eventdevid and eventdev id. Thanks, Reshma