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 04025A0350; Mon, 27 Dec 2021 07:48:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74E7940683; Mon, 27 Dec 2021 07:48:51 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 321D44067B for ; Mon, 27 Dec 2021 07:48:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640587730; x=1672123730; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BAKDMXfhPjUzRHhCFyi/LT0IbVRTyIuWDfKe+D2aBGA=; b=ZpN0ppfCRiuis7j2GwjdE/AvmbdbXSDKdmVHN5vkI5BxxBf8Ww5ViYcF QbXkywymCnP63YSHyD1CV0QXATiMLdniANEf80SAwotqVEoGNiTVNoav4 y/yc6iHelDmc4fMDGuZ+01wGtVpBvAmv6aUtEJb/VcNMWtKPbRgwZ6uSn hgEncELnb8JSlZaUHy6WyQWW8sae5pUNPJe1v7InrWV5Ju3lXTLSteqD7 xcTDlzpKS2ndeeccz4ip4UPF1gdSZoCEhdl2Q9cHfPH6B/AeDP/75oabz ekBE5T0ZtQ4n9DyXAbtUObMxJtMpGpHyLRT7XmfgVgulOmdZ69IqKebLP A==; X-IronPort-AV: E=McAfee;i="6200,9189,10209"; a="228474308" X-IronPort-AV: E=Sophos;i="5.88,238,1635231600"; d="scan'208";a="228474308" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Dec 2021 22:48:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,238,1635231600"; d="scan'208";a="686193996" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 26 Dec 2021 22:48:48 -0800 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.20; Sun, 26 Dec 2021 22:48:48 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.20; Sun, 26 Dec 2021 22:48:47 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.20 via Frontend Transport; Sun, 26 Dec 2021 22:48:47 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) 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.20; Sun, 26 Dec 2021 22:48:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QNj9qU+mUsZgi+Bec907Ygrod++oVnm5WIscCtUazzvzGCDxVnhYojBib4b02aOzrRO4mIHTUcv84SUzaaFHLL47TNtf9uMCIxDW6l8LTKyklHHwixRCnM2yMkx6DDH8qDVpePWXZ2zKhIOKlYb2f1xFzoJKAUmrvygvx4mFvIb52ZNpn1URzxyuWyeA3npjcatdf8PT2G6TcAmc+tRUs0BRUvLkxljgtjs9Ytyl591uCIXHJxHQ4kiEutkVkAMsN5Lsr0rFHgZ1VIEZbANGQRr7/abPma/9VEkyuMz4WAfuieafRkv78km0Cbe10nQcel3pBtXsVZWXHNzB1WCHXQ== 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=4o/XMP84RMLiVNud3NTX5TrysxT7r9dEo4TJD0MpaIw=; b=a8tho+p/V0Bw2j5ZSmbOf8GlRvX1smqGNd9FoekV+TJEJzMwqukTIXc1ESSlxpe93JioCMe0GDm+BYsFJX1o04JEfccUzdI4K22m1u/xmWcPQat5aV+gNa5rTcdz4hdCx0qi2Ijk7Xzx9WDh10cKmB2hu1lC0LKlrqxeAp9DebGirhDZICPEf+YdvfWkdkjvPbFpi3EudKl1etbeOoNwRf67iVqfZ3z1vpLy45t8UFZJvAX4gXIRzSvW6eexhSaoXvSvVqDgWG/IOtVBXCFOKG+DMK2GX3n/HqNMIV2VtXsu3ZV+WRhjtAjhzJqyYsVuZoNRt2gLbygtPw8mdgIbug== 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 DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by DM6PR11MB3740.namprd11.prod.outlook.com (2603:10b6:5:140::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.21; Mon, 27 Dec 2021 06:48:46 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e889:17d9:10d9:ab90]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e889:17d9:10d9:ab90%4]) with mapi id 15.20.4823.022; Mon, 27 Dec 2021 06:48:46 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinjacobk@gmail.com" CC: "dev@dpdk.org" Subject: RE: [PATCH] eventdev/rx_adapter: add event port get api Thread-Topic: [PATCH] eventdev/rx_adapter: add event port get api Thread-Index: AQHX9vsVOAALE5e/WEKhKyjKeaQJEaxF7VKQ Date: Mon, 27 Dec 2021 06:48:45 +0000 Message-ID: References: <20211222061338.1167674-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20211222061338.1167674-1-s.v.naga.harish.k@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: 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: 5282b7a3-cfbb-46cf-e249-08d9c904ee07 x-ms-traffictypediagnostic: DM6PR11MB3740:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:619; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rOqiMQax584ESqIKeRmaTwuFchB92Wu7evmaGlRXMDxwxxdrmhu4tAGtb6XzLpp1mKoBgGbjiWnmlADo9HIojyFzVITF++4XRAZ5NkXARcEGY7TPbCJJWL0iIaIj0uI52InygBnl7YhTw1Fj69d+Py8W5TpliWQDhu/81EC0TB8+0wMKbuwyl+Q9VCnHX90Y0wRkJTL2lvtRCgpk0oPrhVEnxf3cMEWIaUbJAvwMl3rd57i5o+Ftqb9ZpL46nF2NkWT5fpCs/1vugtMG/LpdxywQjDTLRe1Nn5leq8BewMrsX8pjYFpQnxOWXC610SKC9BG9ZYFYH+8rC8CFNC+sVLt81pHLFSlzcucoZRIU0JD7Bnenf9sCuahClIpek36EGW+yaOYJ3TM1RFFg44fzSwQFtmdS1jxgXxwlYFSeq71wLkuLEEU8T+ljXkArjZ+HNL4OUjPhxuFWtKL2Nyo41a2QJHX0hY2HaL1+Y+x9yeH9b+UWoosyCVBGgz+h0ibZlWOabTuC4Jl/STYMFwj21BeTjMe6tNmwBnNE8IYcdIqYiuR+EXLSexGaWjQLZqQ74r+nWnBUdUwu9FysI8If0ULtP6Jkp8OKoeQfhgrrXgvVK01ODBAv/YvmfSx/NMNSiJkqaPpm30FJ2Pnaab39LkEPeyp5BfTYWMfqWHgXMOpgcFdrxnLOKdXBRGiN1e0/ns7qhQJHIQO1slGIBRo8rw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(9686003)(2906002)(38070700005)(122000001)(4326008)(55016003)(110136005)(508600001)(52536014)(26005)(8936002)(6506007)(66446008)(76116006)(33656002)(53546011)(82960400001)(66946007)(64756008)(66556008)(86362001)(5660300002)(71200400001)(186003)(55236004)(316002)(8676002)(7696005)(66476007)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?D/js/zEHMkunTNmAZtNusduzqdPXKltY1KrE+U4dpOiBaryHOUrg9OLPZDwM?= =?us-ascii?Q?Lary7NRXwWOhT1U5SvKopJpwxAA/aeJSkApcOsHCzHbFFonrB6VuXkyz6Plm?= =?us-ascii?Q?71WwlYE1yTOjIJ+CWs8wV05W53yr3gYHw1qwjdf5ABzxt5Ew2jKPSA+bHSBa?= =?us-ascii?Q?2h2XWe28DYBbkCL3FDvfOntQC+7TOetrykRt8WKrnTTwKy5fV0mevnzFSn44?= =?us-ascii?Q?lULOYGas9LEFFDHRVPk1sI59NTbHerjKiAE6KFvva/tBq57P6pAlVMTiqJ7N?= =?us-ascii?Q?orwpbLmDHFzF7ZbALF6altorV2jbadfY9xmp9iJ2o3ZPxUw0D8onV85S6LQ3?= =?us-ascii?Q?JHtIrLWtfls7vWikWw+JlKQXMD/XfOjjzBbzFDhXudLh1FvZuePsBVx3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?0fo7K4POkR9PIdAZ7yZvm9y7rDTiQT4qeUh1V63gEX2SQxUT4hVbPQHYoJrS?= =?us-ascii?Q?fgTXl/YfKxr+JVDsHWeO3xfYs20Y+qlmMHcc0sydhuG1xdiVgJXHylqnVVP8?= =?us-ascii?Q?EUPl6XJDHaqQ7FijR7K+kH3H9kFyEs8iWZWmZE+74ZhMNBTGVEcHYJSYlj4o?= =?us-ascii?Q?mQhvzcQ+mXjHjfr/R4wHgirJO4M6rcO0lGFlK9iLSyPCFs/f+z4cN+q25q5B?= =?us-ascii?Q?L+7mxA901rSq90hawisaCADVtn+zkwInfSSYI1yinRaMJn3pjqhc860VS5lt?= =?us-ascii?Q?ST96BIFk6R8tQE9BxpDtmnRxV4xHDc7jCuR796oS3sJBZV/eVjj7voObgR1W?= =?us-ascii?Q?ud3h6KO05Aizqt1jYm7UC7f7a8uZsmn5kpqTjuIIeP9p1A6m7PMWL6QJBSFx?= =?us-ascii?Q?Qnb3Ig=3D=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: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5282b7a3-cfbb-46cf-e249-08d9c904ee07 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2021 06:48:45.5704 (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: 1UnQ3ezZ46v7y907kA7+KWagnTeXb+3WGeRyci2a1qx7qvJE7KiFY1DgRn0vFW1YEpS48lFcuQc8BjHHb3/wT79Wt1yhOmrbbpMMP8Qmrms= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3740 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 Looks good. Thanks for the patch. Acked-by: Jay Jayatheerthan > -----Original Message----- > From: Naga Harish K, S V > Sent: Wednesday, December 22, 2021 11:44 AM > To: Jayatheerthan, Jay ; jerinjacobk@gmail.c= om > Cc: dev@dpdk.org > Subject: [PATCH] eventdev/rx_adapter: add event port get api >=20 > This patch introduces new api for retrieving event port id > of eth rx adapter. >=20 > Signed-off-by: Naga Harish K S V > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 20 ++++++++++++++++++++ > lib/eventdev/rte_event_eth_rx_adapter.h | 20 ++++++++++++++++++++ > lib/eventdev/version.map | 1 + > 3 files changed, 41 insertions(+) >=20 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_e= vent_eth_rx_adapter.c > index 809416d9b7..fca2e38690 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -3119,6 +3119,26 @@ rte_event_eth_rx_adapter_service_id_get(uint8_t id= , uint32_t *service_id) > return rx_adapter->service_inited ? 0 : -ESRCH; > } >=20 > +int > +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_= id) > +{ > + struct event_eth_rx_adapter *rx_adapter; > + > + if (rxa_memzone_lookup()) > + return -ENOMEM; > + > + RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); > + > + rx_adapter =3D rxa_id_to_adapter(id); > + if (rx_adapter =3D=3D NULL || event_port_id =3D=3D NULL) > + return -EINVAL; > + > + if (rx_adapter->service_inited) > + *event_port_id =3D rx_adapter->event_port_id; > + > + return rx_adapter->service_inited ? 0 : -ESRCH; > +} > + > int > rte_event_eth_rx_adapter_cb_register(uint8_t id, > uint16_t eth_dev_id, > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_e= vent_eth_rx_adapter.h > index 9546d792e9..1364eafe38 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.h > +++ b/lib/eventdev/rte_event_eth_rx_adapter.h > @@ -37,6 +37,7 @@ > * - rte_event_eth_rx_adapter_queue_conf_get() > * - rte_event_eth_rx_adapter_queue_stats_get() > * - rte_event_eth_rx_adapter_queue_stats_reset() > + * - rte_event_eth_rx_adapter_event_port_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() > @@ -684,6 +685,25 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t i= d, > uint16_t eth_dev_id, > uint16_t rx_queue_id); >=20 > +/** > + * Retrieve the event port ID of an adapter. If the adapter doesn't use > + * a rte_service function, this function returns -ESRCH. > + * > + * @param id > + * Adapter identifier. > + * > + * @param [out] event_port_id > + * A pointer to a uint32_t, to be filled in with the port id. > + * > + * @return > + * - 0: Success > + * - <0: Error code on failure, if the adapter doesn't use a rte_servic= e > + * function, this function returns -ESRCH. > + */ > +__rte_experimental > +int > +rte_event_eth_rx_adapter_event_port_get(uint8_t id, uint8_t *event_port_= id); > + > #ifdef __cplusplus > } > #endif > diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map > index ade1f1182e..91d2b5723b 100644 > --- a/lib/eventdev/version.map > +++ b/lib/eventdev/version.map > @@ -102,6 +102,7 @@ EXPERIMENTAL { >=20 > # added in 21.11 > rte_event_eth_rx_adapter_create_with_params; > + rte_event_eth_rx_adapter_event_port_get; > rte_event_eth_rx_adapter_queue_conf_get; > rte_event_eth_rx_adapter_queue_stats_get; > rte_event_eth_rx_adapter_queue_stats_reset; > -- > 2.25.1