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 12C2BA0C45; Wed, 22 Sep 2021 17:45:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92A38411EC; Wed, 22 Sep 2021 17:45:17 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id DD42D411A8 for ; Wed, 22 Sep 2021 17:45:14 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="210861318" X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="210861318" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2021 08:45:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="436272000" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 22 Sep 2021 08:45:13 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) 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.2242.12; Wed, 22 Sep 2021 08:45:12 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2242.12 via Frontend Transport; Wed, 22 Sep 2021 08:45:12 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) 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; Wed, 22 Sep 2021 08:45:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0Z9iEEcZFA0fK4DGeAiMIv5vesYEn8TSjpMf95PuV9ay5A9WgTiP/49A5facuF6qKs/a11nIk/52JtrFcmkzc6FZSZ1WmvA96EFqlaoslHLnDxCPEol2BZIPdKfx8fO869wzV//6bl39mHLmPzAfdrq2//G+pI/lAgmfTZVRX8mQqMfN6rWS4pu7Y08lYgFYgho6qnL1MpsAaOnHOIkTvvqbclMUdG050eMmurJth4lC9KpZYWCBnQfRHD8KHgDkQE2ivmfi170FfdUzUztAojNeoQD+RnoRVj/+6JnOZR/lWscvvgH75unfE9GGxIEiW2EVd4LFYMInn1ERx8y1A== 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=hkYrbb0pAEgIVr7BGwYFSNDd8xtDeFAsi6eI0CCe/O4=; b=doGKxilZd2MIkcn49GJ9Z0CM/NLFOx6KniFcfVZiC/2IuCmtq0q7mHnBVZJwRX0MKAVdNZVnWQOEOfOXXC8Ntre5Ep3iHVK9Q+N5n0UeEAPXY0u2WM13Fj/zPiL+ZeQpthw72enbdnHcbnc6R9V+sRHfdPXSk2QnD8HxKT5TghZg2J4+oQTvjM0PGoiVkiFMATOwMP9LORyaV1RtSQjMFUYrGevNO+BbS9Z07bKXUc0avN9vKELTQA+9g30JbYrK2D4qMBDxR1TwOEiN3qy0MbkcTTyeyuIMmLnoMA0207wKKY2A0UmmB1qlotRkw0EL70uC5XkjMlUZsLkIEZP3vg== 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=hkYrbb0pAEgIVr7BGwYFSNDd8xtDeFAsi6eI0CCe/O4=; b=tG/lGSoi0UpV3rlgCdR9r7DdqeuHOm36IJdvgm2Perc8hSPZDdrvyqsyu32F0XRJ48425C2CezmxsiPQz5OtNE7XG/9rVr8rIoJ+Su09J1w40qgvRxVtnhoOM9OUycMZtDSjTMb8thzeEvio4DA4ElSpeQfzRV0ioN+OYlxVcS8= Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by DM6PR11MB3804.namprd11.prod.outlook.com (2603:10b6:5:13c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.17; Wed, 22 Sep 2021 15:45:11 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::a4b7:7005:e8:ac15]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::a4b7:7005:e8:ac15%5]) with mapi id 15.20.4523.019; Wed, 22 Sep 2021 15:45:11 +0000 From: "Naga Harish K, S V" To: Pavan Nikhilesh Bhagavatula , "Jerin Jacob Kollanukkaran" , "Jayatheerthan, Jay" CC: "dev@dpdk.org" Thread-Topic: [EXT] [dpdk-dev] [PATCH v2 4/5] eventdev/rx_adapter: implement per queue event buffer Thread-Index: AQHXrs2OPe04MTPfTk6tMpolXPLo56uu9aIAgAE86tA= Date: Wed, 22 Sep 2021 15:45:11 +0000 Message-ID: References: <20210918131140.3543317-1-s.v.naga.harish.k@intel.com> <20210921094559.1788022-1-s.v.naga.harish.k@intel.com> <20210921094559.1788022-4-s.v.naga.harish.k@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: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d18f8f54-bfa7-498d-eb00-08d97ddff67e x-ms-traffictypediagnostic: DM6PR11MB3804: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:357; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XOO0u0GTK5atqia6QeGsDUMu/01hzXrgSpvpHlJx6lWQx1Z5B3PmMNjM/6oYSayxFJcfGGbKDA/EK79oYWM1tv6CKKKRVCjzKAi2nIQ/bZ6F/Dm7zsCvH0O1lPcBXtSbOc4goE0ThPA0nvwGuxKYpl2hAe0+5/gzqELkmWh17lT9FqsOipzo7/S9yCK6pOu1+Fs2xNMJhz4dUNBXxEifz/D4HvXzRppTykZOY9CkhgS1SckbQ4GgsAmJE/HapxeL1MdLN6oIFFt9/pBMsqUgVg7NfaTFHP07MavktYdyO+M6cyZWyRNyNhgx01bY9IDooWaZiI7mV6a/3g3YgGjTyVxJYhuo9YcYIM3O6nbQGwJWwUF7Mkr4U2yTY+WZYGDJCWuqyqTOJl/qLs2Ha4S2g8Zfkbc3S90VwxMLBa1ZefZ+E+kn2vns3UgkIMZT/3lm2XFlxRQnnDk/GNDFwWzgWce+k4XGwoZgWSEUww/eoFUuFwjc/AJFwHmXikPuwhEDKQhgqUr2Q9rpeEvVTa7Wj2mvz9j+Q8n0FLBUXVzp/OhcLiuQMEEl49iVB6cnliStFLf+pj9fSTKhPBTFWX5cyq8XjvuJpYYJY28R+fwYqfi6RdSqdfxeHRDjtMnebBv4BwM39Vw3FDNccGKt6lRJj0M4GkjI8YUQvaSrwzIhNwjHUM9VctcKoL22b1c6iMbFfmEk29uwYSgLUrojQX4x9w== 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:(4636009)(366004)(122000001)(55016002)(6636002)(38100700002)(316002)(4326008)(2906002)(8676002)(8936002)(86362001)(38070700005)(5660300002)(9686003)(66476007)(508600001)(66946007)(66446008)(26005)(53546011)(186003)(6506007)(66556008)(71200400001)(55236004)(110136005)(64756008)(7696005)(76116006)(52536014)(83380400001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?apFmeoSzVk0KG6+wefa97Q4VEuhc37gie/quCeL6tyME3vXOY1c8AEY7b+mV?= =?us-ascii?Q?pIMrAPwG7WRf1XK5o4wGYGaoegNcPZZDUNHioJx6H06hlcrVkAe3ISmNUYPp?= =?us-ascii?Q?1GoiJa4/iAsN9J9AV1ztWtpA729Sq1vQ7zZDI5xALVUVGGr5zZnscEo8MHK6?= =?us-ascii?Q?XvqlIAp5nRPDasRHcKzSj1ZTDceKYjvBse37j2T6wlYQWw+vg5Yz2kqgyCHW?= =?us-ascii?Q?T8bT84jleTQRzJ2YWul+69c91ee5IMhtllCc5ddwUWp2NpT6UH3tdZ/Hqzbd?= =?us-ascii?Q?dY9cqD4x8wXSVEkkuHcgd3IlcVYRLuQivo+3dK7ndGOV9ILccxGeG9Jt2Wfs?= =?us-ascii?Q?TQadlL8PYBYZjVhyj73InrLF4irom5ss1sbIMbK5ODMnEe0Sn5wZvGSMdXVj?= =?us-ascii?Q?onUoAKGDdGZX3Y0zG4BpWYTsDVsO0C/b4/Cbs0IvsBjePbqyKUHBLHkKS5t2?= =?us-ascii?Q?Ht7M914i+wXr9uEEgIw9dpF9UmG2/jz4j7srpJW9ikThbHrIVGpo+MinotOU?= =?us-ascii?Q?+ssMzgWiN80L5Bm9uPIrPr35yNU1yv5Z0rC4qxxH6kVzQV/6QEovYgxAOpwT?= =?us-ascii?Q?bl/iUo1T+tqrMREERiQ5ASu1fffUfpY+3sdztvIkJaJO3kqsK0BlKS9zbM2J?= =?us-ascii?Q?BslBDWUysnk3GVS/6EUIiTrMUt0pefNEO722v7RjjkBCv7h0GzMz7i0vlX/D?= =?us-ascii?Q?V0c17DIruhsnHjiOF3zZH3P5IMvDoI8zdWksXNzo/oizSaOOq7lZ5x9IsBcz?= =?us-ascii?Q?ZOc9jYnMpqynfdiwJAs/FKah9oWu61/vEC7KjxEnFJt1oWQcVhgirsoL3noc?= =?us-ascii?Q?+bPlVE2Da0Gq3bQAFU+2cXKG5mwVWT9SpG4qTZYgo2EG/YwZQ6x6/dE5LfwM?= =?us-ascii?Q?PodJbOWAI/CKBpaWVfroNS2v9Yux1TOPhx5kFx52wU2S/Zi64E5aEbGMrclP?= =?us-ascii?Q?XYQwntRmLXL6xouc4Hp6fokRYSrPn/r0CztrRuUhRuZOgvakVC3tz11JsxW8?= =?us-ascii?Q?D7LocYgck7SlXJRjeCBPTyxuoEFKMtrHnhN3cu4GFhaK7FKqiHxfD3YsMb3V?= =?us-ascii?Q?5Py5lxhF4VJQxb/HGmGeuBqbTmnIQgVUiL4vfGwGaHVYlqObpPNO23H4Awdj?= =?us-ascii?Q?0y2qpza6f03MwFVHSbEWY7FSszce19OJ88qAXPzql9/rFo7qAoTQD4m+J7j2?= =?us-ascii?Q?AozttyaFvtkyFT2TmP80hTm16bNYWcH+tuqmh7bmzc9VosMpjH8/ueGS/V4e?= =?us-ascii?Q?xeAnZpX8xxOlnsEvJotbMo90vQFigjNOMIUdFCRd0jrj+S0HEUc5VwhTF2vl?= =?us-ascii?Q?jkCFeUXPsJCBcT8ax1h/dWrY?= 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: d18f8f54-bfa7-498d-eb00-08d97ddff67e X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2021 15:45:11.5468 (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: CGRFlUerh+vhUA6J2ui1gVCCczMHyeXlnsM4m4WRDq10T5EoLHTPbgx8ev7AFVpOigkrbr8UrpbPsBMvS32MVPWRbCu/GHTq9vsBdeekcqU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3804 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [EXT] [PATCH v2 4/5] eventdev/rx_adapter: implement per queue event buffer 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: Pavan Nikhilesh Bhagavatula > Sent: Wednesday, September 22, 2021 2:22 AM > To: Naga Harish K, S V ; Jerin Jacob > Kollanukkaran ; Jayatheerthan, Jay > > Cc: dev@dpdk.org > Subject: RE: [EXT] [dpdk-dev] [PATCH v2 4/5] eventdev/rx_adapter: > implement per queue event buffer >=20 > >this patch implement the per queue event buffer after required > >validations. > > > >Signed-off-by: Naga Harish K S V > >--- > > lib/eventdev/rte_event_eth_rx_adapter.c | 188 > >++++++++++++++++++------ > > 1 file changed, 139 insertions(+), 49 deletions(-) > > >=20 > >=20 > >@@ -2277,6 +2356,8 @@ > >rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id, > > > > /* Event buffer with default size =3D 6*BATCH_SIZE */ > > rxa_params.event_buf_size =3D ETH_EVENT_BUFFER_SIZE; > >+ rxa_params.use_queue_event_buf =3D false; > >+ >=20 > Both these params should be passed to the driver layer when > RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT is set in caps. >=20 I think the event buffer is not required for RTE_EVENT_ETH_RX_ADAPTER_CAP_I= NTERNAL_PORT Adapter capability. In the existing implementation for adapter create,=20 there is no special handling for RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT= capability. Let us know this is still a valid requirement. > > return rxa_create(id, dev_id, &rxa_params, conf_cb, conf_arg); } > > > >@@ -2296,9 +2377,9 @@ > >rte_event_eth_rx_adapter_create_with_params(uint8_t id, uint8_t > dev_id, > > if (rxa_params =3D=3D NULL) { > > rxa_params =3D &temp_params; > > rxa_params->event_buf_size =3D > >ETH_EVENT_BUFFER_SIZE; > >- } > >- > >- if (rxa_params->event_buf_size =3D=3D 0) > >+ rxa_params->use_queue_event_buf =3D false; > >+ } else if ((!rxa_params->use_queue_event_buf && > >+ rxa_params->event_buf_size =3D=3D 0)) > > return -EINVAL; > > > > pc =3D rte_malloc(NULL, sizeof(*pc), 0); @@ -2364,7 +2445,8 @@ > >rte_event_eth_rx_adapter_free(uint8_t id) > > if (rx_adapter->default_cb_arg) > > rte_free(rx_adapter->conf_arg); > > rte_free(rx_adapter->eth_devices); > >- rte_free(rx_adapter->event_enqueue_buffer.events); > >+ if (!rx_adapter->use_queue_event_buf) > >+ rte_free(rx_adapter->event_enqueue_buffer.events); > > rte_free(rx_adapter); > > event_eth_rx_adapter[id] =3D NULL; > > > >@@ -2468,6 +2550,14 @@ > >rte_event_eth_rx_adapter_queue_add(uint8_t id, > > return -EINVAL; > > } > > > >+ if ((rx_adapter->use_queue_event_buf && > >+ queue_conf->event_buf_size =3D=3D 0) || > >+ (!rx_adapter->use_queue_event_buf && > >+ queue_conf->event_buf_size !=3D 0)) { > >+ RTE_EDEV_LOG_ERR("Invalid Event buffer size for the > >queue"); > >+ return -EINVAL; > >+ } > >+ > > dev_info =3D &rx_adapter->eth_devices[eth_dev_id]; > > > > if (cap & > >RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) { > >-- > >2.25.1