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 9BFC7A0C4D; Wed, 13 Oct 2021 08:48:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6139A40150; Wed, 13 Oct 2021 08:48:33 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id A5C3140142 for ; Wed, 13 Oct 2021 08:48:31 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="226136136" X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="226136136" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 23:48:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="562999880" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 12 Oct 2021 23:48:30 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 12 Oct 2021 23:48:30 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2242.12 via Frontend Transport; Tue, 12 Oct 2021 23:48:30 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 12 Oct 2021 23:48:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AceXY7pjJw47TF+G5NYRbM4oH/gyhMvxN+MfVakXVwQlObspZcbg/u4r/0slN5LxkNf+Rq/i6KTzHGZnWxieP6ghO5vgQeoGcWsmEe7lH7UtrQFU5cLTiLP9RCYQO/bpLjTuKXvZag1w0Jox379dPCwpQZWbSAlfoohuYPJQzZBxJxTTmRe/ixcblTK4UvMdYi7XyQUJgqQiRZHk0qP5RoTtApZdTDlN/C98SXGAp9F4mppVts4rXUI5s71dbLCNuhTCI/p8ZHq8n3O4GSj1ZRHnTxP2kWGdjdPm0EM/Uye8vw7Em32GBl1buqFQ8LRaoBUUuoPS9PfA5efvIkMnqA== 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=e0c6PtfF9CDSokn/s2t4GDmmuz7Zxmj3B/X5ubJVWkE=; b=oNea2r+JNTWQ1uIt2D0FZon2em6vgbmUXiInshjW3PY6XuSWs+h4J8amMzsj5m3mi96YKqckOIrziRunhGB/TxlvxMQWH4tAi85hkf0It9bomCLNDIczoachXk51CbCPuIFRWCQ2QPB0OXuUB3wYrmu5TnbuIL5DiI6rKTrLrnChiA7umK06/o5jUa7qhmSItGX//Z7xioD/S8Rhej5Qqaa8rcG/LLPvC1XQwFXPtEBxXs4jKo1NvHbDE6ohE5PoNHfZu3MHI0WojqKTxODC/WkvLWV0MYcpkF2m8sCQDjDRDp87j6pAIAf8X15pGQKg9afApdtQhxbbQIQ+1vkIDQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e0c6PtfF9CDSokn/s2t4GDmmuz7Zxmj3B/X5ubJVWkE=; b=UfRknYR4D7ID88XyEJ+1WUw+zJW7EWwfmYMjepSJ2nZMoOecsD9tM5ouQtyvhgxvHGblr6/p3xh0cglFN3RqVSY6j/hiyYqZwQ2fZr6KMhQQHc4F2bF5vsghDa2ruL27Cya1YEWIab7p36JsaeF8/g9E0CuLAC912qd/rjL3Nl4= Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by DM5PR11MB1308.namprd11.prod.outlook.com (2603:10b6:3:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Wed, 13 Oct 2021 06:48:28 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::89fd:9564:349a:c59e]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::89fd:9564:349a:c59e%4]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 06:48:28 +0000 From: "Naga Harish K, S V" To: "Kundapura, Ganapati" , "Jayatheerthan, Jay" , "jerinjacobk@gmail.com" , "dev@dpdk.org" CC: "Kinsella, Ray" , Thomas Monjalon , David Marchand Thread-Topic: [PATCH v3] eventdev/rx_adapter: add telemetry callbacks Thread-Index: AQHXv1N9LiQWIJcmVk2wXDxJ0ft+vqvPVXnwgAAP2RCAACRIAIAA89EQ Date: Wed, 13 Oct 2021 06:48:28 +0000 Message-ID: References: <20211007134607.2351243-1-ganapati.kundapura@intel.com> <20211012102526.361419-1-ganapati.kundapura@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fbe6c5b8-e131-4427-aed0-08d98e1576a2 x-ms-traffictypediagnostic: DM5PR11MB1308: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:334; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lI/W01YCu/BYSUl9/R3UL8jTlv/AZOTedbA/5ZKSDYfGdr6YgC7P2epDJLYnxe2Sl38En1kMfEh+/InYSxbfnzdQLBEaXt5PUH67yGkzDx5OvR5UpxIBtZJ9igZzrtR0iYSdhOSTCpULHEoLOjYVr0O/sgxEZoCHA3ODcUsmjUNqWluJEfoLAaj9Bc5+BEk1EJgb3ONvNZA4LBr7NVbR84HDx8b4bft7hAaFMoL9s4zx8Mc//G567AYmnQBW4f+uMXUfUbY7aeLp1DPK2LuIlmnZZNvG3qZF/PJh49mxO21BhVGTlXSYWgWTw0mvEKc6udsKCKflnVMoEVywpbqXfnQILLOZJuMPSp3aid9U/hunuuzKy20PACEu3Rm3NYDH0jrf4wN95ZoQ1a+yxFjNMjzNhtukJFEXkFKm03YsmivYOIZKbHAb/M6PwYm+ufhvuoP4UJgro7+BMjLTsCZAUzsdeR0Jc1D1UhOE+L2NOJXUVVpXyuJ1IfTTG4WZKUg3XHP8FXh4JftiT1sScx0N2PA/XYE54EeFqVrp7Vk8NPT5QbTJF9bWVMEGxiffLwk7sepsJDx/coRDkQys6lRxUndvJhV97YuYwePndts98DXdO7YpUmudEWTKyI+JewxDEvSuv1iTGpQga5sf2ysiq66HNJgLsR7Now14/KtrLlz5r9D1EX3tLLFiZA0K/E1cbitITvT9qZqOyr+q8EU3Aw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55236004)(86362001)(26005)(110136005)(122000001)(33656002)(5660300002)(30864003)(316002)(54906003)(38070700005)(7696005)(38100700002)(64756008)(2906002)(53546011)(71200400001)(8676002)(4326008)(66946007)(9686003)(66476007)(52536014)(186003)(82960400001)(76116006)(66556008)(8936002)(83380400001)(508600001)(55016002)(66446008)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kFmSCJum6UZg8D9htMi8keLK55T8+O4B9WxNppK1HARYapaFvgMLQbC34o30?= =?us-ascii?Q?3NU1S1EP0noDJ4TeUiOkb9Gr6GjilYPZpzYipRRU+0dJ+9ofq6CsvlnSblGh?= =?us-ascii?Q?aS2QHoOycdsmqPpl1hoR7RSyMs/xxtiNazFBteKW4aX1/QP44e8fNHRRSnDL?= =?us-ascii?Q?5HuVYGFX0lQ+freA76KVlVEWTQjMeG7x3LmAGtN31lTm/K+g1pwOVfVqu4NA?= =?us-ascii?Q?/0LhQgb8F95WujRfh8WazKjGaCf0+Y1TObLqcknQtpYHlJGgUH0EbskiAz2W?= =?us-ascii?Q?aaI9V+x1mI3lqiU5ge6whuQFWtbSyIqsVbqzDeKCzLhrs0rdpsC08aYga9XD?= =?us-ascii?Q?R38nIsbOgog79FoJxyn8r5ZjBPW+UbsBCYVaKgFbWwhaUf5xEUFEbA/Iud+d?= =?us-ascii?Q?euXiIPrDIVfG3va+wM1IuMqB+wPfYeOnF/926Mztd2PgCLOccB0lUksWwYoz?= =?us-ascii?Q?XufO2z+JhbOjHmQ9hPssZdD1Syd2uVp+9DP96gg6Vt5uD5A5baVGBYOEaTZt?= =?us-ascii?Q?A9/BfWWYhon3gBZBKxjPwL7dMQEEC9LkyxvBKwaIZ3ugNMptxaijOhvntaeh?= =?us-ascii?Q?K9IL3OkARyTX5wQhpvks726QhvCSmVxAIndnOyT0FZeRQvEjK9Nox/Pc7gry?= =?us-ascii?Q?K0llbDAw9p8NOQi7JaUm3eBWsiPMZ+TQPAfkp1wNEoApUSXXLMxOc/zyTzfi?= =?us-ascii?Q?YknzylVPDcrG96GnD4OL/7Lv4fNV554zW2llgSsBekWjavCcyrjSPPYwBtsJ?= =?us-ascii?Q?pF5Pzplhw245KVXqcZu0BXLXugPQ4ZOr8W3vYRPLOQU8Z68oZydR/qOqmrEO?= =?us-ascii?Q?M6/4qh/nLiQ+vWfn0klEfReAnIsSIjcRXPnRHF4+ULhUkXefIwuQTpaylrgQ?= =?us-ascii?Q?NgDIvLCERaZvjG+2HVIBxa8mvjtJcHzVeHUErpo/tmGqpJKZzugz4r+kiaoq?= =?us-ascii?Q?hPcPMRE9TCiEFh6K4WGUlquaGMnQN7sJbGn3BqSOOkteB34Dw7LvmzcUHcxS?= =?us-ascii?Q?nbQMrKARVn8aBQsY8aB4fIuJYIqdwiNZD+Sm48IxTIbQ3zDBxVFORzECrW8Q?= =?us-ascii?Q?sNcbZ3Ba5aCxCFEa03NEngizVgR20jTf6iK9Ku27ga8byyXijWIK8u9MIkE8?= =?us-ascii?Q?UpkowgXRLi4+l4UsxdJSyLT4oaaPQa09W2uko7Tlbs9l+IfEsQe5iPDx/Dk8?= =?us-ascii?Q?INkMMeiIodFpLqjrchJ4EPuwnABVWrii996rx8Ryy2yaCXemqgXKfsTeXdtn?= =?us-ascii?Q?JfElKAAUPIEHJLoY0+1ytISC+eIbLGWrXIAM3i+6njcZi1vfa2QVZfbx6n+e?= =?us-ascii?Q?Al5mUcxdpb/glh4AUR92i07B?= 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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbe6c5b8-e131-4427-aed0-08d98e1576a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2021 06:48:28.4566 (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: gcqCp3t0vXAdHKCPMO+Vage0lqGc5boezsHAvtcmhs9zd+NoeBOJEVvGLUTjwoM4P4CqHc5YFgf95TY07YYNj4U8UMv7HhzXnp7a0WEkTNw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1308 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] eventdev/rx_adapter: 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" > -----Original Message----- > From: Kundapura, Ganapati > Sent: Tuesday, October 12, 2021 9:44 PM > To: Naga Harish K, S V ; Jayatheerthan, Jay > ; jerinjacobk@gmail.com; dev@dpdk.org > Cc: Kinsella, Ray ; Thomas Monjalon > ; David Marchand > Subject: RE: [PATCH v3] eventdev/rx_adapter: add telemetry callbacks >=20 > Hi Harish, >=20 > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: 12 October 2021 19:36 > > To: Jayatheerthan, Jay ; Kundapura, > > Ganapati ; jerinjacobk@gmail.com; > > dev@dpdk.org > > Cc: Kinsella, Ray ; Thomas Monjalon > > ; David Marchand > > > Subject: RE: [PATCH v3] eventdev/rx_adapter: add telemetry callbacks > > > > > > > > > -----Original Message----- > > > From: dev On Behalf Of Jayatheerthan, Jay > > > Sent: Tuesday, October 12, 2021 6:39 PM > > > To: Kundapura, Ganapati ; > > > jerinjacobk@gmail.com; dev@dpdk.org > > > Cc: Kinsella, Ray ; Thomas Monjalon > > > ; David Marchand > > > > Subject: Re: [dpdk-dev] [PATCH v3] eventdev/rx_adapter: add > > > telemetry callbacks > > > > > > Acked by: Jay Jayatheerthan > > > > > > + @Ray Kinsella @Thomas Monjalon @David Marchand > > > > > > > -----Original Message----- > > > > From: Kundapura, Ganapati > > > > Sent: Tuesday, October 12, 2021 3:55 PM > > > > To: jerinjacobk@gmail.com; dev@dpdk.org > > > > Cc: Jayatheerthan, Jay > > > > Subject: [PATCH v3] eventdev/rx_adapter: add telemetry callbacks > > > > > > > > Added telemetry callbacks to get Rx adapter stats, reset stats and > > > > to get Rx queue config information. > > > > > > > > Signed-off-by: Ganapati Kundapura > > > > --- > > > > v3: > > > > * Updated release notes > > > > * Addressed review comments > > > > > > > > v2: > > > > * Fixed checkpatch warning > > > > --- > > > > > > > > diff --git a/doc/guides/rel_notes/release_21_11.rst > > > > b/doc/guides/rel_notes/release_21_11.rst > > > > index dfc2cbd..9955e52 100644 > > > > --- a/doc/guides/rel_notes/release_21_11.rst > > > > +++ b/doc/guides/rel_notes/release_21_11.rst > > > > @@ -130,6 +130,10 @@ New Features > > > > * Added tests to validate packets hard expiry. > > > > * Added tests to verify tunnel header verification in IPsec inbo= und. > > > > > > > > +* **Updated rte_event_eth_rx_adapter_stats structure > > > > + * Added 'uint64_t rx_event_buf_count' > > > > + * Added 'uint64_t rx_event_buf_size' > > > > + > > > > > > > > Removed Items > > > > ------------- > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > > > > b/lib/eventdev/rte_event_eth_rx_adapter.c > > > > index 9ac976c..7e3bf62 100644 > > > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > > > @@ -18,6 +18,7 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > > > > > #include "rte_eventdev.h" > > > > #include "eventdev_pmd.h" > > > > @@ -2852,6 +2853,7 @@ rte_event_eth_rx_adapter_stats_get(uint8_t > id, > > > > struct rte_event_eth_rx_adapter_stats *stats) { > > > > struct rte_event_eth_rx_adapter *rx_adapter; > > > > + struct rte_eth_event_enqueue_buffer *buf; > > > > struct rte_event_eth_rx_adapter_stats dev_stats_sum =3D { 0 }; > > > > struct rte_event_eth_rx_adapter_stats dev_stats; > > > > struct rte_eventdev *dev; > > > > @@ -2887,8 +2889,11 @@ > rte_event_eth_rx_adapter_stats_get(uint8_t > > > id, > > > > if (rx_adapter->service_inited) > > > > *stats =3D rx_adapter->stats; > > > > > > > > + buf =3D &rx_adapter->event_enqueue_buffer; > > > > stats->rx_packets +=3D dev_stats_sum.rx_packets; > > > > stats->rx_enq_count +=3D dev_stats_sum.rx_enq_count; > > > > + stats->rx_event_buf_count =3D buf->count; > > > > When per Rx queue event buffer is used, there is a possibility of > > segfault here Because of null pointer deference. > > > Queue_id is not passed to rte_event_eth_rx_adapter_stats_get() and > there's no way to retrieve the queue id to return the queue's event buffe= r > size and count. We may need to loop through all the queue's in the adapte= r > which requires changes in rte_event_eth_rx_adapter_stats structure to hol= d > event buffer size and count for all the queues. >=20 > Alternatively stats_get() can return event buffer size and count only if > use_queue_event_buf =3D false i.e only for adapter wide event buffer. >=20 This approach looks ok. When use_queue_event_buf =3D true, buffer size and = count Can be returned as zero. > Do we need event buffer size and count in Rx adapter stats? >=20 > > > > + stats->rx_event_buf_size =3D buf->events_size; > > > > > > > > return 0; > > > > } > > > > @@ -3052,3 +3057,146 @@ > > > > rte_event_eth_rx_adapter_queue_conf_get(uint8_t id, > > > > > > > > return 0; > > > > } > > > > + > > > > +#define RXA_ADD_DICT(stats, s) rte_tel_data_add_dict_u64(d, #s, > > > > +stats.s) > > > > + > > > > +static int > > > > +handle_rxa_stats(const char *cmd __rte_unused, > > > > + const char *params, > > > > + struct rte_tel_data *d) > > > > +{ > > > > + uint8_t rx_adapter_id; > > > > + struct rte_event_eth_rx_adapter_stats rx_adptr_stats; > > > > + > > > > + if (params =3D=3D NULL || strlen(params) =3D=3D 0 || !isdigit(*pa= rams)) > > > > + return -1; > > > > + > > > > + /* Get Rx adapter ID from parameter string */ > > > > + rx_adapter_id =3D atoi(params); > > > > + > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > > _id, > > > > +-EINVAL); > > > > + > > > > + /* Get Rx adapter stats */ > > > > + if (rte_event_eth_rx_adapter_stats_get(rx_adapter_id, > > > > + &rx_adptr_stats)) { > > > > + RTE_EDEV_LOG_ERR("Failed to get Rx adapter stats\n"); > > > > + return -1; > > > > + } > > > > + > > > > + rte_tel_data_start_dict(d); > > > > + rte_tel_data_add_dict_u64(d, "rx_adapter_id", rx_adapter_id); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_packets); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_poll_count); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_dropped); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_enq_retry); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_event_buf_count); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_event_buf_size); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_enq_count); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_enq_start_ts); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_enq_block_cycles); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_enq_end_ts); > > > > + RXA_ADD_DICT(rx_adptr_stats, rx_intr_packets); > > > > + > > > > + return 0; > > > > +} > > > > + > > > > +static int > > > > +handle_rxa_stats_reset(const char *cmd __rte_unused, > > > > + const char *params, > > > > + struct rte_tel_data *d __rte_unused) { > > > > + uint8_t rx_adapter_id; > > > > + > > > > + if (params =3D=3D NULL || strlen(params) =3D=3D 0 || ~isdigit(*pa= rams)) > > > > + return -1; > > > > + > > > > + /* Get Rx adapter ID from parameter string */ > > > > + rx_adapter_id =3D atoi(params); > > > > + > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > > _id, > > > > +-EINVAL); > > > > + > > > > + /* Reset Rx adapter stats */ > > > > + if (rte_event_eth_rx_adapter_stats_reset(rx_adapter_id)) { > > > > + RTE_EDEV_LOG_ERR("Failed to reset Rx adapter stats\n"); > > > > + return -1; > > > > + } > > > > + > > > > + return 0; > > > > +} > > > > + > > > > +static int > > > > +handle_rxa_get_queue_conf(const char *cmd __rte_unused, > > > > + const char *params, > > > > + struct rte_tel_data *d) > > > > +{ > > > > + uint8_t rx_adapter_id; > > > > + uint16_t rx_queue_id; > > > > + int eth_dev_id; > > > > + char *token, *l_params; > > > > + struct rte_event_eth_rx_adapter_queue_conf queue_conf; > > > > + > > > > + if (params =3D=3D NULL || strlen(params) =3D=3D 0 || !isdigit(*pa= rams)) > > > > + return -1; > > > > + > > > > + /* Get Rx adapter ID from parameter string */ > > > > + l_params =3D strdup(params); > > > > + token =3D strtok(l_params, ","); > > > > + rx_adapter_id =3D strtoul(token, NULL, 10); > > > > + > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > > _id, > > > > +-EINVAL); > > > > + > > > > + token =3D strtok(NULL, ","); > > > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*toke= n)) > > > > + return -1; > > > > + > > > > + /* Get device ID from parameter string */ > > > > + eth_dev_id =3D strtoul(token, NULL, 10); > > > > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(eth_dev_id, -EINVAL); > > > > + > > > > + token =3D strtok(NULL, ","); > > > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*toke= n)) > > > > + return -1; > > > > + > > > > + /* Get Rx queue ID from parameter string */ > > > > + rx_queue_id =3D strtoul(token, NULL, 10); > > > > + if (rx_queue_id >=3D rte_eth_devices[eth_dev_id].data- > > > >nb_rx_queues) { > > > > + RTE_EDEV_LOG_ERR("Invalid rx queue_id %u", > > > rx_queue_id); > > > > + return -EINVAL; > > > > + } > > > > + > > > > + token =3D strtok(NULL, "\0"); > > > > + if (token !=3D NULL) > > > > + RTE_EDEV_LOG_ERR("Extra parameters passed to eventdev" > > > > + " telemetry command, igrnoring"); > > > > + > > > > + if (rte_event_eth_rx_adapter_queue_conf_get(rx_adapter_id, > > > eth_dev_id, > > > > + rx_queue_id, > > > &queue_conf)) { > > > > + RTE_EDEV_LOG_ERR("Failed to get Rx adapter queue > > > config"); > > > > + return -1; > > > > + } > > > > + > > > > + rte_tel_data_start_dict(d); > > > > + rte_tel_data_add_dict_u64(d, "rx_adapter_id", rx_adapter_id); > > > > + rte_tel_data_add_dict_u64(d, "eth_dev_id", eth_dev_id); > > > > + rte_tel_data_add_dict_u64(d, "rx_queue_id", rx_queue_id); > > > > + RXA_ADD_DICT(queue_conf, rx_queue_flags); > > > > + RXA_ADD_DICT(queue_conf, servicing_weight); > > > > + RXA_ADD_DICT(queue_conf.ev, queue_id); > > > > + RXA_ADD_DICT(queue_conf.ev, sched_type); > > > > + RXA_ADD_DICT(queue_conf.ev, priority); > > > > + RXA_ADD_DICT(queue_conf.ev, flow_id); > > > > + > > > > + return 0; > > > > +} > > > > + > > > > +RTE_INIT(rxa_init_telemetry) > > > > +{ > > > > + rte_telemetry_register_cmd("/eventdev/rxa_stats", > > > > + handle_rxa_stats, > > > > + "Returns Rx adapter stats. Parameter: rxa_id"); > > > > + > > > > + rte_telemetry_register_cmd("/eventdev/rxa_stats_reset", > > > > + handle_rxa_stats_reset, > > > > + "Reset Rx adapter stats. Parameter: rxa_id"); > > > > + > > > > + rte_telemetry_register_cmd("/eventdev/rxa_queue_conf", > > > > + handle_rxa_get_queue_conf, > > > > + "Returns Rx queue config. Parameter: rxa_id, dev_id, > > > queue_id"); } > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h > > > > b/lib/eventdev/rte_event_eth_rx_adapter.h > > > > index 70ca427..c4257e7 100644 > > > > --- a/lib/eventdev/rte_event_eth_rx_adapter.h > > > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.h > > > > @@ -232,6 +232,10 @@ struct rte_event_eth_rx_adapter_stats { > > > > */ > > > > uint64_t rx_intr_packets; > > > > /**< Received packet count for interrupt mode Rx queues */ > > > > + uint64_t rx_event_buf_count; > > > > + /**< Rx event buffered count */ > > > > + uint64_t rx_event_buf_size; > > > > + /**< Rx event buffer size */ > > > > }; > > > > > > > > /** > > > > -- > > > > 2.6.4