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 942EFA0C47; Sun, 31 Oct 2021 21:22:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C9A94068E; Sun, 31 Oct 2021 21:22:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id DF85A40689 for ; Sun, 31 Oct 2021 21:22:44 +0100 (CET) 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 ESMTP id 19V5Uw0j001707; Sun, 31 Oct 2021 13:22:44 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3c15jkc2pr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 31 Oct 2021 13:22:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GGdZDyqJeZkFG5LIGrxXkfWoN2PVH7KybckdRBjlxOR4KRYxAl+EdeDBKG5FGhUf0gYs7vHBwGseotXg2pvz0dHepSlpR6+OzpOjEn0VL1wb8js2q/nRezGHt+kBetlFd2C+La2oisCPbg9Kk2FIE4C1SYkkVR0kmfbrtYtoS602NnS1v5KcZPLhySQeFw8zewYdMZPwtI+Jto4CMGtPcGLQngR9N2oLEiVmaw/njV8OMSMP3D5gHLmGRRg3kFma1/FhkgjYjIhXRki21PRfsXEocS8qFvAW6N7n81/hCSPcD2s38ulLME72CPN3cVpNX/e0jF6JmieaJXsSqzzpOA== 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=tAN15WyimpobBG2VOG86ji61YEhmwUuxr2ZW82K94nE=; b=FEGrsS36+ynXk1CB8tKmgPXT6lJxbJkEYYZ34cG+MFm8KC6dxGgcli6eiAlkVE7ZTWo38tTVELq0Zn8p6ncwBWWQ/axiDIgKzL4VV0H8Z0ZxMl4PcNLyI3Aye+DVn104JJ2/zkop6fZeCiHMuBGbmBBzJOrXgMO/1KTUySvkhHzkxBeoDIeu9ZLkzdxJ5MSYvHf5zHg3847RyssWFEA3riTbf8M/DrpL1IuczdHP2n7zYLcx0PBIl4DMVHyCE5pvK8lmGgdriObcZjQgf3FgqSY88QV66mfvzhJFnFvrZ3/fKjb0EmhmJZkw4fE7Yj/GHLlOPJ/D4Hf3wK1eHBNefw== 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=tAN15WyimpobBG2VOG86ji61YEhmwUuxr2ZW82K94nE=; b=uCs2fSeIg9efnV012v7+0HAiCgxB611hMYh+UpPRVDeT+Yeq8oQuc84sqFe0R0KsJFrgdomsgxbxn2lFZOUHxQxamMe4khv/e4AROnLHX2t0b6KN7jrOsgopXFmCFFaQe2ia8fDqTd3MNMj/XZP490ZQ9muMqf+nM2/59hkyiiQ= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO6PR18MB4434.namprd18.prod.outlook.com (2603:10b6:5:35d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13; Sun, 31 Oct 2021 20:22:39 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::c41e:707:3f91:71b8%8]) with mapi id 15.20.4649.019; Sun, 31 Oct 2021 20:22:39 +0000 From: Akhil Goyal To: Radu Nicolau CC: "dev@dpdk.org" , "declan.doherty@intel.com" , "hemant.agrawal@oss.nxp.com" Thread-Topic: [EXT] [PATCH v5 4/7] examples/ipsec-secgw: support telemetry Thread-Index: AQHXyyoi6kl3iYF5pEKC7KwmVFgX8avtjxTw Date: Sun, 31 Oct 2021 20:22:39 +0000 Message-ID: References: <20210903112257.303961-1-radu.nicolau@intel.com> <20211027114530.2244661-1-radu.nicolau@intel.com> <20211027114530.2244661-5-radu.nicolau@intel.com> In-Reply-To: <20211027114530.2244661-5-radu.nicolau@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: 1256febc-1371-4720-184b-08d99cac2f9f x-ms-traffictypediagnostic: CO6PR18MB4434: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3KbAIxBSRXKqAgdB4uQ6WI9n68EDrTNIk1ritgh+USjyRFg31A/VJofOnRL0WmfYWFaUZUHhL2gR64IzXoZlRimGvPmzLVq/CDZFsrSWFqzjU9wvD2HnQldI0l+sVsjOfcx+1ogMWJ0p+FWZlUmdVnW7VvqWnf2iACb0cC45dCwJ1K5FgvrgfIzg+QjqHx98RJ25nKDRCm7F2C7sFn9NcAEXn6ghH7z96Ev4Sublu7N1k7HlWXdFzkyPl/pPkI26loou+HVDz3D1S+sqxIkL2qYqUMX3E/mKfJFDJe4bz1cSZmu+lAnKte2EQ55UvkHb29qLNOzzTeiPsOeVf1lYSyI5SDrY7g/UpQxk+wXUeJXaoR0JDrAozB8hyGq2adVtzx3cg3E5T4jGWolRfTBaL+n4+wCmBiClc5lyh/FiLlZ/xQt8JpXqtSGTmn/d1LiYAP1fqPwBjdxw3sWmvJEp8rv2IQrzyjaNeYIHiJ/4gG73HUqzmJsvDs2ezd6ydpAW8QP4bM0uvxvUDiC3tL1PZbZyQY3o4KOlroYRU/3tjS9aw/lKWFqsJ7DdziiA38owAjPzSqM1xKYhSUHHpiRnVhIScK29+tPFEezdGDhsGEcL4krQd4rLmwTkMIDowSSUrcUukDdVNR3KckiGskY0hMMx9OHq+1EbZXu2I0nWphKH3VnLUcV9Oc5XRGeG2u6L3yXpqgO73dHPAU5r5/yrKA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(5660300002)(66946007)(66446008)(55016002)(76116006)(2906002)(66476007)(508600001)(64756008)(86362001)(8676002)(66556008)(7696005)(122000001)(186003)(38100700002)(83380400001)(71200400001)(316002)(6506007)(9686003)(4326008)(52536014)(38070700005)(33656002)(54906003)(6916009)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DR2D2u12+9cUiZY5LChgri4T0olzQvplYJgeqM1AfjwWIeqxlwIclskAi43f?= =?us-ascii?Q?IXEq0xQZirp+yHyoo7w4CCuLYOz69AQrD9Jc4Z8sJWZzUBpJIebZCP5YVJe0?= =?us-ascii?Q?iCeJ9qwzA8GBt5mDBIgWlHZOOPitQlXFL3Teq/KNwU75aMHrE9wOPEhA1+9i?= =?us-ascii?Q?GC2GngKTk9vSuf2qk2P0PEQiJYU0QseZ5o+rgRYMqDhOsw31LHEQfeZ5Glj3?= =?us-ascii?Q?52ijJlahNsARAfUny67AuBY0e828efvwsaq7N6ijwA5K4+9XUq7rQv3rym0H?= =?us-ascii?Q?F3zlxZhUuvmGhqrL6RXnwsypCwzSQkyEXbm9HvhA2sHt03pVSWBax4pW/HyL?= =?us-ascii?Q?E82G+wOs/A/t1bAUL0TT53sl2L8S9eDNYSFi2pYbaztL5GzvYcu6TIlWNJ8b?= =?us-ascii?Q?um0D6fzFzPiDbQfQF9YeXoXkBK811jpgE0GWopEpbuouWUUAUDFGRKerHGW1?= =?us-ascii?Q?og+xaU1L3ZIBsHBbs4k+YWw2XN77BgkQI2SRy2M2jzujNauBIyLTx/IZxO8N?= =?us-ascii?Q?tyYA5y2So4y2ShKGxWwjCo3wCF37MS/SdO92Ic0QBO/5jB+A6DwjKjQorLzm?= =?us-ascii?Q?iWQvYPyon6BmojSoVZ3KbTPS1RRZ/+wZYfeYNII1yxAEPdUia2eP1Yuo2ZZn?= =?us-ascii?Q?y1G1FyBcTxQ7PG8rkdcsPlwIQhLzew5k7q8MVgc4CiVZSOjWQazAVtjlXmBl?= =?us-ascii?Q?YP9bvuQ/tYQIdcaGf5EtxhMpmW0V+kGJvvC9lmusalQku7/4tcB+GH6YCzmf?= =?us-ascii?Q?XIXEE1tXXWrXq085ItStleCcHoKt+s5OlnuAzWqNrvSGJRAx+RyapfojW6mF?= =?us-ascii?Q?Tjd3ZhnH/SmxpryfwXT7WXv1Xjc2Bbf6fZWCcnGUaCmZ1738+363jrY3TuaC?= =?us-ascii?Q?lsLcc7eTx/FwHOmG1suWmVwL8bFqPa+ROmy97BxtodCdrlf4gkbNBVvu3t0v?= =?us-ascii?Q?EI9yjWDEvAXav8WdUG8qDMXE6do4AfiUQv/jCbtLTOubFvz0/Do4edDoVeI0?= =?us-ascii?Q?WzZafFr8kB3ICacV3+OHgr3Hz5kbAcCe6Yn1HHeH3tuP4JC+eXm+4mAHpaN2?= =?us-ascii?Q?v3oP21UT4M4UXmUZIN7A2OgFkoLlQozc5jKBUVvokIsjZj5ELDMZInMNGRZe?= =?us-ascii?Q?BB6FgAU3rDY5QKXdx7kzsPwqZYiNZcI84q6CtTlL0vASzGhOV+c64WlGFDW5?= =?us-ascii?Q?GPqtCaK9gdeaxaMNe0YvONPdbD7Uz/Pmc8EVrNIfPSru7RVm1ydwvxlBZ3mB?= =?us-ascii?Q?Ukgutctn6i0aGigAuHALhS9L5+okJpIucR8tmUfEEts3342ZgiKWGmlNrOaK?= =?us-ascii?Q?xiIA9vYDG8ZWnC1xZTiXXaxhsKYH0V0AiQillsOXAcl0uJHpvl2+qWbpXi5T?= =?us-ascii?Q?1ZzYy6lbMdoc2U1x9RWbK4n7rPJzUdN4UGkwVRoOW7Y/cS9tF4lYv/EGY5WJ?= =?us-ascii?Q?dIKIKWuSy/Vm80oFdVFz4l4KmXBorrrZQ/1fAvRp2UNIQFAd7TMdmiXFu8Vj?= =?us-ascii?Q?Vn2yN930JYJvAWtjW//BHVaZj4rZndXY7DEmlluLhWfCdZGqt1VmCRRcnLxV?= =?us-ascii?Q?5NZYy5bs8syev4aWsdiPHx/9odcWzoJebVsILrPqy1RRAJfqEpujxckaLYdH?= =?us-ascii?Q?I0Wl+DKPhixIZEBuyCe4VKI9Q8BRSZ88RJqslTJDVIQONdxamCHku5+4jsJ7?= =?us-ascii?Q?kKx2YtOHiysG3a6g3ypWejiAW1Q=3D?= 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: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1256febc-1371-4720-184b-08d99cac2f9f X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2021 20:22:39.4131 (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: JpsyMjhO0ajJsPhlUobV+ct4SfZgPi7cauxYih59LqNSU1wIbie3HT5axqSRzk126m1Iam8lxyRHIzZuU3edDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB4434 X-Proofpoint-GUID: K6rWEfot8h_cSp4LTTuagRNHCRWqHdqB X-Proofpoint-ORIG-GUID: K6rWEfot8h_cSp4LTTuagRNHCRWqHdqB 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-31_06,2021-10-29_03,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH v5 4/7] examples/ipsec-secgw: support telemetry 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" > +static int > +handle_telemetry_cmd_ipsec_secgw_stats(const char *cmd __rte_unused, > + const char *params, struct rte_tel_data *data) > +{ > + uint64_t total_pkts_dropped =3D 0, total_pkts_tx =3D 0, total_pkts_rx = =3D 0; > + unsigned int coreid; > + > + rte_tel_data_start_dict(data); > + > + if (params) { > + coreid =3D (uint32_t)atoi(params); > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + return -EINVAL; > + > + total_pkts_dropped =3D core_statistics[coreid].dropped; > + total_pkts_tx =3D core_statistics[coreid].tx; > + total_pkts_rx =3D core_statistics[coreid].rx; > + > + } else { > + for (coreid =3D 0; coreid < RTE_MAX_LCORE; coreid++) { > + > + /* skip disabled cores */ > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + continue; > + > + total_pkts_dropped +=3D > core_statistics[coreid].dropped; > + total_pkts_tx +=3D core_statistics[coreid].tx; > + total_pkts_rx +=3D core_statistics[coreid].rx; > + } > + } > + > + /* add telemetry key/values pairs */ > + rte_tel_data_add_dict_u64(data, "packets received", > + total_pkts_rx); > + > + rte_tel_data_add_dict_u64(data, "packets transmitted", > + total_pkts_tx); > + > + rte_tel_data_add_dict_u64(data, "packets dopped", > + total_pkts_dropped); Fix typo dopped > + > + > + return 0; > +} > + > +static void > +update_lcore_statistics(struct ipsec_core_statistics *total, uint32_t co= reid) > +{ > + struct ipsec_core_statistics *lcore_stats; > + > + /* skip disabled cores */ > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + return; > + > + lcore_stats =3D &core_statistics[coreid]; > + > + total->rx =3D lcore_stats->rx; > + total->dropped =3D lcore_stats->dropped; > + total->tx =3D lcore_stats->tx; > + > + /* outbound stats */ > + total->outbound.spd6.protect +=3D lcore_stats- > >outbound.spd6.protect; > + total->outbound.spd6.bypass +=3D lcore_stats- > >outbound.spd6.bypass; > + total->outbound.spd6.discard +=3D lcore_stats- > >outbound.spd6.discard; > + > + total->outbound.spd4.protect +=3D lcore_stats- > >outbound.spd4.protect; > + total->outbound.spd4.bypass +=3D lcore_stats- > >outbound.spd4.bypass; > + total->outbound.spd4.discard +=3D lcore_stats- > >outbound.spd4.discard; > + > + total->outbound.sad.miss +=3D lcore_stats->outbound.sad.miss; > + > + /* inbound stats */ > + total->inbound.spd6.protect +=3D lcore_stats->inbound.spd6.protect; > + total->inbound.spd6.bypass +=3D lcore_stats->inbound.spd6.bypass; > + total->inbound.spd6.discard +=3D lcore_stats->inbound.spd6.discard; > + > + total->inbound.spd4.protect +=3D lcore_stats->inbound.spd4.protect; > + total->inbound.spd4.bypass +=3D lcore_stats->inbound.spd4.bypass; > + total->inbound.spd4.discard +=3D lcore_stats->inbound.spd4.discard; > + > + total->inbound.sad.miss +=3D lcore_stats->inbound.sad.miss; > + > + > + /* routing stats */ > + total->lpm4.miss +=3D lcore_stats->lpm4.miss; > + total->lpm6.miss +=3D lcore_stats->lpm6.miss; > +} > + > +static void > +update_statistics(struct ipsec_core_statistics *total, uint32_t coreid) > +{ > + memset(total, 0, sizeof(*total)); > + > + if (coreid !=3D UINT32_MAX) { > + update_lcore_statistics(total, coreid); > + } else { > + for (coreid =3D 0; coreid < RTE_MAX_LCORE; coreid++) > + update_lcore_statistics(total, coreid); > + } > +} > + > +static int > +handle_telemetry_cmd_ipsec_secgw_stats_outbound(const char *cmd > __rte_unused, > + const char *params, struct rte_tel_data *data) > +{ > + struct ipsec_core_statistics total_stats; > + > + struct rte_tel_data *spd4_data =3D rte_tel_data_alloc(); > + struct rte_tel_data *spd6_data =3D rte_tel_data_alloc(); > + struct rte_tel_data *sad_data =3D rte_tel_data_alloc(); > + > + unsigned int coreid =3D UINT32_MAX; > + > + /* verify allocated telemetry data structures */ > + if (!spd4_data || !spd6_data || !sad_data) > + return -ENOMEM; > + > + /* initialize telemetry data structs as dicts */ > + rte_tel_data_start_dict(data); > + > + rte_tel_data_start_dict(spd4_data); > + rte_tel_data_start_dict(spd6_data); > + rte_tel_data_start_dict(sad_data); > + > + if (params) { > + coreid =3D (uint32_t)atoi(params); > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + return -EINVAL; > + } > + > + update_statistics(&total_stats, coreid); > + > + /* add spd 4 telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(spd4_data, "protect", > + total_stats.outbound.spd4.protect); > + rte_tel_data_add_dict_u64(spd4_data, "bypass", > + total_stats.outbound.spd4.bypass); > + rte_tel_data_add_dict_u64(spd4_data, "discard", > + total_stats.outbound.spd4.discard); > + > + rte_tel_data_add_dict_container(data, "spd4", spd4_data, 0); > + > + /* add spd 6 telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(spd6_data, "protect", > + total_stats.outbound.spd6.protect); > + rte_tel_data_add_dict_u64(spd6_data, "bypass", > + total_stats.outbound.spd6.bypass); > + rte_tel_data_add_dict_u64(spd6_data, "discard", > + total_stats.outbound.spd6.discard); > + > + rte_tel_data_add_dict_container(data, "spd6", spd6_data, 0); > + > + /* add sad telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(sad_data, "miss", > + total_stats.outbound.sad.miss); > + > + rte_tel_data_add_dict_container(data, "sad", sad_data, 0); > + > + return 0; > +} > + > +static int > +handle_telemetry_cmd_ipsec_secgw_stats_inbound(const char *cmd > __rte_unused, > + const char *params, struct rte_tel_data *data) > +{ > + struct ipsec_core_statistics total_stats; > + > + struct rte_tel_data *spd4_data =3D rte_tel_data_alloc(); > + struct rte_tel_data *spd6_data =3D rte_tel_data_alloc(); > + struct rte_tel_data *sad_data =3D rte_tel_data_alloc(); > + > + unsigned int coreid =3D UINT32_MAX; > + > + /* verify allocated telemetry data structures */ > + if (!spd4_data || !spd6_data || !sad_data) > + return -ENOMEM; > + > + /* initialize telemetry data structs as dicts */ > + rte_tel_data_start_dict(data); > + rte_tel_data_start_dict(spd4_data); > + rte_tel_data_start_dict(spd6_data); > + rte_tel_data_start_dict(sad_data); > + > + /* add children dicts to parent dict */ > + > + if (params) { > + coreid =3D (uint32_t)atoi(params); > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + return -EINVAL; > + } > + > + update_statistics(&total_stats, coreid); > + > + /* add sad telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(sad_data, "miss", > + total_stats.outbound.sad.miss); This should be inbound I guess. > + > + rte_tel_data_add_dict_container(data, "sad", sad_data, 0); > + > + /* add spd 4 telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(spd4_data, "protect", > + total_stats.inbound.spd4.protect); > + rte_tel_data_add_dict_u64(spd4_data, "bypass", > + total_stats.inbound.spd4.bypass); > + rte_tel_data_add_dict_u64(spd4_data, "discard", > + total_stats.inbound.spd4.discard); > + > + rte_tel_data_add_dict_container(data, "spd4", spd4_data, 0); > + > + /* add spd 6 telemetry key/values pairs */ > + > + rte_tel_data_add_dict_u64(spd6_data, "protect", > + total_stats.inbound.spd6.protect); > + rte_tel_data_add_dict_u64(spd6_data, "bypass", > + total_stats.inbound.spd6.bypass); > + rte_tel_data_add_dict_u64(spd6_data, "discard", > + total_stats.inbound.spd6.discard); > + > + rte_tel_data_add_dict_container(data, "spd6", spd6_data, 0); > + > + return 0; > +} > + > +static int > +handle_telemetry_cmd_ipsec_secgw_stats_routing(const char *cmd > __rte_unused, > + const char *params, struct rte_tel_data *data) > +{ > + struct ipsec_core_statistics total_stats; > + > + struct rte_tel_data *lpm4_data =3D rte_tel_data_alloc(); > + struct rte_tel_data *lpm6_data =3D rte_tel_data_alloc(); > + > + unsigned int coreid =3D UINT32_MAX; > + > + /* initialize telemetry data structs as dicts */ > + rte_tel_data_start_dict(data); > + rte_tel_data_start_dict(lpm4_data); > + rte_tel_data_start_dict(lpm6_data); > + > + > + if (params) { > + coreid =3D (uint32_t)atoi(params); > + if (rte_lcore_is_enabled(coreid) =3D=3D 0) > + return -EINVAL; > + } > + > + update_statistics(&total_stats, coreid); > + > + /* add lpm 4 telemetry key/values pairs */ > + rte_tel_data_add_dict_u64(lpm4_data, "miss", > + total_stats.outbound.spd4.protect); Again typo, total_stats.lpm4.miss > + > + rte_tel_data_add_dict_container(data, "IPv4 LPM", lpm4_data, 0); > + > + /* add lpm 6 telemetry key/values pairs */ > + rte_tel_data_add_dict_u64(lpm6_data, "miss", > + total_stats.outbound.spd6.protect); Here also Total_stats.lpm6.miss > + > + rte_tel_data_add_dict_container(data, "IPv6 LPM", lpm6_data, 0); > + > + return 0; > +} > + > +static void > +ipsec_secgw_telemetry_init(void) > +{ > + rte_telemetry_register_cmd("/examples/ipsec-secgw/stats", > + handle_telemetry_cmd_ipsec_secgw_stats, > + "Returns outbound global stats. " Returns global stats > + "Optional Parameters: int "); > + > + rte_telemetry_register_cmd("/examples/ipsec- > secgw/stats/outbound", > + handle_telemetry_cmd_ipsec_secgw_stats_outbound, > + "Returns outbound global stats. " > + "Optional Parameters: int "); > + > + rte_telemetry_register_cmd("/examples/ipsec- > secgw/stats/inbound", > + handle_telemetry_cmd_ipsec_secgw_stats_inbound, > + "Returns outbound global stats. " This should be inbound. > + "Optional Parameters: int "); > + > + rte_telemetry_register_cmd("/examples/ipsec-secgw/stats/routing", > + handle_telemetry_cmd_ipsec_secgw_stats_routing, > + "Returns outbound global stats. " Returns routing stats. Please review the patch for any other Typos before submitting v6.