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 AD7C6A0C41; Tue, 7 Sep 2021 08:39:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FBFE410EB; Tue, 7 Sep 2021 08:39:14 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 3730E40DF8 for ; Tue, 7 Sep 2021 08:39:12 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="219804085" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="219804085" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 23:39:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="448873208" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 06 Sep 2021 23:39:09 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 6 Sep 2021 23:39:08 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 6 Sep 2021 23:39:08 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.10; Mon, 6 Sep 2021 23:39:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JMQYSA+EDwnGQ1byU2erxpIcX9T32FLcfMjZ6ciWOKA9QhxOR81amNr/pRiBt4jekX9VjCa1v0y0OoK/50IddDhkT1QunT1fUz/Wnxfu+y3RlvNfQamnWGGoF3xb+dEsKqcU9dSxcD+0DZv/vV9UnWWeL8i42LdpccGBvkpYpEELINCSPRm1w7St8IX1ySEat2mGQ4A45pbl+SqL9AyNVXe1uPagVoAHCaxrjgX1QKa3UtlP3Aoa3au/J0jaDCOHofC8+G53rEOL8qeb1nyhLV2RhX04nsR4iq9CaSVF+byvkOyC/iPSfRTIThwZPQcElIkLlATiV3bhudeIVnJo6A== 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; bh=Gqnu8UnjYMxrXk5jH4c59QpsnFnYSGnQ2x1ss0SCh9s=; b=jY/m3VdwQFXsuyRbAV9HjLujzlUPTSVmXAlJKgF1b+h2NWpXbYxryQynu3FkUNk4NfoxT7QbTzaAErlhodZNKHDnGCFV9JZjzO4FrWpZhQmW1GYMg6V4OTd1gY8f3NpNpuNwZGLG8C9WFwcf1B1LjC3rVGa8y7s29LRIuojMS7+qDuLt9GPfDA7G6w7HwVuTmNGTUirkeYliGFytCmjBZYz9MdaxoO9jc++ULXKR3f7IRpVyxJRMf5R5E8e3vmAuvR2MfEwqYAWs3/HjUg6OuMtfCVkdezi4fpeYZtNtEChegrs0J3cfEXKY+3IFT6rFkjAjIagdiEi3ECsRyHNeDA== 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=Gqnu8UnjYMxrXk5jH4c59QpsnFnYSGnQ2x1ss0SCh9s=; b=fJFj+NfE3Xhc04pCjpTdnYH+nP91/jzU18qrtJ2jhH6JT3SI0AXCRtw2zeP8VQJoC1JE9oAxr5knAce+TZN78CfQJOUJ1DK+Bga80m3d3AV9Fzk0CKkZ0Kn4pSdGEANBuUqzpP3KScefMHkpYUtehbMqQ3Hj4Ej6uqVsZXKYM3U= Received: from CO1PR11MB4882.namprd11.prod.outlook.com (2603:10b6:303:97::8) by CO1PR11MB4865.namprd11.prod.outlook.com (2603:10b6:303:9c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17; Tue, 7 Sep 2021 06:39:07 +0000 Received: from CO1PR11MB4882.namprd11.prod.outlook.com ([fe80::f42d:5b5c:694:53dc]) by CO1PR11MB4882.namprd11.prod.outlook.com ([fe80::f42d:5b5c:694:53dc%5]) with mapi id 15.20.4478.026; Tue, 7 Sep 2021 06:39:07 +0000 From: "Kundapura, Ganapati" To: "Jayatheerthan, Jay" , "jerinjacobk@gmail.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH] eventdev: add rx queue info get api Thread-Index: AQHXo7E472e3X3Wkqk2Bv08EC4MnJauYHlXg Date: Tue, 7 Sep 2021 06:39:07 +0000 Message-ID: References: <20210907053642.4093569-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.5.1.3 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: 0ae687f3-4f8e-4d81-b97c-08d971ca313d x-ms-traffictypediagnostic: CO1PR11MB4865: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:561; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1ZD1v1qk7l6ttV5tiu/O9zItYEXjZSIhttHHWgawwF5J1LHEJCZYpqd97AdmTmMeooODG13MR75zrk6L88zXYJE+3/BsAmx3lWw89aBNlGS1y0VU0UHGoQkXe7Ri/6oerGFDnhQTpCUYku6FsNEnwVsZ9JNRCd0Dyhl0t+xuEC/+GdCk3/270h9poqrgGaOACyGyDdjZFtpujb4tZOhfc+JuDiuRTe5ui8UMlxAopCfM0VKYc6Z+qjqC4dbyYKOQVwvLieHvyB+G3PKdoqEZwTvlwFT5SeDHnlxExNIIAv57un2OsKI4a/QvDwCqILy6nlruwjFk0r/MlGaXO623k2TROb3P6rz2OxeP5TRtMoJglF6UHQgWaWt67ulDEeyPKBKnR1gi27eTNhXNFuw4CJhXy0StdSS55gD7BoKF0n+o50hkcFUDgT+XRPmn1ydIBNv2WQB7kz/3mw/iMoNU4nN7jxE+O3sYQl+hNy8wWggcOapAMO8HgbDb8xhHcbukIa3EoOEHppraA2ZN8k46b1eojnQLS3wgeRZzSaOHp46bzyoaVDOf6QG1W1xag5F7iLAm9cJg+IkADI+sF9NoWO0KNhrCxf4ol/xYvTv7snXdSUmKyG4HUYAuXdtCZGQzhWJM7IjbcS83Jl2mtuJCZvVRaCb3ra0myXKwft2gx5AZaFGLXowcv5n88W5dbTxgGprB6RqhJVpfA5rvqqLtoQ== 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)(376002)(136003)(396003)(39860400002)(366004)(346002)(7696005)(122000001)(71200400001)(33656002)(8676002)(52536014)(38100700002)(6506007)(53546011)(55236004)(5660300002)(110136005)(66946007)(66476007)(64756008)(186003)(83380400001)(2906002)(316002)(30864003)(9686003)(86362001)(66556008)(66446008)(26005)(4326008)(55016002)(478600001)(38070700005)(8936002)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xuSG5xt3ey7pRndsaOx4rZDmp0pfXsEzrl2K2OZ7j36zGt9RWcBo5ZP3MT2Y?= =?us-ascii?Q?zEX8KRddCd1fgk7qvtmm8TMI/2e1MXjQHSEifeiUdhwiRIMET3t1U3VggFMF?= =?us-ascii?Q?nR2zja7IHorh9z5/yUEemHgcw1cZ4IzH6fz9vYMrvU2V+90uAvIQdX+PZZfm?= =?us-ascii?Q?9oT8ReePJnbsWqotwlJtdmQhRlGHu2H9MSNyg50BbVt5VFtBjt0+ZG3fLV6G?= =?us-ascii?Q?8ohB/PK3D96fQMBNd5i+CGBr+97gx1ooAN3dPw4Bc1DjCGJxdKl6qfwBfCZJ?= =?us-ascii?Q?OB+u/T6LS2wKYM8YOR37//cy8ImITXGi+lcwa2UWg/po9sUD/pjUGMON1XUX?= =?us-ascii?Q?qDFeX+2yaoD1nRjykQkn3Tt9TMb4dy/FwaG+uc/D8bbFiPCiLuhcBzrF6JeN?= =?us-ascii?Q?rsgIGAp/CzI+Qp+cucYyLdHkP8wTvFB3ChT22X2O4bT2Vv9IPcxfXvddgPka?= =?us-ascii?Q?frVxlDJ8I3681Ft48h4V9AoLR2XiVY6esTCs2PVP6Woe/XpiKkC/yTHSxbW1?= =?us-ascii?Q?rHrwnojm3zfxOVUSdyDJWiX0RBP9okmmWLj2W76bSm37X5RLNTjiEwMLROkl?= =?us-ascii?Q?eKCsbeKEPeFXWcwXdY0R9t//YU9x0ZlOynglPhI11wgi1RLj4k78gMqCPpnF?= =?us-ascii?Q?HjJ6qTHsWwg5ZEFVhSZ1jiVKjwDemXmnsJVaGNkPRDLTR4aa5Q/YSE34xvzm?= =?us-ascii?Q?zjIQyC7uBkAns5hz1APNKBalpMRZq0x/WD1/ESvlpKPttyzmsn/D7lnLn5H6?= =?us-ascii?Q?97L8C3603EKgWQmYQ3Z0+KEyIsQcU0R4Dpl9rTPZ2p5cheUo7I02Ps0340eK?= =?us-ascii?Q?VzJ41WxNRcBmB+lkSzWEVIVwFPsjL9rRENjd6K48EkU8SHsbUK/thOszuIwC?= =?us-ascii?Q?utnuR4qan0KUbVRMtW70CgATGqj4Qj2Y4wlUi7q8N0Y/5pJdKsiN21aCLONB?= =?us-ascii?Q?yAEQah+TMm7fePqcU/65XMhu1FKbBDPNNBvTpA7fo9Tau0bS+Cj6lN+4YIGd?= =?us-ascii?Q?q+yG0dUeKIgWNviEaKf7gSPXcGCGBUTWciSQ/jDG33yjmwm/446vcQwT4SNJ?= =?us-ascii?Q?uVY6hp3Iex9CtEXJrWBvbz+iIJePtP4U0fqT1B3iGDqjTUFowkjqXG6Z6NnI?= =?us-ascii?Q?reH5hxWFzxUE/p23sd0dVJ9/eXePHveYKnsszmKLj9HlXG1TW+Un44nFKqst?= =?us-ascii?Q?QqZnmu0IhvOgEwKPfJFEWQbDeyXgHxD8qtxxobrWZtAFh4rG4T541fXqKpSp?= =?us-ascii?Q?3Mw95UTQ4cpotNakS1Il9/96hBUTKUBHbBTYticrKRGhHJNUaUCc8K2gSn39?= =?us-ascii?Q?777gAR9LMBRnB0Fcfwso5TXL?= 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: 0ae687f3-4f8e-4d81-b97c-08d971ca313d X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2021 06:39:07.2400 (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: ZLTdXQsF6VaVSXt5uNSaUdnPBwTDJ1RMNPOd/lNLXqIF/ev4GpaMm1XsCQwAfcorwEjGo9v2L67VtgVfQV2eP9lBn4Nt5Yt69gZRwvBO6J8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4865 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] eventdev: add rx queue info get api 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: Jayatheerthan, Jay > Sent: 07 September 2021 11:56 > To: Kundapura, Ganapati ; > jerinjacobk@gmail.com > Cc: dev@dpdk.org > Subject: RE: [PATCH] eventdev: add rx queue info get api >=20 > Hi Ganapati, > Could you split these patches to logical units to make it easy to review = ? In > addition, add patch version in subject field. >=20 > -Jay Patch is split into 3 patches having implementation, test and document upda= te separately >=20 >=20 > > -----Original Message----- > > From: Kundapura, Ganapati > > Sent: Tuesday, September 7, 2021 11:07 AM > > To: Jayatheerthan, Jay ; > > jerinjacobk@gmail.com > > Cc: dev@dpdk.org > > Subject: [PATCH] eventdev: add rx queue info get api > > > > Added rte_event_eth_rx_adapter_queue_info_get() API to get rx queue > > information - event queue identifier, flags for handling received > > packets, schedular type, event priority, polling frequency of the > > receive queue and flow identifier in > > rte_event_eth_rx_adapter_queue_info structure > > > > Signed-off-by: Ganapati Kundapura > > > > --- > > v2: > > * build failed due to missing entry in version.map > > * added entry in version.map > > --- > > app/test/test_event_eth_rx_adapter.c | 22 +++++++ > > .../prog_guide/event_ethernet_rx_adapter.rst | 8 +++ > > lib/eventdev/eventdev_pmd.h | 31 +++++++++ > > lib/eventdev/rte_event_eth_rx_adapter.c | 76 > ++++++++++++++++++++++ > > lib/eventdev/rte_event_eth_rx_adapter.h | 71 > ++++++++++++++++++++ > > lib/eventdev/version.map | 1 + > > 6 files changed, 209 insertions(+) > > > > diff --git a/app/test/test_event_eth_rx_adapter.c > > b/app/test/test_event_eth_rx_adapter.c > > index 9198767..c642e1b 100644 > > --- a/app/test/test_event_eth_rx_adapter.c > > +++ b/app/test/test_event_eth_rx_adapter.c > > @@ -750,6 +750,27 @@ adapter_stats(void) > > return TEST_SUCCESS; > > } > > > > +static int > > +adapter_queue_info(void) > > +{ > > + int err; > > + struct rte_event_eth_rx_adapter_queue_info queue_info; > > + > > + err =3D rte_event_eth_rx_adapter_queue_info_get(TEST_INST_ID, > TEST_DEV_ID, > > + 0, &queue_info); > > + TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > > + > > + err =3D rte_event_eth_rx_adapter_queue_info_get(TEST_INST_ID, > TEST_DEV_ID, > > + -1, &queue_info); > > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > > + > > + err =3D rte_event_eth_rx_adapter_queue_info_get(TEST_INST_ID, > TEST_DEV_ID, > > + 0, NULL); > > + TEST_ASSERT(err =3D=3D -EINVAL, "Expected -EINVAL got %d", err); > > + > > + return TEST_SUCCESS; > > +} > > + > > static struct unit_test_suite event_eth_rx_tests =3D { > > .suite_name =3D "rx event eth adapter test suite", > > .setup =3D testsuite_setup, > > @@ -762,6 +783,7 @@ static struct unit_test_suite event_eth_rx_tests = =3D { > > adapter_multi_eth_add_del), > > TEST_CASE_ST(adapter_create, adapter_free, > adapter_start_stop), > > TEST_CASE_ST(adapter_create, adapter_free, > adapter_stats), > > + TEST_CASE_ST(adapter_create, adapter_free, > adapter_queue_info), > > TEST_CASES_END() /**< NULL terminate unit test array */ > > } > > }; > > diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst > > b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst > > index c01e5a9..9897985 100644 > > --- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst > > +++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst > > @@ -146,6 +146,14 @@ if the callback is supported, and the counts > > maintained by the service function, if one exists. The service > > function also maintains a count of cycles for which it was not able to > enqueue to the event device. > > > > +Getting Adapter queue info > > +~~~~~~~~~~~~~~~~~~~~~~~~~~ > > + > > +The ``rte_event_eth_rx_adapter_queue_info_get()`` function reports > > +flags for handling received packets, event queue identifier, scheduar > > +type, event priority, polling frequency of the receive queue and flow > > +identifier in struct ``rte_event_eth_rx_adapter_queue_info``. > > + > > Interrupt Based Rx Queues > > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > diff --git a/lib/eventdev/eventdev_pmd.h > b/lib/eventdev/eventdev_pmd.h > > index 0f724ac..20cc0a7 100644 > > --- a/lib/eventdev/eventdev_pmd.h > > +++ b/lib/eventdev/eventdev_pmd.h > > @@ -561,6 +561,35 @@ typedef int > (*eventdev_eth_rx_adapter_queue_del_t) > > const struct rte_eth_dev *eth_dev, > > int32_t rx_queue_id); > > > > +struct rte_event_eth_rx_adapter_queue_info; > > + > > +/** > > + * Retrieve information about Rx queue. This callback is invoked if > > + * the caps returned from the eventdev_eth_rx_adapter_caps_get(, > > +eth_port_id) > > + * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set. > > + * > > + * @param dev > > + * Event device pointer > > + * > > + * @param eth_dev > > + * Ethernet device pointer > > + * > > + * @param rx_queue_id > > + * Ethernet device receive queue index. > > + * > > + * @param[out] info > > + * Pointer to rte_event_eth_rx_adapter_queue_info structure > > + * > > + * @return > > + * - 0: Success > > + * - <0: Error code on failure. > > + */ > > +typedef int (*eventdev_eth_rx_adapter_queue_info_get_t) > > + (const struct rte_eventdev *dev, > > + const struct rte_eth_dev *eth_dev, > > + uint16_t rx_queue_id, > > + struct rte_event_eth_rx_adapter_queue_info > *info); > > + > > /** > > * Start ethernet Rx adapter. This callback is invoked if > > * the caps returned from eventdev_eth_rx_adapter_caps_get(.., > > eth_port_id) @@ -1107,6 +1136,8 @@ struct rte_eventdev_ops { > > /**< Add Rx queues to ethernet Rx adapter */ > > eventdev_eth_rx_adapter_queue_del_t > eth_rx_adapter_queue_del; > > /**< Delete Rx queues from ethernet Rx adapter */ > > + eventdev_eth_rx_adapter_queue_info_get_t > eth_rx_adapter_queue_info_get; > > + /**< Get Rx adapter queue info */ > > eventdev_eth_rx_adapter_start_t eth_rx_adapter_start; > > /**< Start ethernet Rx adapter */ > > eventdev_eth_rx_adapter_stop_t eth_rx_adapter_stop; diff --git > > a/lib/eventdev/rte_event_eth_rx_adapter.c > > b/lib/eventdev/rte_event_eth_rx_adapter.c > > index 7c94c73..98184fb 100644 > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > @@ -2811,3 +2811,79 @@ rte_event_eth_rx_adapter_cb_register(uint8_t > > id, > > > > return 0; > > } > > + > > +int > > +rte_event_eth_rx_adapter_queue_info_get(uint8_t id, uint16_t > eth_dev_id, > > + uint16_t rx_queue_id, > > + struct rte_event_eth_rx_adapter_queue_info *info) > { > > + struct rte_eventdev *dev; > > + struct eth_device_info *dev_info; > > + struct rte_event_eth_rx_adapter *rx_adapter; > > + struct eth_rx_queue_info *queue_info; > > + struct rte_event *qi_ev; > > + int ret; > > + uint32_t cap; > > + > > + RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, - > EINVAL); > > + RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL); > > + > > + 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; > > + } > > + > > + if (info =3D=3D NULL) { > > + RTE_EDEV_LOG_ERR("Rx queue info cannot be NULL"); > > + return -EINVAL; > > + } > > + > > + rx_adapter =3D rxa_id_to_adapter(id); > > + if (rx_adapter =3D=3D NULL) > > + return -EINVAL; > > + > > + dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > > + ret =3D rte_event_eth_rx_adapter_caps_get(rx_adapter- > >eventdev_id, > > + eth_dev_id, > > + &cap); > > + if (ret) { > > + RTE_EDEV_LOG_ERR("Failed to get adapter caps edev %" > PRIu8 > > + "eth port %" PRIu16, id, eth_dev_id); > > + return ret; > > + } > > + > > + if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > > + RTE_FUNC_PTR_OR_ERR_RET( > > + *dev->dev_ops- > >eth_rx_adapter_queue_info_get, > > + -ENOTSUP); > > + ret =3D (*dev->dev_ops- > >eth_rx_adapter_queue_info_get)(dev, > > + > &rte_eth_devices[eth_dev_id], > > + rx_queue_id, > > + info); > > + return ret; > > + } > > + > > + dev_info =3D &rx_adapter->eth_devices[eth_dev_id]; > > + > > + queue_info =3D &dev_info->rx_queue[rx_queue_id]; > > + if (!queue_info->queue_enabled) { > > + RTE_EDEV_LOG_ERR("Rx queue %u not added", > rx_queue_id); > > + return -EINVAL; > > + } > > + > > + qi_ev =3D (struct rte_event *)&queue_info->event; > > + > > + memset(info, 0, sizeof(*info)); > > + info->servicing_weight =3D queue_info->wt; > > + info->event_queue_id =3D qi_ev->queue_id; > > + info->sched_type =3D qi_ev->sched_type; > > + info->priority =3D qi_ev->priority; > > + info->rx_queue_flags =3D 0; > > + if (queue_info->flow_id_mask !=3D 0) { > > + info->rx_queue_flags |=3D > > + > RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID; > > + info->flow_id =3D qi_ev->flow_id; > > + } > > + > > + return 0; > > +} > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h > > b/lib/eventdev/rte_event_eth_rx_adapter.h > > index 182dd2e..75c0010 100644 > > --- a/lib/eventdev/rte_event_eth_rx_adapter.h > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.h > > @@ -33,6 +33,7 @@ > > * - rte_event_eth_rx_adapter_stop() > > * - rte_event_eth_rx_adapter_stats_get() > > * - rte_event_eth_rx_adapter_stats_reset() > > + * - rte_event_eth_rx_adapter_queue_info_get() > > * > > * The application creates an ethernet to event adapter using > > * rte_event_eth_rx_adapter_create_ext() or > > rte_event_eth_rx_adapter_create() @@ -140,6 +141,56 @@ typedef int > (*rte_event_eth_rx_adapter_conf_cb) (uint8_t id, uint8_t dev_id, > > void *arg); > > > > /** > > + * Rx queue info > > + */ > > +struct rte_event_eth_rx_adapter_queue_info { > > + uint32_t rx_queue_flags; > > + /**< Flags for handling received packets > > + * @see RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID > > + */ > > + uint16_t servicing_weight; > > + /**< Relative polling frequency of ethernet receive queue when the > > + * adapter uses a service core function for ethernet to event device > > + * transfers. If it is set to zero, the Rx queue is interrupt driven > > + * (unless rx queue interrupts are not enabled for the ethernet > > + * device). > > + */ > > + > > + uint8_t event_queue_id; > > + /**< Targeted event queue identifier for the enqueue or > > + * dequeue operation. > > + * The value must be in the range of > > + * [0, nb_event_queues - 1] which previously supplied to > > + * rte_event_dev_configure(). > > + */ > > + > > + uint8_t sched_type; > > + /**< Scheduler synchronization type (RTE_SCHED_TYPE_*) > > + * associated with flow id on a given event queue > > + * for the enqueue and dequeue operation. > > + */ > > + > > + uint8_t priority; > > + /**< Event priority relative to other events in the > > + * event queue. The requested priority should in the > > + * range of [RTE_EVENT_DEV_PRIORITY_HIGHEST, > > + * RTE_EVENT_DEV_PRIORITY_LOWEST]. > > + * The implementation shall normalize the requested > > + * priority to supported priority value. > > + * Valid when the device has > > + * RTE_EVENT_DEV_CAP_EVENT_QOS capability. > > + */ > > + > > + uint32_t flow_id; > > + /**< Targeted flow identifier for the enqueue and > > + * dequeue operation. > > + * The value must be in the range of > > + * [0, nb_event_queue_flows - 1] which > > + * previously supplied to rte_event_dev_configure(). > > + */ > > +}; > > + > > +/** > > * Rx queue configuration structure > > */ > > struct rte_event_eth_rx_adapter_queue_conf { @@ -575,6 +626,26 @@ > int > > rte_event_eth_rx_adapter_queue_event_vector_config( > > uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id, > > struct rte_event_eth_rx_adapter_event_vector_config *config); > > > > +/** > > + * Retrieve information about Rx queue. > > + * > > + * @param id > > + * Adapter identifier. > > + * @param eth_dev_id > > + * Port identifier of Ethernet device. > > + * @param rx_queue_id > > + * Ethernet device receive queue index. > > + * @param info > > + * Pointer to struct rte_event_eth_rx_adapter_queue_info > > + * @return > > + * - 0: Success, Receive queue added correctly. > > + * - <0: Error code on failure. > > + */ > > +int rte_event_eth_rx_adapter_queue_info_get(uint8_t id, > > + uint16_t eth_dev_id, > > + uint16_t rx_queue_id, > > + struct rte_event_eth_rx_adapter_queue_info *info); > > + > > #ifdef __cplusplus > > } > > #endif > > diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map index > > 8862562..258affd 100644 > > --- a/lib/eventdev/version.map > > +++ b/lib/eventdev/version.map > > @@ -143,6 +143,7 @@ EXPERIMENTAL { > > rte_event_vector_pool_create; > > rte_event_eth_rx_adapter_vector_limits_get; > > rte_event_eth_rx_adapter_queue_event_vector_config; > > + rte_event_eth_rx_adapter_queue_info_get; > > __rte_eventdev_trace_crypto_adapter_enqueue; > > }; > > > > -- > > 2.6.4