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 E3B6AA034C; Wed, 22 Jun 2022 19:30:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A4B2427F1; Wed, 22 Jun 2022 19:30:09 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id F1560427EE for ; Wed, 22 Jun 2022 19:30:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655919008; x=1687455008; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=uLIKS7/ut5P4b/2mhwbSkFmqghKusCyMrqb7ybb/y/Y=; b=b1kg/WAgMehN/KyxkV+zvT3a9vvjixkeOQGMIWlxOdaOpVCZFln5gDfZ CwsJpub9puqgXrNM9Hg4RlKh1hiPn01vLps4AA0T/0X7nsFL4m1Ik6tVb FyZslaV5nODqz8A7dWFw0e++fke9x9oV9Gx/QTywLV/pW86TmjikdUUvk xKqjQtGTC1J3AltmHrOCkWPhXytbAUwuqOTlyw+YCEdCds9ZmaiDy0sc2 4SruJoUZA3u94NpChhETj5XExh9L9tQzdVrLf1/FBZD0VvgbyeA7/ZnOc IdHMAtbeagQ6quBmV7L3mHMNA51oYCdDd3ZY/JlErhp48E4K/f4qCUeUl g==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="260303735" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="260303735" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 10:29:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="690608402" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP; 22 Jun 2022 10:29:41 -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.2308.27; Wed, 22 Jun 2022 10:29:40 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) 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.2308.27; Wed, 22 Jun 2022 10:29:40 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 22 Jun 2022 10:29:40 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 22 Jun 2022 10:29:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X5a4kvziHwXC14trZE9LOnMJqG6flCoktnN5YVxvbZzzQ+II+P6+4TPrNlA/DigjgWr8nCBlwo1rDOVQoF0zNKxp5x1KWakShB5wT1/9i8aEuvF8KVbyFXSsIt6orKLQ/ykByKHs82NBkT9k7I9LgOvGqecUK2Dqjx3f5gGrcoPwBbW2LsflIxpWMHB1mAiq2BG6uLQA/n2KYeW2XEXTQiJiaDDJjO5iVGOJ/0jTeG05+vSltqbANUcn+uBwSs6SHpf4v+W0OtUqmpb5NmBBGNVM0SIWkYJHWSw+alnIUbtwgG+MFYyB/J4fiZ15cfwLRcXloEfb6SSXbsxS5fteGQ== 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=nrtI3wfSw+p+rziVz62aFg0Zl91H8CDOua1rYfViOuY=; b=oV5jA5skhOx3bIaA1WQXFsen23/MUEtSkCr5EkizkYdH5bE3LGXR6POXj+o1ffaV7VLc86GCo6zF+xfqTU6KnBXdh/jceNVKvsd/0koG3W+4mMrBnTMpw8oYW/KL/e82KvOhZn37e9UTc/wzzJ8kgR+BcS2yDTlP2/oFU3UB7Yz21BuTJrqKptU7kq608fIdpNx8nFIsAJD7yLjY8zLjsKgrc6hzzj0yw+6F5y+Q7nQB9zZqmRQttZSbDPN0nZXPYLLoqzvAtgpyls9Rd8+Ka5MlK7z+ZkD7G6idFIUS/BIZlFQZ19SJsGc3eYv8A1pCK1nYmDueCHbbmrpQoc+V3w== 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 Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by MN2PR11MB3615.namprd11.prod.outlook.com (2603:10b6:208:ec::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Wed, 22 Jun 2022 17:29:38 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::3d91:62dc:c665:9083]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::3d91:62dc:c665:9083%6]) with mapi id 15.20.5353.022; Wed, 22 Jun 2022 17:29:38 +0000 From: "Naga Harish K, S V" To: "Kundapura, Ganapati" , "dev@dpdk.org" , "jerinj@marvell.com" , "Jayatheerthan, Jay" Subject: RE: [PATCH v8 2/7] eventdev/eth_rx: add telemetry callback for instance get Thread-Topic: [PATCH v8 2/7] eventdev/eth_rx: add telemetry callback for instance get Thread-Index: AQHYhli4nBIReHTsME2kLOKi7VhdEa1brpBQ Date: Wed, 22 Jun 2022 17:29:38 +0000 Message-ID: References: <20220622103756.421869-1-ganapati.kundapura@intel.com> <20220622165405.533042-1-ganapati.kundapura@intel.com> <20220622165405.533042-2-ganapati.kundapura@intel.com> In-Reply-To: <20220622165405.533042-2-ganapati.kundapura@intel.com> 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.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c16b1340-d353-4a46-f477-08da5474c873 x-ms-traffictypediagnostic: MN2PR11MB3615:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zwB3DI8cBcFTPwMww5AbmmkM+cwz0p1Voo2OVQbQxw9SNl33FPrPrYO2LfRG9V4HXah82n7aaxuFjE/VoiyCJCEBmjj9v4f9dMWh8recSNOCDxTDCEGplCMRSoedxB12Q75iCsRRwuUkaUuxvmUy0zQSUTIJA1a9TA+SuoY0bn75X3lZvYxDiCZW/mN38aN3Ch1bjAa2rCtQ7ZZ+GSC0AzdlT0/0H6A4/4flvcN6UFHwK/Pa8warh18YkvlobzWv2xwpywNZynAgeY8zNAhBHDnQClLxMgXCIT9Xukm2fgLdhThQDgOfYCrwTGEV4fqQnSgJWraagVC9Urp3Vn57TWjqWWnplWXyp8E+KqrFnOr+ARVLDurcWrmaxZXKMxw4kR1seQFVy/UP7QgIpoefl3NVCdHmBQ4KIQEvvPafcs4iFq65kmwgWDaksIRlOJ0QmB/8zkYB4XLOhsSRst4U2qrngK2FpVsW1u6Q+FSmevpBOxPxXM1Ls9l43Z4AmUr9edxu1c83Nal0C/UA5Nc+uInU4Yn4ubQdNmjvmVLMqu4u3U0uOJt3ytzL0+OQNwBeMeYLXFpnj80y3IOatLUcGjRWw2wkRH0AdF97KSfhh52C831YtGFD8sAGxKlBymfV5eLP2bJyH71H58OFUPEyL3jB4pXT3RZpFodI2h7b5jP/lv7jUt/DJUptWXPuV4nI+dFgCnxBtiDa+aIEyDwmwDU1NejowsHUE/Yhk5c6oQFtgLa8WoEvOMKTERLkB9MRQi1SnQlbI7kMjS1toPWJKg== 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:(13230016)(396003)(366004)(346002)(376002)(136003)(39860400002)(38100700002)(55016003)(9686003)(7696005)(53546011)(55236004)(26005)(41300700001)(110136005)(8936002)(52536014)(6506007)(5660300002)(2906002)(6636002)(33656002)(71200400001)(478600001)(186003)(64756008)(8676002)(38070700005)(83380400001)(66946007)(66446008)(82960400001)(66476007)(122000001)(86362001)(66556008)(76116006)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GjiVb5hme5Hcaiimo6foAIyipR+x34w807K5yfc9wXvxcxIJybIm8mcoDWyA?= =?us-ascii?Q?1u6oev09ANK1eCMDjFKlimb34eCJMa28NcJoHA7McghREdkvONd6dqP3PJtV?= =?us-ascii?Q?boM3fgTLHytBEnjFTwkdgEJhAchuLpY9poF7peikD3I3uG4D3PNOLMqscPjF?= =?us-ascii?Q?tHrzwkr2vrzPHCyVjYxrXtL5xwyWn9aJ7MAfXjM7Uq3PmvFrniXX4hHDQBva?= =?us-ascii?Q?PbBLtd/pUAXMHjhFiEZ9dm99vvFiSlMSZtFZIKOgtiE6ceTLiN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7DvWQMXHgUAezCiJUNT0mq7rTVXjUM8sXvTqHxscFTvBx/Zd?= =?us-ascii?Q?DmNC3YF1m/nFkimYwU0XktBESfEkRVIgzyXMBRDhJfDThUp7z5vmeCmkNrAA?= =?us-ascii?Q?dvqhWuPfLz38KvjnerCd69ERlxvxA7R7xqkb363yqaw++SI9YZWYh7g1N6W2?= =?us-ascii?Q?z1lWUt+eWq1ocISij0aNIW7cEEPryi00IyySqEEWpM52LztVCzeCFAywvTnj?= =?us-ascii?Q?Eb+CA6sVA4tZD+6LJSZnjOfAim6Ys1iW/wutXgcl1g/W6gkXad6Wf6CnmTKD?= =?us-ascii?Q?EbnkowNp5m+kTgprx4rz4VQA1f8GkObXiiAPNkC+p3HSTatYTDvnGtCv4RtQ?= =?us-ascii?Q?52F1twEMCwvBDE8QYoIoFxEUfal+4O+ACViWo/Oh88iT2iZI9SE8RmRzJ9vT?= =?us-ascii?Q?vB9asvJeJ9NQ33Ra3bRPBMGFTHsqtqfeusmtIoFK5btbFzCh0NuXg/YUShnT?= =?us-ascii?Q?ZlftG61RW33TerATHfQ71CB2OwJVPhlKJmFY5RvoaL4PF1RQI8zeXkGxqFIp?= =?us-ascii?Q?nlMPjYSr42DxfyTvick4PMhOhYIAR1NvG7WLoMLtLYXG8+VtNehWfPfl5Z/s?= =?us-ascii?Q?dFABcFORwJMwI++GThtfztfdOmGku/s=3D?= 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: c16b1340-d353-4a46-f477-08da5474c873 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jun 2022 17:29:38.1703 (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: 3EIa7j3eSDf8L1EdFpg9ey9mRSUEt3KolAULBrZAQmKdbCUql44F14hvAznHca03Eqr5llHKuTwwZ3V7dkiXqyqtOCkeK0jst/kygLT4LI8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3615 X-OriginatorOrg: intel.com 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 Reviewed-by: Naga Harish K S V > -----Original Message----- > From: Kundapura, Ganapati > Sent: Wednesday, June 22, 2022 10:24 PM > To: dev@dpdk.org; jerinj@marvell.com; Jayatheerthan, Jay > ; Naga Harish K, S V > > Subject: [PATCH v8 2/7] eventdev/eth_rx: add telemetry callback for > instance get >=20 > Added telemetry handler for rte_event_eth_rx_adapter_instance_get() > to retrieve adapter instance id for specified ethernet device id and rx q= ueue > index. >=20 > Signed-off-by: Ganapati Kundapura > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 66 > +++++++++++++++++++++++++++++++++ > 1 file changed, 66 insertions(+) >=20 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > b/lib/eventdev/rte_event_eth_rx_adapter.c > index ababe13..64a6add 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -3674,6 +3674,68 @@ handle_rxa_queue_stats_reset(const char *cmd > __rte_unused, > return ret; > } >=20 > +static int > +handle_rxa_instance_get(const char *cmd __rte_unused, > + const char *params, > + struct rte_tel_data *d) > +{ > + uint8_t instance_id; > + uint16_t rx_queue_id; > + int eth_dev_id, ret =3D -1; > + char *token, *l_params; > + > + if (params =3D=3D NULL || strlen(params) =3D=3D 0 || !isdigit(*params)) > + return -1; > + > + l_params =3D strdup(params); > + if (l_params =3D=3D NULL) > + return -ENOMEM; > + token =3D strtok(l_params, ","); > + > RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET( > token, -1); > + > + /* Get device ID from parameter string */ > + eth_dev_id =3D strtoul(token, NULL, 10); > + RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, - > EINVAL); > + > + token =3D strtok(NULL, ","); > + > RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET( > token, -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); > + ret =3D -EINVAL; > + goto error; > + } > + > + token =3D strtok(NULL, "\0"); > + if (token !=3D NULL) > + RTE_EDEV_LOG_ERR("Extra parameters passed to eventdev" > + " telemetry command, ignoring"); > + > + /* Parsing parameter finished */ > + free(l_params); > + > + if (rte_event_eth_rx_adapter_instance_get(eth_dev_id, > + rx_queue_id, > + &instance_id)) { > + RTE_EDEV_LOG_ERR("Failed to get RX adapter instance ID " > + " for rx_queue_id =3D %d", rx_queue_id); > + return -1; > + } > + > + rte_tel_data_start_dict(d); > + 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); > + rte_tel_data_add_dict_u64(d, "rxa_instance_id", instance_id); > + > + return 0; > + > +error: > + free(l_params); > + return ret; > +} > + > RTE_INIT(rxa_init_telemetry) > { > rte_telemetry_register_cmd("/eventdev/rxa_stats", > @@ -3695,4 +3757,8 @@ RTE_INIT(rxa_init_telemetry) > rte_telemetry_register_cmd("/eventdev/rxa_queue_stats_reset", > handle_rxa_queue_stats_reset, > "Reset Rx queue stats. Parameter: rxa_id, dev_id, > queue_id"); > + > + rte_telemetry_register_cmd("/eventdev/rxa_rxq_instance_get", > + handle_rxa_instance_get, > + "Returns Rx adapter instance id. Parameter: dev_id, > queue_id"); > } > -- > 2.6.4