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 6C4EEA0C4B; Thu, 14 Oct 2021 18:43:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49CDA40041; Thu, 14 Oct 2021 18:43:12 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0BF454003C for ; Thu, 14 Oct 2021 18:43:10 +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 19ECiBBE030214 for ; Thu, 14 Oct 2021 09:43:10 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by mx0b-0016f401.pphosted.com with ESMTP id 3bpjk19rhy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Oct 2021 09:43:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OrW9hQ03WS6xPymEtu5i2Q0OiZnzdPrM/Q5U1M0P9lcoBdqri1RCVjZqWzBic2akZp5fGatD6CbZBn1bc5A7uU4fhMz7PA24MMunaF77kDeDgTI8VyLBM35MqAnQIDvJOKxqAmepROO+ospXsa0afPCEUyaiTWToiCk6FjmAYaD1dY2ysvZU6x9UwD8DWwECvbl4wh7geFaV/RTXp/aG5myg6iqBqI9pkM/v8lur7N5zmzDTD/WaQ20B+/OKlHR+dKjIfU32PWvzeUfiVs26vy9jZZVy41fYnEuZn1xv9XgSH19HN3T3W0hl/niNAgxeIzEtsQSfLIf5Tgj4JyvnsQ== 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=C3IlM3cA4SbtDZm/vfP2x3N347O2/x/udAoGjItMqs4=; b=QACb8k9e01XzfWhy2GRIUAauz6ynD8ZSduYUhO6fLqvYNq9ShxP9l+YQqrLW+TPKG2gAwlNzV31XzVgP6k52xjeNHmtch8E+erNQOg72wpyzL1Pl4JcNKCkniXjZeixNc97iErW72vEPtvBcmLLhiGr4R9DOgBjSck3hoLmyefo5Y3QNaBI8GopEmP16dJyznVMiEROm7NvhTAnrPOIrmAPvy0L4X+QFpFw8iUfx8cvEY3yBzocI9yge2JEQ19FrbX+ziTtE0sg4Tj4KsilqLodRoBoSVZ3Rugi5CxpGvTvaK3utehP4clDcyoJXLY7Bzekya4H++exYpwbRD/eQIQ== 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=C3IlM3cA4SbtDZm/vfP2x3N347O2/x/udAoGjItMqs4=; b=pzJHzFpTETL2daZoAxqKIL38ZPBWwgyDBhS3QLISDWt5DIqznCtZwHzGrUTSreYtPkdSXbKTz8bAAWXFPwqJlJjANdJzOmsY+TFRtBq2YCCPGV3BeGpWBQoJEWq/BaQqsbLEJsJJwScragGy2I9xoYr16hSII2RSH2ZhqcxjNDk= Received: from BN9PR18MB4204.namprd18.prod.outlook.com (2603:10b6:408:119::18) by BN6PR18MB1491.namprd18.prod.outlook.com (2603:10b6:404:12c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Thu, 14 Oct 2021 16:43:02 +0000 Received: from BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1]) by BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1%8]) with mapi id 15.20.4608.016; Thu, 14 Oct 2021 16:43:02 +0000 From: Harman Kalra To: Gowrishankar Muthukrishnan , "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Ashwin Sekhar Thalakalath Kottilveetil , Pavan Nikhilesh Bhagavatula , Gowrishankar Muthukrishnan Thread-Topic: [EXT] [dpdk-dev] [v9 3/4] mempool/cnxk: add telemetry endpoints mempool Thread-Index: AQHXtP8CZUA3tX5yskOU4879d4UPyqvSysYA Date: Thu, 14 Oct 2021 16:43:02 +0000 Message-ID: References: <8f64ea3b3ebf1a37e7d7ea7ec74e7bf55c15f590.1632896495.git.gmuthukrishn@marvell.com> In-Reply-To: <8f64ea3b3ebf1a37e7d7ea7ec74e7bf55c15f590.1632896495.git.gmuthukrishn@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b3ef7628-6b14-4b2c-7dde-08d98f31b058 x-ms-traffictypediagnostic: BN6PR18MB1491: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:826; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9IGhVWzDFkq3nue3RsAIwfYiOVPBoq728Ly9/WZisUNQDtld8W6PxRU1mV8ITF5Snu8b+8RVPpuTEaSVkCVvIRO58BCBa2LF6f9k8MDB+yhnmpZ9cOuPvjNvhxWZv9w72bt66/+SH+UqJjFtD1FMVPuaJou6kmtSE06nOdfMw+y04ByhaeMPXPlp4wUY7rNnsQ4aOdJ5sML7AVe+3RVUQCDHQGR0+CZ3O7FjfNGLuGNkM1xdkqhMfiFmH7cGawrct8HQ2siipfmUWk0J14fuVMIs4ZVIE49l2TvKZMSZJS0dJApWcXRlaKm8SiRNX4eY6wBq44aEVCyxeVXH3HuMlolomkETVPNAKgTBtCVwCxP3vUNfGq3Ye9F/RSf3Y4Oro3y6TItcYlQ/nVyYNsQu/tpqx+03PjDhuB3q8jnT+U1CdjYsJtAmz7GX/e83kqnvporEj82wb2w8MjolzwxCfdPoxDtsJd0/AZ5tQPhdrLO57MSnvFgwty2/ap1OnZz4l1t1M8lWF5+rwr8ykjMNmvJeb24Hr5eBZdSZkPR/JWXG4Exlme6566AF6gP/ySSaSxBSm7CfnQrNkNvkP71vd8lEemjLN9Tbccx7MP68JQeMezn661GOaq/pLoswDp1z1g9zBXJkDPzlno8JxbD8t6T63prX8swt/5vIPzyF9PpzwWfKb6rzuV9mhWGUN5ni8lApKz+zw2gGu5TvdvDhsw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR18MB4204.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(54906003)(33656002)(110136005)(316002)(508600001)(38100700002)(83380400001)(86362001)(38070700005)(55016002)(26005)(8676002)(186003)(52536014)(66946007)(6506007)(8936002)(4326008)(71200400001)(107886003)(7696005)(66476007)(66556008)(76116006)(66446008)(122000001)(9686003)(5660300002)(64756008)(2906002)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3CpBetigz9wG2YywSfb2nj95vPQ1+yxCUKnXuE9e+ihzBP4fEWpM3ljO40Cp?= =?us-ascii?Q?Y4jQWX071VhSnG4bqMeMYJkgGMweeIVrKGbSVnevje+9QIruMtJbMb+T2C2t?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BRMYqX1wG97YUbEXdlZ5S6flxzD?= =?us-ascii?Q?1Df/Vxwlcl5hBS5nTK3zOyhv0SBf96+WR/YBh4hX3ksRqFpmAG9e88LI+U8l?= =?us-ascii?Q?KMLInMqwR0Cj2necsp7PjuQhvA3PHhcuXtGYQIp7rZEeyI2qvbTTa//ncJhY?= =?us-ascii?Q?o9dhB+ppYmTeczjm6Q40VrPLecpT5B7f4CDQ4Rx5U5uk63FmTTVm04QYwkJt?= =?us-ascii?Q?YffnuKNLoNH/Xh6k9gsr3HJ7iXgRt/BI4QTob7/Dvm8LwgZXhGQbagH9e1xB?= =?us-ascii?Q?v4fzCJCz8Sgop4fWCUt7u7aC+C39x2UzTGx8d81sg36vPWyZEz8Vyd2iFxNp?= =?us-ascii?Q?ohCMqeQekEq6J1i2LACdlKOp?= 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: BN9PR18MB4204.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3ef7628-6b14-4b2c-7dde-08d98f31b058 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2021 16:43:02.3418 (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: Do5hGjMrOX9v8DMK9NDoBnz0exdqHVNALAx5OhJVqhYTmu5jdXnsFAXIanLdNs05jiBDfWOwDZHtNLfDwNA7Dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR18MB1491 X-Proofpoint-ORIG-GUID: VF5msDVk7E5LUB39Q8ZJUzORsQyUu1U0 X-Proofpoint-GUID: VF5msDVk7E5LUB39Q8ZJUzORsQyUu1U0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-14_09,2021-10-14_02,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [v9 3/4] mempool/cnxk: add telemetry endpoints mempool 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" > -----Original Message----- > From: dev On Behalf Of Gowrishankar > Muthukrishnan > Sent: Wednesday, September 29, 2021 12:25 PM > To: dev@dpdk.org > Cc: Jerin Jacob Kollanukkaran ; Kiran Kumar > Kokkilagadda ; Nithin Kumar Dabilpuram > ; Sunil Kumar Kori ; Satha > Koteswara Rao Kottidi ; Ashwin Sekhar > Thalakalath Kottilveetil ; Pavan Nikhilesh > Bhagavatula ; Gowrishankar Muthukrishnan > > Subject: [EXT] [dpdk-dev] [v9 3/4] mempool/cnxk: add telemetry endpoints > mempool >=20 > External Email >=20 > ---------------------------------------------------------------------- > Adding telemetry endpoints to cnxk mempool driver. >=20 > Signed-off-by: Gowrishankar Muthukrishnan LGTM Reviewed-by: Harman Kalra Thanks Harman > --- > drivers/mempool/cnxk/cnxk_mempool_telemetry.c | 57 > +++++++++++++++++++ > drivers/mempool/cnxk/meson.build | 1 + > 2 files changed, 58 insertions(+) > create mode 100644 drivers/mempool/cnxk/cnxk_mempool_telemetry.c >=20 > diff --git a/drivers/mempool/cnxk/cnxk_mempool_telemetry.c > b/drivers/mempool/cnxk/cnxk_mempool_telemetry.c > new file mode 100644 > index 0000000000..c71798d7fd > --- /dev/null > +++ b/drivers/mempool/cnxk/cnxk_mempool_telemetry.c > @@ -0,0 +1,57 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(C) 2021 Marvell. > + */ > + > +#include > +#include > +#include > + > +#include > + > +#include "cnxk_mempool.h" > +#include "cnxk_telemetry.h" > + > +struct mempool_info_cb_arg { > + char *pool_name; > + struct rte_tel_data *d; > +}; > + > +static void > +mempool_info_cb(struct rte_mempool *mp, void *arg) { > + struct mempool_info_cb_arg *info =3D (struct mempool_info_cb_arg > *)arg; > + int aura_id; > + > + if (strncmp(mp->name, info->pool_name, > RTE_MEMZONE_NAMESIZE)) > + return; > + > + aura_id =3D roc_npa_aura_handle_to_aura(mp->pool_id); > + rte_tel_data_add_dict_int(info->d, "aura_id", aura_id); } > + > +static int > +mempool_tel_handle_info(const char *cmd __rte_unused, const char > *params, > + struct rte_tel_data *d) > +{ > + struct mempool_info_cb_arg mp_arg; > + char name[RTE_MEMZONE_NAMESIZE]; > + > + if (params =3D=3D NULL || strlen(params) =3D=3D 0) > + return -EINVAL; > + > + rte_strlcpy(name, params, RTE_MEMZONE_NAMESIZE); > + > + rte_tel_data_start_dict(d); > + mp_arg.pool_name =3D name; > + mp_arg.d =3D d; > + rte_mempool_walk(mempool_info_cb, &mp_arg); > + > + return 0; > +} > + > +RTE_INIT(cnxk_mempool_init_telemetry) > +{ > + rte_telemetry_register_cmd( > + "/cnxk/mempool/info", mempool_tel_handle_info, > + "Returns mempool info. Parameters: pool_name"); } > diff --git a/drivers/mempool/cnxk/meson.build > b/drivers/mempool/cnxk/meson.build > index e28a9e044d..d5d1978569 100644 > --- a/drivers/mempool/cnxk/meson.build > +++ b/drivers/mempool/cnxk/meson.build > @@ -11,6 +11,7 @@ endif > sources =3D files( > 'cnxk_mempool.c', > 'cnxk_mempool_ops.c', > + 'cnxk_mempool_telemetry.c', > 'cn9k_mempool_ops.c', > 'cn10k_mempool_ops.c', > ) > -- > 2.25.1