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 1E897A0547; Wed, 29 Sep 2021 07:14:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 913C6410D7; Wed, 29 Sep 2021 07:14:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id F1EF64068F for ; Wed, 29 Sep 2021 07:14:40 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18T2ScE5017511; Tue, 28 Sep 2021 22:14:40 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by mx0b-0016f401.pphosted.com with ESMTP id 3bcfd48gah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 22:14:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ceNa5PT7z2NiM95CSJZT+j0HnP3IHl8HPJSjlV1fl0MKk0JSJBKo5JKEFtoY5OJSD+HuDNBYVlbufImLK5Ic32dq1aXe04DFAT7xKyN6HFZdaaNjiXs19opnmwvqbQtCsMrQXHCPUXrZ5XLmTMXfd37nYk7hvzwcdcU+j/2Q+QtIkf8+2Ee/AUuCjw8Fy6QaaSGTxzTOxXHVowjEmRbNMlR/FL2qnTQmRXNUrTuP11Ai+TN334YhqK7QmVdHbEwSR7BZqyWLsDuBxEWCx0ALu7V4aFXoKu9puWxzRa/pcIco7PP8FdXsIph5DU/6uFVbSP/KTMMhScviUA75VZ7c0w== 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; bh=QoOM9Xo0nR0IK2gQDrxbnlqzN1FscSkRUgdZtzV0xD0=; b=MUyzsFb2uhQGZXlK00AFElsqdHRAacWDKG34lbACN/qgSYM91x/Y5AkMqxu+xKLmaPFhpjyBahZWpPIShZxNNLMZdDcis3Gcrp2xZssfIdJYFQI1op9BnzpcOEvnunW3QYIoSM8wzGeQqHOlKl926tLi5LNLt0wJeLUM2JZMgNwS7nbeNe37aiZXVZqVrTE+A+JkKq6A3Hcg+8Pbkko8oyaUfbyGiWLGaFU0MG34Gsinoe3h+hQbvN2rQnxAGGkelZexW5qYby0EU8gVA8D8BHLr2K6/9Keh3HAyEebrgAdbZlhe/Rr1xZ1CpCacpCUZ2C3HnOWefny2iYS3+J5aXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QoOM9Xo0nR0IK2gQDrxbnlqzN1FscSkRUgdZtzV0xD0=; b=BBNIaN6mAzQwke716ASYHD7toavAFab6STgSCO6uc7jJ3OzeElHohrLcWQmVs0LXCDOQlBuIInYKPiFdDC6Ay9qcnECzKAOF4prWGr7dAy3MwjwwQNxJLOUTViOwmUlRpn07aubAPsnehn9UelVgUESmRX3ICBQob2fYumCSe6s= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by CO1PR18MB4571.namprd18.prod.outlook.com (2603:10b6:303:fe::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Wed, 29 Sep 2021 05:14:38 +0000 Received: from CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::8c05:ddeb:f02:7b5c]) by CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::8c05:ddeb:f02:7b5c%9]) with mapi id 15.20.4544.021; Wed, 29 Sep 2021 05:14:38 +0000 From: Gowrishankar Muthukrishnan To: Rebecca Troy , "dev@dpdk.org" CC: "roy.fan.zhang@intel.com" , "ciara.power@intel.com" , Akhil Goyal , Declan Doherty Thread-Topic: [EXT] [dpdk-dev] [PATCH] cryptodev: add telemetry callbacks Thread-Index: AQHXlOQbtnKFJ4rtk0yWJryb4x8SHqu6tuPA Date: Wed, 29 Sep 2021 05:14:38 +0000 Message-ID: References: <20210819102157.1190022-1-rebecca.troy@intel.com> In-Reply-To: <20210819102157.1190022-1-rebecca.troy@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f73ca2a7-4350-4338-5490-08d983080944 x-ms-traffictypediagnostic: CO1PR18MB4571: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 76Qd9TfIXP0Ztoz6xzANGarS1BWUQbdeKdEFTwzU9Nr/e8dTN7vD24bJ6cTSGlJ97F+RoOxyX7WcF5YRYDJ75hipVQRuF2eLl2ZsM6fFMLm2NpWGp5MavzRna1BEaFXht6/dMoarpumYzeibslXExe8xXBPsiO1BloBqBJ1Zvz+AMalK/1AUvsDC3eg+9Q7y01XHQ4RivlfLOpyHcd9/SQQjnSt6tN4wHQCGt0zdmssjPD9ncJPTYC2umSf3PyqP0xNmh89DdVkjNIlXLyBr7KvHip/l3KLPKSPqfNa579jfcKtba0ZBJm5HeuMtkd5djmeWsD68U/nx6BE8PMxAn5qEw5go70Da5gJU+GQeuli7dR6dox1AL/iQynGfFw0P/ccZyU4mhf+ixI6D2Id/mpr7J4rLLOTEfAk55ZNoePsKGhuL6OYzmcA3m20iOW7oilVBdACnNAZpm1JquvRlRIy8XL0caSD+EfAlZR0CWxuSYBTU7+0VYNMJPV9xtAStA0PfBQ8fFl+zYL6tnUpgTPQ4ShPIIzBZpNr1iOSG2DGy+82mAjD7bxCh7YKf1/Vx2BN+oWcZQYRLQAyi9XayEMiKK/m8+pKlJztReaRTsyq0YvY3lkxBfL/7dBsyDrrdqovxlBPDUtb05qYyj6Qr5VSEHTqPuv4DZHoP9uZfGnLYOVsAY4GbEZdv+ANHd8Sfx1cIBF56dWnX7MvjZY5bXA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4714.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(54906003)(64756008)(66946007)(76116006)(122000001)(38100700002)(316002)(52536014)(66556008)(110136005)(86362001)(2906002)(33656002)(38070700005)(66446008)(66476007)(8936002)(8676002)(55016002)(9686003)(508600001)(71200400001)(186003)(7696005)(6506007)(4326008)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SmrkXHjXVKRcGFrAoLsJCiFM+zPcMbycICY76P2WBSQtKpqzmGRMYy1SbJ2s?= =?us-ascii?Q?Kfm29ucxYq2dV4wgZ6umiSyo/Z46lUaqnjIzxc+1GecH4rVjosPI4sxCb398?= =?us-ascii?Q?LiLoKsOHhXSehpAMq46nrCtpYaSkoEqiDuDKx4/mKF5kRrrJZGx3zS4UDcwO?= =?us-ascii?Q?PwDoQohcI3/wyCaAKsvGRDA5pD9iHOlhmBNPEkCCHbn/pz6QoJpVPq1k1w0v?= =?us-ascii?Q?vmW9dP7f/aWHxR+BiY3qbae5rv3u/s2cAUXFd6hV/y5Go2t1PSjosaH4OjEN?= =?us-ascii?Q?eQKaRJlljUocjb7ujoTlDkp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-ascii?Q?x5xXhzBsNnk660S362Ooqdm/tFFqCCgGth0uZTDVWctCFvIU6C2Z/+2YZF2c?= =?us-ascii?Q?qWAogagQEiOePHkz2UhEny6rKfjUFTA0c5jK4tPvMbJaPiC4iHOq2OhTvv7n?= =?us-ascii?Q?I2N6SLot7TiZvgrfdUUI3QXEwYO/8WIbpepCMRJwP6t0/NT1PIcbjKRuKk0w?= =?us-ascii?Q?M1OIwlKOW5hgFt1Sch0n8yXHax/b?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4714.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f73ca2a7-4350-4338-5490-08d983080944 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2021 05:14:38.6194 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: H2SruueDIbbA/BcCAVnDBnIzEZqwbfxAKJgbrqB+aXcdX2RpsLkGcJYlIQ9/L0n+k/QdyqUNRCIgq+ogUWr1GApZYbJb23Dk8EqKOxIv6x8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4571 X-Proofpoint-GUID: noEhxznYWoodRXMcyzpWKQ9BNN5I3zAn X-Proofpoint-ORIG-GUID: noEhxznYWoodRXMcyzpWKQ9BNN5I3zAn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-29_01,2021-09-28_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH] cryptodev: add telemetry callbacks 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 Sender: "dev" > An example usage can be seen below: >=20 > Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2 > {"version": "DPDK 21.11.0-rc0", "pid": 1135019, "max_output_len": 16384} > --> / > {"/": ["/", "/cryptodev/list", "/cryptodev/stats", ...]} > --> /cryptodev/list > {"/cryptodev/list": {"0000:1a:01.0_qat_sym": 0, "0000:1a:01.0_qat_asym": = \ > 1}} Will this be better if we list keys by port ID, as port ID is used as param= in appropriate endpoints ? Just a suggestion. > --> /cryptodev/stats,0 > {"/cryptodev/stats": {"enqueued_count": 0, "dequeued_count": 0, \ > "enqueue_err_count": 0, "dequeue_err_count": 0}} >=20 > Signed-off-by: Rebecca Troy > --- > lib/cryptodev/rte_cryptodev.c | 62 +++++++++++++++++++++++++++++++++++ > 1 file changed, 62 insertions(+) >=20 > diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.= c index > 447aa9d519..1e3ab633cc 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include >=20 > #include "rte_crypto.h" > #include "rte_cryptodev.h" > @@ -2427,3 +2428,64 @@ rte_cryptodev_allocate_driver(struct > cryptodev_driver *crypto_drv, >=20 > return nb_drivers++; > } > + > +static int > +cryptodev_handle_dev_list(const char *cmd __rte_unused, > + const char *params __rte_unused, > + struct rte_tel_data *d) > +{ > + int dev_id; > + > + if (rte_cryptodev_count() < 1) > + return -1; > + > + rte_tel_data_start_dict(d); > + for (dev_id =3D 0; dev_id < RTE_CRYPTO_MAX_DEVS; dev_id++) > + if (rte_cryptodev_pmd_is_valid_dev(dev_id)) This is broken now. Correct function is rte_cryptodev_is_valid_dev() . Thanks, Gowrishankar