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 DCE00A0C47; Tue, 12 Oct 2021 18:14:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A96AE4111B; Tue, 12 Oct 2021 18:14:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 555C7410E0 for ; Tue, 12 Oct 2021 18:14:49 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="207998849" X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="207998849" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 09:13:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,368,1624345200"; d="scan'208";a="626007355" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 12 Oct 2021 09:13:49 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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 09:13:47 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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 09:13:47 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.100) 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 09:13:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HIMXi6jdQOSDlamQIHcrkByhehV1MVi7FqZblRa30lCy0vWJHKu287KpnZpVulwpmrv77DiVyV4P2N86qrXU583ol28WNYmoKIkWIxx9aYI8EQ2/1V8Ug9XyqvUGVdIsDGi52uRpllXR9cIyv1CcyoVc+S5HozQ7ZdDTJoFqKBGsn6EgdCNWldQp3xMv3K5I97Ij9zLEFG1W4HssC6jyPgWcRt1UM0ubPzwR5BDP80boHKMpaVMaBNIVHAdc+QVBO0VAowF7NGy5AO9Td90iRaxEtZjY79VFeSuahnsMGA5av/idOSiCpMKsi/hoZD9xQMHHiw9DmdPqARrmOb60rA== 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=P53WO5zo7A0D7Jldv+gtysbQ0S7jr1sHRVnJQHfRn+c=; b=X89SJv/e1//RtPZz2MuwZ+ylRzdLrC2X/PvAaLLxgWYjPfkyc79PaR91BM0cF4w4L4kTZZqXb4vDoRD6VP4+8+sI5MFejfXhbzD4mmRFNl9A5Psm2h2OdrnAgDdcsnpiBmNlwWEa5IdvPP8QHRWoPPz3aYtbxQyAxyb5UsoWK0lj/HOox3zkP0hX/zrKRf61MFQKJIhPW/xXUHWblgE2oz1fuh586FEZPDJuL7QhDZIpsuGnrrRTQIYkU7vfe7IBzjteTYakxq+YTChx59W/ronki30sFcP4uj3FHkzuPPlqONYmbKkOSK9lVDoER1PmQxnMHKSv5v/Sb9AUKMJzsQ== 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=P53WO5zo7A0D7Jldv+gtysbQ0S7jr1sHRVnJQHfRn+c=; b=OCPTXMcRYRw/Ka66zh252BFjFACRc4LAZRsKyWAKoo7bFQ2u3Fevgf38j9dSB0rt2M9Jg1BtOG4mqe2bnsC//4hfu0g4I5XDKsg7q7Nzo8XuezEqwWV4gJpoROExMoCC2ZupZCiRVPK6+asj4h9hd+x8j0izAKL3CMrWz3upwOs= Received: from CO1PR11MB4882.namprd11.prod.outlook.com (2603:10b6:303:97::8) by MW3PR11MB4634.namprd11.prod.outlook.com (2603:10b6:303:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 16:13:45 +0000 Received: from CO1PR11MB4882.namprd11.prod.outlook.com ([fe80::2df9:a342:1f49:6260]) by CO1PR11MB4882.namprd11.prod.outlook.com ([fe80::2df9:a342:1f49:6260%7]) with mapi id 15.20.4608.014; Tue, 12 Oct 2021 16:13:45 +0000 From: "Kundapura, Ganapati" To: "Naga Harish K, S V" , "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: AQHXv2pYRrzdauKWh0SsBMnnkH5GvKvPZbKAgAAgGfA= Date: Tue, 12 Oct 2021 16:13:44 +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: 663ac761-ea42-4254-a087-08d98d9b4410 x-ms-traffictypediagnostic: MW3PR11MB4634: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:284; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mQupTSIhPNW7qfQLZd6G3MuKz4PO6l2JX/0uOpeqFN0APsRD33KbiFruohdlzCa4l1YChr47lWvY5hZpG1+3xGsDRO2OHi304B3JWMHjMbJsRwbVeij0Xa1DauWkKC4z4k+HCdnizjK8rOMHL0P++Gq96XsgDMiziqyCupnCvRMcHXzNiE8yqbSiLKWZs0k7pfx8Hbj2SjO2Uy2SgqLsAuoks8+bXlrBCP/8TEVEVCzcmpU15Go9fp4ccy5q/qdXcKCyKcjAxy3ABKNctGAqkUx8vDLL3Y81rfoxPUr2aNKppAr4h7jU9dQ5F6lF2FWMenEjUXDb2/7nKbh9mwfYjkGF2yg0vgioww9XvD/5KOq6pBMTdz2XgeEKwgIwjfctvuVDJLafZLGNYsNbkUTWB6PwDKn+tCY6b1tPrblfPRggZ+3b5PLEG2QCP2dDGGqAzwvlZvruXR2/jedfkPTOHFJ1LiP9OXmrrNVQZZZ1UPbdHluqmcuv9bRboGq2ZMZPnIYCyYj4etQh1i209F8NgQKVzJC1OKKJ3mUM3t+zddG6a3i5dq4b0moORLalMX0DFvFVgpWZCZdr2iJqpnMJrbO5qU1S0/xE+v5E3Xon8LLbYXM3545P+UNTGCzx2hgXviWoLHV0XMxyqmhXdRPX/O0Ul8fmbay9Oxl5kCEYBB7Rgs8geCNlLmiG8ZyUU+26/NBkWndZDlrWoPuobxA58Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB4882.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(33656002)(2906002)(83380400001)(86362001)(38100700002)(122000001)(9686003)(76116006)(508600001)(4326008)(66946007)(6506007)(53546011)(186003)(26005)(8936002)(8676002)(7696005)(316002)(110136005)(55016002)(66446008)(66476007)(66556008)(38070700005)(71200400001)(64756008)(52536014)(5660300002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZXml/WurFzMPyBP4LsYs1LTq+bTobFAic9oRcVzWaLN73dm6fFG6jX1m4ktu?= =?us-ascii?Q?JPF1N3CT/vs3aoBuLvdLk6+m6UDwVNS20uLXYF4IEQfv0SQx8MXZ5EXLk+kA?= =?us-ascii?Q?/811rdvFl5ZjUGhmSeNGCCLGUiZ5FjnNZdPUEcVrWI5ygVuU6VrX9lUEcU8O?= =?us-ascii?Q?olHw2MBGk6SO/lbKrvUD3KyHDgOGyb0FIvMtVVb8pw5LuGC+dw07F2zqH+3q?= =?us-ascii?Q?gs5B+5S3IeZlzUaUvSRBu3VWtMBw+foPS7lYvSua8GCDhvQVAsoi4t/nmwL7?= =?us-ascii?Q?SKTlPXtFtOUBEDyMqWzKjoz0+R7lsBPVNX9dWMaM9V9PyBt1m1u5IZOPxjoS?= =?us-ascii?Q?xtQPiRuOd97OpXy5k0vmvjKEjEqiIRCodKglIQQ5mFn14WJy/vqMWs9dVN13?= =?us-ascii?Q?ndPteoDB1TF1+CsA4OCan8dFqvkJ+sbtXhr7WoThs7WjxPQZ7R+g3317ApRu?= =?us-ascii?Q?ylfX6zKguG/gKaWuEogtoXtbba1fNPUjiBry30VEQWa+y0fo7MT4vs4HOc6M?= =?us-ascii?Q?ykxuPq6AUUvatfbnlXqJ5HVBNB4ow0R+MMsvE75zesgY4FDO68Kn2AlbHeXq?= =?us-ascii?Q?SQjbG9SD/QVMLPDq6LfdlFlHlP3A9jLDaeoQhIE93E+5CZyg3rgJRfXGCcAp?= =?us-ascii?Q?P4mc1jtahEL33TGWAVHQ/ymHpb5ZUirk64R5NQr7x6RpRCh4dDzmvZNs4LZy?= =?us-ascii?Q?O8pk/6fCQIQ92YVVmZTNbky/7p5EGDA4lZmzYGRyCQfSLN/sWvhfC13l1kjs?= =?us-ascii?Q?FZI4Sy8thZHht7+7uYw/a/1uG8MwU3P88Ajq3lNgcyhMTBJX7qBT5Yc4kldb?= =?us-ascii?Q?HkqQuX4TXKVNT5Pp0dwf25kLl+kzgjKlCSVic3g6IB0KE2tV9isXKr81R/bM?= =?us-ascii?Q?80LGR3pZA9kqfNCvgzQKXWIHCyCfYV0oUXDLEKO3egl1dMjFoYfZntwewzQx?= =?us-ascii?Q?kCvGaGY3zR0rpBc2mYqJCoJAI/FrshQS6TBFkxRcJXXqA25IntAeSVUGtWHr?= =?us-ascii?Q?jpms+Y+82ymbgchJFYXeSoC+O7jfVQ33ZbBXAvNTRe0dNINebX+aeCvgxbvb?= =?us-ascii?Q?sfghvosbI6s6P4/ZbqlJognxlb4OEE11OcJOLk6WJa83NP8bDCS0cEuMxmyW?= =?us-ascii?Q?DlKU0zc+Li8UiULTyDG0dW4AzGCICCP7/XNGvny9eWGScdxrd6sJlvKYCN1H?= =?us-ascii?Q?hYgkD7Mpw/XSh/DML3rqqqa1aOUo2gO4KNgf2v1Ab/TF18X501N1qCjB+Gif?= =?us-ascii?Q?fhHetaq9SgoWT8WcKehXpHmM9TMcakjepcWOGMITDmf579+ByMCGbG/vo9rX?= =?us-ascii?Q?M1sYtf3mtr8mg6DvNV/Qd0A6?= 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: CO1PR11MB4882.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 663ac761-ea42-4254-a087-08d98d9b4410 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2021 16:13:45.0127 (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: mcBC60gOfA1yEFKEfVa+W+pWZNYAkZb+a6vI4GEaD4w0lQmxqPFu1RWAJLKfnkAZ7KWMbijfzXb9BlBkQHRXv1/vyV1XIEM4u8CkQOyfqIw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4634 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" Hi Harish, > -----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 >=20 >=20 >=20 > > -----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 inboun= d. > > > > > > +* **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; >=20 > When per Rx queue event buffer is used, there is a possibility of segfaul= t here > Because of null pointer deference. >=20 Queue_id is not passed to rte_event_eth_rx_adapter_stats_get() and there's = no way to=20 retrieve the queue id to return the queue's event buffer size and count. We= may need to=20 loop through all the queue's in the adapter which requires changes in rte_e= vent_eth_rx_adapter_stats structure to hold event buffer size and count for all the queues. Alternatively stats_get() can return event buffer size and count only if us= e_queue_event_buf =3D false i.e only for adapter wide event buffer. Do we need event buffer size and count in Rx adapter stats? > > > + 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(*para= ms)) > > > + 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(*para= ms)) > > > + 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(*para= ms)) > > > + 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(*token)= ) > > > + 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(*token)= ) > > > + 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