From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 304C5427E4;
	Mon, 20 Mar 2023 19:02:25 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id B2CB6410D0;
	Mon, 20 Mar 2023 19:02:24 +0100 (CET)
Received: from mga12.intel.com (mga12.intel.com [192.55.52.136])
 by mails.dpdk.org (Postfix) with ESMTP id 4B61B40A80
 for <dev@dpdk.org>; Mon, 20 Mar 2023 19:02:23 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1679335343; x=1710871343;
 h=from:to:cc:subject:date:message-id:references:
 in-reply-to:content-transfer-encoding:mime-version;
 bh=3Ymy+AGNkZ5PafRSSvmnmGWMIn6Qn4VLbBCA8Y52Eik=;
 b=cNOoe4gPhpXv4vPLoXvR1WcGVcR4bUWLlj6Mlt9gparJ9EZfEykJbDBc
 ywSriguKv+llehrR4NYsiPNinc4Cn3+WyNFKVgyuGsO55ofBCzkQPUm/B
 EoxqWjmZvtFq+S9CvbZeD45iBKHBkUSGsxS61ifbLy7RyiMGUKETnLjby
 i5MVtMQQmtv0GwNROG3VBw5st2pFM2qDKQlCcz6y01AHtaC8PsjbdPHSx
 mYKzvJOqXcgJvQ65VRLlGfcD+1dFBTVYDvEA+tZO30NdiuwVIsiBJShgA
 XDJPJOp2NcSIQfJMm1UAk3x0INLjaCaXBRh9nq099pLTbr5uEjpB0GYgP A==;
X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="318386631"
X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="318386631"
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 20 Mar 2023 11:01:56 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="824576898"
X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="824576898"
Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81])
 by fmsmga001.fm.intel.com with ESMTP; 20 Mar 2023 11:01:56 -0700
Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Mon, 20 Mar 2023 11:01:55 -0700
Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by
 fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 11:01:55 -0700
Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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 via Frontend Transport; Mon, 20 Mar 2023 11:01:55 -0700
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169)
 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; Mon, 20 Mar 2023 11:01:54 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=aWfQg9fE2w3NYBA96tVzTmXraGrvnnj+u/8Sz074XcyZ9s/tcWb6t+aifJXu7Q+5BN67XB7ukghdHHNDfhOr/G7jasi8AM74biPb1xhTGntdkkbgMAfE3u0UNB1H+2er6ZoeMNpCMY2Ar8iz0fzmUB9G3oS7UWrTvAUtNYst4So5i7VWmFM2Hy5xSHPbW0dz1xDluXKWYyitn/+E5V4QlPMRaOhtk4Oaw+Qirm/5ctNBNUDszwOPFMCItX+I3ydF8sd9D0IUiclFQT41crExkl1Q7uWFkqYf8mjLkUnyyw14ml26zYzUYyAGunkQRvrnJyPIhF+okzJdJ1fXC7Nykg==
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=XqsVaWJhruEDkk3KCcE7bU5WBhc83nkll8jfrgLKf+0=;
 b=F6AUwb/oZUZb7pmAu98ahrtxYKTdBcw+dJubb2P3Jq3PAVU8/BTqMnqVDWuiChpFsh+WVlxXx8gjGB2WewArJ+d1ha40/zcPO8/K6xQxcQlSW6ZETeFDCG81bOgYkVbCm6oYGNXkuGbY15IVOkA634TPLBPvmbDYf54OXhrUD1QR8yPZLeGTAPCWF8l3/35ceRfU84813KJ/kB2O09B/MdDtSQ6Q4JmIM2w9hZ7dw1LqMwkDZXmJYiMRCGOodYRcem014yHMbRlUWVzH2/VY/bfpS4jnxdxS/7lyMZkmkg2l2MBDdclNRH83H4cy/1MtQrH5+HOMOpwT5if1APl0rA==
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 CO1PR11MB5106.namprd11.prod.outlook.com (2603:10b6:303:93::17)
 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 18:01:52 +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.037; Mon, 20 Mar 2023
 18:01:52 +0000
From: "Sevincer, Abdullah" <abdullah.sevincer@intel.com>
To: "Pattan, Reshma" <reshma.pattan@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "jerinj@marvell.com" <jerinj@marvell.com>
Subject: RE: [PATCH v12] app/procinfo: display eventdev xstats
Thread-Topic: [PATCH v12] app/procinfo: display eventdev xstats
Thread-Index: AQHZWtL0DsVppEDyx0Go98FTxcCryK8D7V4AgAAExxA=
Date: Mon, 20 Mar 2023 18:01:51 +0000
Message-ID: <BYAPR11MB31588FEBA61B68E592C4465AE9809@BYAPR11MB3158.namprd11.prod.outlook.com>
References: <20230309185143.1006949-1-abdullah.sevincer@intel.com>
 <20230320022316.2298874-1-abdullah.sevincer@intel.com>
 <BYAPR11MB336605147C333DD54753FE5CFF809@BYAPR11MB3366.namprd11.prod.outlook.com>
In-Reply-To: <BYAPR11MB336605147C333DD54753FE5CFF809@BYAPR11MB3366.namprd11.prod.outlook.com>
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_|CO1PR11MB5106:EE_
x-ms-office365-filtering-correlation-id: c62c9a45-eca6-46cc-fcf9-08db296d2eec
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Gb3VQhJY7Rcgx5Cf8sSgLc4+/rHwkrhkQlSl5RXwZPSl9yqzHXehpqOBZYHc9I/m6zcf+EhPv6zS2rQqlYCUy/ObRDqvIRILksIa+SgXNzxp8mu84eqYiXJJ4O0DuqEIlTrKnk3N/IN+sqo0jsN7x/wZHHU6BCiS3yZDyQVB/c+BX/KiqM8Yj/nn1Ep2c5TSaKZqxmw2wZ6UIamTXEbTGZtq4QkHyIki65u4YYjLmUXCyksUpOw9NX7ccmM1/RDsYSPJap9hM4AMokZ2BW2zhV4074XQ/VZ7d9Ek+TnrLOX3MDSm57texlt4cCysyVsVv44qfr41ybGGD18rTgAVFx4vw8gyXAtYRjw8kQiq5okY0oZQyXvRIZdNrYEeJaDX7vzeWbfKAjpppiM41csOxQFoz8TagiuZd9WRaJZDmw19/C5mCjfb+zN2aA54iPlraxRWs0ZDJOtbyD2Xt+wROPBKkvmNRjNyUqW96TUBiXXglzIzC3kzKTvcRJHOUvMaQZo8Dk9XAvel9sqkopKBqM1hKG9pUInHsojpsJ+KAGXWT5PYzLDIi3QfSM0RL1KcBagw4TaQAcEhovGp+XQnA8wjRK5+Mov16U7dqDHsSbN25pz/1vy/AZ2xBdCzL6YYB+SSeHBI8u9HjtOJhCN7wvn67n5YWfsPbRVSFinawOaNg4yYC0a+Wrdy5zopTDjOnPo/GcmQxIn4MPp+E/smXw==
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)(396003)(346002)(376002)(39860400002)(136003)(366004)(451199018)(52536014)(8936002)(41300700001)(5660300002)(55016003)(33656002)(86362001)(38070700005)(122000001)(38100700002)(82960400001)(2906002)(4326008)(83380400001)(478600001)(71200400001)(7696005)(9686003)(186003)(26005)(6506007)(110136005)(316002)(8676002)(76116006)(66476007)(66946007)(64756008)(66446008)(66556008);
 DIR:OUT; SFP:1102; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RpOo6V9rR0DI6/XgobjG1WsG+iV23GWLDgZxlhOya4XQ9KIMVtcOQFMrgRuQ?=
 =?us-ascii?Q?xY65K0tPDhaCKaNX0HlHDvsH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jGml5hV2e1ECkSBFLyrqR/DFmh?=
 =?us-ascii?Q?fg5mOKIyzSFz/4BWIsgPyLqzJYGPFulSxhPh+Dg6WTBEMJbRFVHFkfB9ctCm?=
 =?us-ascii?Q?A22szxQkm0bmzX3teWKFGNq6V0cRsG7+qBOIEtC9/ylGgqFb6p2WjqLjv1bb?=
 =?us-ascii?Q?WYxoeM4UYBq8vyTZW7APR+lbSAU5YikqZKURwD9JiG2iSa2lyngoynXzE84A?=
 =?us-ascii?Q?S38Wy2EJeR/ALN9bo3IvIWnUk9+Yj/0xIkCfNk8jtU/muTpL4doLbvpK3NfB?=
 =?us-ascii?Q?oUVg7yMFm4myZIb9Kj+U9tdlAEzQyvYKBcPP36DfiuEGhVK9L10mjT+EM1Qi?=
 =?us-ascii?Q?v9pCSQKN7InzB3ZWGP2yDJ4B97hy4D/yms+aNfLales9rgC6Jd+iBsIjODME?=
 =?us-ascii?Q?GyrjDztiboCU/H+rryC/9SHtEEMwrQmY1u3ipB0C52Wtu6r2IjPJzsmyLGTi?=
 =?us-ascii?Q?oAd4u4NPPOy8+5I7BE8nbZZH3z1agkCTd+E8eKDdkes1vXUjm3qPiTlJ52Fd?=
 =?us-ascii?Q?5c/u8bwz9gvQDKV4rc7eBfNxhg/fvtiqpaG+3Gwj04xRxSPnLwZ1I4dFRBUe?=
 =?us-ascii?Q?g9VdbRjM/B0PSswFwvS2EnI4VzdtOSHX8gaMV0m/Heq1p9BwxwuBD1meUODY?=
 =?us-ascii?Q?XgyXS0HpqHsxVIap8F5P/OZvHpOnNiRVFcBTiyECziATRbx39q6OULfqcQ2+?=
 =?us-ascii?Q?Rw=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: c62c9a45-eca6-46cc-fcf9-08db296d2eec
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2023 18:01:51.8358 (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: XuTOBjvmZNGIODkQ256SQ9HQWKVQdjBmusGKgbV+ZLkZLPKLY+UZPKGq1jJs4oLBUXhwzy+kLsKGtEY/G82araOS/5Am8DYJLDUe/zCRE6k=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5106
X-OriginatorOrg: intel.com
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org


+>How about keeping  a struct to maintain  all the data together that way y=
ou 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 do=
ne Then you can declare global variables of type struct eventdev_params eve=
ntdev_var[MAX_EVENTDEV_DEV] to handle data of all evendev ids as an array, =
instead of keeping +>many global variables.
This is very good idea, there are other global variables as well which can =
be put in the structure. I think many global variables declared in this fil=
e can follow this approach. However, I haven't scoped this within this rele=
ase timeline as we have reached almost end of it.


> +	if (show_edev_xstats()) {

>+I don't think we really need the show_edev_xstats() function.  You can di=
rectly call process_eventdev_xstats() here.
I think we need this here because we want to exit from the app after displa=
ying xstats for eventdev. We don't want to mix rte_eventdev data displayed =
(if we don't exit rest of the program continues to display other stats for =
rte, e.g. check show mempool command line)


> +		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=
 function(). =20
>+That new function can be called from parse_eventdev_queue_params() and pa=
rse_eventdev_port_params(), to validate the event dev id.
>+So you no need to do this eventdev validation here.
I think consolidating this call(checking the validation after evdevid is pa=
ssed) in here is better, it seems more consolidated compared to have call a=
t each parameter read in the parse function.=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);
> +		}


>+Also I guess you can move the below piece of code to be part of the proce=
ss_eventdev_xstats()
Okay, I will move this inside  process_eventdev_xstats().

>+Need to edit these eventdev commands  to show the new  format port:eventd=
evid, queue:eventdevid and eventdev id.
Will do.

Thanks,
Abdullah