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 37048A0032; Tue, 28 Sep 2021 11:34:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAD8F40E3C; Tue, 28 Sep 2021 11:34:20 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id ACE1040DF6 for ; Tue, 28 Sep 2021 11:34:18 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10120"; a="211910501" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="211910501" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 02:34:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="587287365" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 28 Sep 2021 02:34:13 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 02:34:12 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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, 28 Sep 2021 02:34:12 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) 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, 28 Sep 2021 02:34:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y762QqdOlLg+Mrq32JpQ7j4jn6U2LSPYj+PEhkm65zX+L8397T8ETZytbQ2TMRZV95sTVlyzg5dcL2dsMt1FWFBQFFB8GSiGm9kcjE8ZnvYaAwfYQxeKDrBCTBFFxVfD6ikOtduiFh6CPIVvdqpm+kShHjlmazH3YSRjzHyBJEJ+/ernMh/f1Nhn6gZxCsgVosz8I/bXZmlnxW4tRYUHWOcHJHsDWcUAja/D9rKNm7UIyrFtYZ5LacvKkUfyFF6gA74rB4fwHvs0kAm/KkUTmUnljNMvalXQ7Q/B/w0Hz7lVZS3zZOS83lGHbKGZ7iWfMz4naZ9Xbe7qhloyiu3WJw== 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=uZpM4ESpjyUJtHrt1Wua460mr90RKwHjoafph4IRRqo=; b=VYvPCr6ulVK+jLPAAOE6XvWMXuyUl6Ji6v/+YxAtfqcIAW4Vz6L1WM1tPvlfH/apbbVRKSn7BRc1HyN1MxcTHF4RgyGYnZocI6+7ZcPcfgnY4Qjy3wKoRaezbTppX6MM/wU7+QKQLntp22BPkGwI+uo7cME/cQG6orZSOmE3eUPSNWCZJlQDFx+MH20aQsIitiVTUVt9+I4vVMVXNdty5Hp5OallTpg5QR/hL8TETYbQP22rE7hh/+GdmUqIvyTHndDsvc4PiFVPyZ7CSoZmP9mz5Fw6DRcbmqhUM1Iic95bHcBtfbxDfryn2BlXWj6SNf8Zp+FrjWoBJjL5P7257A== 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=uZpM4ESpjyUJtHrt1Wua460mr90RKwHjoafph4IRRqo=; b=SL/THSQRiI1aJ+mCoxp63+e2dFMeej43e7SKZrlWPg5ensxYo+0oPyIlaJriT50Wx4wmlF0Z2+JXBKbja/u9S7+4FOJEDjpfbNjyeClO63dbm7VouuAhEJqtZHEnXWRxIoiqxRshkfagzO3XOHHjmJLuvjfZvzaeARGHwuUA6jM= Received: from MWHPR1101MB2253.namprd11.prod.outlook.com (2603:10b6:301:52::17) by MW3PR11MB4699.namprd11.prod.outlook.com (2603:10b6:303:54::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Tue, 28 Sep 2021 09:34:11 +0000 Received: from MWHPR1101MB2253.namprd11.prod.outlook.com ([fe80::d56:f55:5cb9:1b28]) by MWHPR1101MB2253.namprd11.prod.outlook.com ([fe80::d56:f55:5cb9:1b28%3]) with mapi id 15.20.4544.022; Tue, 28 Sep 2021 09:34:11 +0000 From: "Jayatheerthan, Jay" To: "Kundapura, Ganapati" , "jerinjacobk@gmail.com" CC: "dev@dpdk.org" , "Yigit, Ferruh" Thread-Topic: [PATCH v5 1/2] eventdev: add rx queue conf get api Thread-Index: AQHXqvmRtM6TBie0w0uhpw57dFB5c6u5QSRA Date: Tue, 28 Sep 2021 09:34:10 +0000 Message-ID: References: <20210912155858.1397453-1-ganapati.kundapura@intel.com> <20210916125107.2024111-1-ganapati.kundapura@intel.com> In-Reply-To: <20210916125107.2024111-1-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.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: a667899c-5a10-4be0-a9d7-08d9826320a6 x-ms-traffictypediagnostic: MW3PR11MB4699: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1091; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: v7fVSmRXe1b6XK/CwdaXCXN1zKGzy41rxdCjfLlZKgTLTe75cv4LDMktOwaw/pmw3JbT+qWKDUGYMzMIxWMuYEHdL524vfFsgD2UXm5CI9K5eyeAObxK0VrzRHP/Fat6fqHogLJPEJJKib4SmGx8C8XDNwyfg7x9X6MBr756nlrC0ydA08NhJe+0s3EY4BYYPwMgDmj4LTQMxM9OK6n/b9ymcc7VK870bOiz39kTHj5Wzhrh7y/TlnAhPE0gb8PAW1haRk+dsLAlbZ4YOuY0+csf4fjZqXjp1PsiLFtDlZxAwItu6HfuvSOvPazB46K/N0dXCqEVW8LH294PzMCGDGnGAymJ1m3g9LJiUWtT9q14XbviRh5lGcbgUR5P2oRWbBsTR9EI9RIUwRFgW/6/87RQXZzAWfSfnPLX4TldacZU94EVtwIbGF4tKVoIIybnT/4L+zec1HPu0CCUAvx6fVDh3/Kxz3WRXoAlQSQc6fIDEFlAJLxa1z0MwuyknzT2MlXZbLDcIEJJZUGefW5a8TOACUQyWZXGO1AKDiNha1SBfIrG5/tb0DTkS8rTX6GCxnb63Dr0duca88d4o3AovqyvPbNG1RXNDWywG7BuikwarPVk3MzsOr/KggErWHbbhoJDEwVGrGbcQwBD8UvVwFeSj4ifSaVjf+IDZG8uLWctDs5tFKLn1j2XKwe8yfRI7r9FpksRsvFnUTvcntt8kA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1101MB2253.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66446008)(66476007)(66556008)(64756008)(38100700002)(2906002)(5660300002)(33656002)(30864003)(7696005)(122000001)(52536014)(508600001)(55016002)(26005)(66946007)(38070700005)(9686003)(110136005)(86362001)(55236004)(4326008)(8936002)(8676002)(6506007)(83380400001)(71200400001)(76116006)(53546011)(316002)(107886003)(54906003)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?T+I+i8DA9TPZWcYk9ZkVl73O/254F+La8hZWRtTSp00hz+hTNUFe7BZ5VzAI?= =?us-ascii?Q?GaNf29ZYCXgzd0Z8bFvs9vCcVKCC0dVjTUSxdJoqcqpuhpqhqu70GHUvmi1S?= =?us-ascii?Q?AG6PQMaPrzb6kT2/Ivm49bfnjMa3y4Y4iW4r3U5C0+QeMCGtdlnxrbDeHdOI?= =?us-ascii?Q?fFEeDXjQE5tXoqnzVzdcnJLeOlyhPwzxLO97BiergDJpAeNAyBrnzIO8DyiG?= =?us-ascii?Q?b3TcECwnNy4mQu8TUYNoFvDhqiF2xR5jXleW3iYvshCkaJDX1d1dCLXd4+iS?= =?us-ascii?Q?i8ZXI8YEusqwjrgb1ngHtMyhd5YLandsvLKigyrFwHF/IRgRe0DHHhlA4JqS?= =?us-ascii?Q?kT2/+G0o18TfkA0rnowqjNfSEMxBKIF8Qht4CkJ8xKvTiYm28vxWq5MKIjdL?= =?us-ascii?Q?+xJLN8k9kHQ9f8Ee/E7sVnBLNSeHcTq24ecrgFp1YvJ9oModj2P0swytNFmd?= =?us-ascii?Q?ZOoMiAgMCVOM+RLeEtFjjfL47UrfO9A78Ujt1UhO5AQburuzcTkr4dgjegjH?= =?us-ascii?Q?5sObG9n7HSByowJLwjA4LfIUnK+A7pm+o9jI4ZWQe/7IL1XsDHNN/Pp+R8wY?= =?us-ascii?Q?kfltrmvOnBaDUDb/8LoeTVeWJhe6XK/yPYwx5lObzAmid2EJCZwGYrEDaRVw?= =?us-ascii?Q?+EfczuIcYwZ8u2TqrVjuAvS+XYp6KVvNrBgS132P7ATWR9tdjYJurLj7ceoW?= =?us-ascii?Q?yDTyUrBxqd/J5fflubsUMTbiv397HRX98L3lV7xJhjXgpjKg0Cf+jGKf3jtD?= =?us-ascii?Q?ObJ/wtLw47mUv/OPAclKwJ0RWeFzB0Bn6rtFVs9ydKZ6m3gc/Dreu/NNoBY1?= =?us-ascii?Q?Qk1LU/dYibAYhpmP2OguiAPbRUZvMed5PyKkNVWPvs6vsS/2i57feXqpbi4+?= =?us-ascii?Q?tOBMclhvb3vITM4pdG4eC6nJh7WHTDb8czuxO4owa3GUDwTJSrkI8guKE7AL?= =?us-ascii?Q?xnrKItbuxluzOAVn5h0c8qu89kZvyrU1b7phEmj16xnlSc96KdLx/WDe+LSK?= =?us-ascii?Q?Na/j0OHnXCC5NHf3AwMx/bs7Mnt0xFyWf02VGXxHChnMji3dj/Fmnfn02zmS?= =?us-ascii?Q?V39YeVKH1r12KR/0EiR0i2GQvibzkqlxT8JKm6zx6VWtEUUpf4q8cQNUKmPJ?= =?us-ascii?Q?MqE9+Tl/FfERhtDXYLUBq1MbNTW1soHL32jzB06lU37rlDy3TT+xhvpxIACG?= =?us-ascii?Q?s3NsTqssxjhkc9trhjYWUSkohuYF5Jp30O+siD3dqNscnrhrJmFCddDuEM19?= =?us-ascii?Q?MSWiDv/xAMlg5RPmQCmMRTpVmnS4JcDqwwlBbH0TSQpJ84OGv5PSqOLCYWTD?= =?us-ascii?Q?ibjXeoA2MMOe5Ge/W8F6w0j3?= 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: MWHPR1101MB2253.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a667899c-5a10-4be0-a9d7-08d9826320a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2021 09:34:10.9812 (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: dPcfpNNh5lw5Gclu/6GmPhcPWsSyLlSPKTyyy+pWcfBu4r0sWgP3JgGkenzFksAJuT+2fDXTYjJ17FZ19QRolqAGuiFwlh4YfqZdMhevccw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4699 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 1/2] eventdev: add rx queue conf 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: Kundapura, Ganapati > Sent: Thursday, September 16, 2021 6:21 PM > To: Jayatheerthan, Jay ; jerinjacobk@gmail.c= om > Cc: dev@dpdk.org; Yigit, Ferruh > Subject: [PATCH v5 1/2] eventdev: add rx queue conf get api >=20 > Added rte_event_eth_rx_adapter_queue_conf_get() API to get rx queue > information - event queue identifier, flags for handling received packets= , > scheduler type, event priority, polling frequency of the receive queue > and flow identifier in rte_event_eth_rx_adapter_queue_conf structure >=20 > Signed-off-by: Ganapati Kundapura >=20 > --- > v5: > * Filled queue_conf after memzone lookup > * PMD callback if not NULL, invoked to override queue_conf struct > * Added memzone lookup for stats_get(), stats_reset(), service_id_get() > api's called by secondary applications. >=20 > v4: > * squashed 1/3 and 3/3 > * reused rte_event_eth_rx_adapter_queue_conf structure in place of > rte_event_eth_rx_adapter_queue_info > * renamed to rte_event_eth_rx_adapter_queue_info_get() to > rte_event_eth_rx_adapter_queue_conf_get to align with > rte_event_eth_rx_adapter_queue_conf structure >=20 > v3: > * Split single patch into implementaion, test and document updation > patches separately >=20 > v2: > * Fixed build issue due to missing entry in version.map >=20 > v1: > * Initial patch with implementaion, test and doc together > --- > --- > .../prog_guide/event_ethernet_rx_adapter.rst | 8 ++ > lib/eventdev/eventdev_pmd.h | 28 +++++++ > lib/eventdev/rte_event_eth_rx_adapter.c | 91 ++++++++++++++++= +++++- > lib/eventdev/rte_event_eth_rx_adapter.h | 27 +++++++ > lib/eventdev/version.map | 1 + > 5 files changed, 154 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/gu= ides/prog_guide/event_ethernet_rx_adapter.rst > index 0780b6f..ce23d8a 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 maintai= ned 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. >=20 > +Getting Adapter queue config > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +The ``rte_event_eth_rx_adapter_queue_conf_get()`` function reports > +flags for handling received packets, event queue identifier, scheduler t= ype, > +event priority, polling frequency of the receive queue and flow identifi= er > +in struct ``rte_event_eth_rx_adapter_queue_conf``. > + > Interrupt Based Rx Queues > ~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h > index 63b3bc4..e69644b 100644 > --- a/lib/eventdev/eventdev_pmd.h > +++ b/lib/eventdev/eventdev_pmd.h > @@ -562,6 +562,32 @@ typedef int (*eventdev_eth_rx_adapter_queue_del_t) > int32_t rx_queue_id); >=20 > /** > + * Retrieve Rx adapter queue config information for the specified > + * rx queue ID. > + * > + * @param dev > + * Event device pointer > + * > + * @param eth_dev > + * Ethernet device pointer > + * > + * @param rx_queue_id > + * Ethernet device receive queue index. > + * > + * @param[out] queue_conf > + * Pointer to rte_event_eth_rx_adapter_queue_conf structure > + * > + * @return > + * - 0: Success > + * - <0: Error code on failure. > + */ > +typedef int (*eventdev_eth_rx_adapter_queue_conf_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_conf *queue_conf); > + > +/** > * Start ethernet Rx adapter. This callback is invoked if > * the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_= id) > * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues > @@ -1081,6 +1107,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_conf_get_t eth_rx_adapter_queue_conf_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_e= vent_eth_rx_adapter.c > index f2dc695..6cc4210 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -40,6 +40,8 @@ > /* Sentinel value to detect initialized file handle */ > #define INIT_FD -1 >=20 > +#define RXA_ADAPTER_ARRAY "rte_event_eth_rx_adapter_array" > + > /* > * Used to store port and queue ID of interrupting Rx queue > */ > @@ -1347,7 +1349,7 @@ rxa_service_func(void *args) > static int > rte_event_eth_rx_adapter_init(void) > { > - const char *name =3D "rte_event_eth_rx_adapter_array"; > + const char *name =3D RXA_ADAPTER_ARRAY; > const struct rte_memzone *mz; > unsigned int sz; >=20 > @@ -1370,6 +1372,21 @@ rte_event_eth_rx_adapter_init(void) > return 0; > } >=20 > +static int > +rxa_memzone_lookup(void) > +{ > + const struct rte_memzone *mz; > + > + if (event_eth_rx_adapter =3D=3D NULL) { > + mz =3D rte_memzone_lookup(RXA_ADAPTER_ARRAY); > + if (mz =3D=3D NULL) > + return -ENOMEM; > + event_eth_rx_adapter =3D mz->addr; > + } > + > + return 0; > +} > + > static inline struct rte_event_eth_rx_adapter * > rxa_id_to_adapter(uint8_t id) > { > @@ -2631,6 +2648,9 @@ rte_event_eth_rx_adapter_stats_get(uint8_t id, > uint32_t i; > int ret; >=20 > + if (rxa_memzone_lookup()) > + return -ENOMEM; > + > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); >=20 > rx_adapter =3D rxa_id_to_adapter(id); > @@ -2669,6 +2689,9 @@ rte_event_eth_rx_adapter_stats_reset(uint8_t id) > struct eth_device_info *dev_info; > uint32_t i; >=20 > + if (rxa_memzone_lookup()) > + return -ENOMEM; > + > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); >=20 > rx_adapter =3D rxa_id_to_adapter(id); > @@ -2694,6 +2717,9 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id,= uint32_t *service_id) > { > struct rte_event_eth_rx_adapter *rx_adapter; >=20 > + if (rxa_memzone_lookup()) > + return -ENOMEM; > + > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); >=20 > rx_adapter =3D rxa_id_to_adapter(id); > @@ -2750,3 +2776,66 @@ rte_event_eth_rx_adapter_cb_register(uint8_t id, >=20 > return 0; > } > + > +int > +rte_event_eth_rx_adapter_queue_conf_get(uint8_t id, > + uint16_t eth_dev_id, > + uint16_t rx_queue_id, > + struct rte_event_eth_rx_adapter_queue_conf *queue_conf) > +{ > + struct rte_eventdev *dev; > + struct rte_event_eth_rx_adapter *rx_adapter; > + struct eth_device_info *dev_info; > + struct eth_rx_queue_info *queue_info; > + struct rte_event *qi_ev; > + int ret; > + > + if (rxa_memzone_lookup()) > + return -ENOMEM; > + > + 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 (queue_conf =3D=3D NULL) { > + RTE_EDEV_LOG_ERR("Rx queue conf struct cannot be NULL"); > + return -EINVAL; > + } > + > + rx_adapter =3D rxa_id_to_adapter(id); > + if (rx_adapter =3D=3D NULL) > + return -EINVAL; > + > + 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(queue_conf, 0, sizeof(*queue_conf)); > + queue_conf->rx_queue_flags =3D 0; > + if (queue_info->flow_id_mask !=3D 0) > + queue_conf->rx_queue_flags |=3D > + RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID; > + queue_conf->servicing_weight =3D queue_info->wt; > + > + memcpy(&queue_conf->ev, qi_ev, sizeof(*qi_ev)); > + > + dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > + if (dev->dev_ops->eth_rx_adapter_queue_conf_get !=3D NULL) { > + ret =3D (*dev->dev_ops->eth_rx_adapter_queue_conf_get)(dev, > + &rte_eth_devices[eth_dev_id], > + rx_queue_id, > + queue_conf); > + return ret; > + } > + > + return 0; > +} > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_e= vent_eth_rx_adapter.h > index 3f8b362..470543e 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_conf_get() > * > * The application creates an ethernet to event adapter using > * rte_event_eth_rx_adapter_create_ext() or rte_event_eth_rx_adapter_cre= ate() > @@ -545,6 +546,32 @@ int rte_event_eth_rx_adapter_vector_limits_get( > uint8_t dev_id, uint16_t eth_port_id, > struct rte_event_eth_rx_adapter_vector_limits *limits); >=20 > +/** > + * Retrieve Rx queue config information. > + * > + * @param id > + * Adapter identifier. > + > + * @param eth_dev_id > + * Port identifier of Ethernet device. > + > + * @param rx_queue_id > + * Ethernet device receive queue index. > + > + * @param[out] queue_conf > + * Pointer to struct rte_event_eth_rx_adapter_queue_conf > + > + * @return > + * - 0: Success, Receive queue added correctly. > + * - <0: Error code on failure. > + */ > +__rte_experimental > +int rte_event_eth_rx_adapter_queue_conf_get(uint8_t id, > + uint16_t eth_dev_id, > + uint16_t rx_queue_id, > + struct rte_event_eth_rx_adapter_queue_conf *queue_conf); > + > + > #ifdef __cplusplus > } > #endif > diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map > index cd86d2d..9f28016 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_eventdev_trace_crypto_adapter_enqueue; > + rte_event_eth_rx_adapter_queue_conf_get; > }; >=20 > INTERNAL { > -- > 2.6.4 Acked-by: Jay Jayatheerthan