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 D257AA0C41; Sun, 19 Sep 2021 16:25:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62AF64014D; Sun, 19 Sep 2021 16:25:39 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id B58EF40041 for ; Sun, 19 Sep 2021 16:25:37 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10111"; a="222671335" X-IronPort-AV: E=Sophos;i="5.85,305,1624345200"; d="scan'208";a="222671335" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2021 07:25:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,305,1624345200"; d="scan'208";a="435311896" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga003.jf.intel.com with ESMTP; 19 Sep 2021 07:25:36 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 19 Sep 2021 07:25:35 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 19 Sep 2021 07:25:35 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sun, 19 Sep 2021 07:25:35 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sun, 19 Sep 2021 07:25:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UO2521LvZA00sXNqPwD3tnC8R6BSU2FuJWXzMxOLn4oudNMtBoIrjlCedWCpn84zEJWRZJyRmLq26g7P5CJd0/GXmHPBgM3CauGlX2VBwLi5zwHhKxBJJMc5DqJeeB/j+wYOivKZHyAq5sW78Wg1nD653/lKV1FjuEN027Gg6iIZJsoS/CrLCAmHBrQLEPs9omgu5FSuhAXXHvK0CXTVmwl0iXK9B8BahFYmVbET7b6E/0gioLzuIfjVbktFbncEhg/09xqZZyznuD3XajCveobl1oGqiRZnj4pWu6yb/od1Q4lBtL8qHEFeB6zdQZ7mXadahWw79rd2pgft1RTlTw== 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=3rFpsXqTPoZcvax2gT5ZvVCuofr40RvIhf+UrDJG/F4=; b=k2yZF91CREHP4AXNjcUuMkRj97SacJiv8k9pj7NuaGVahvoghmNfQIBi4nr3B/ImAPgN8zDJX/82h2iLPB2NWQWYZ5RXR6J9acKwlPaniD0GcG+PbWKMcbATsyZtY+goH1g0oqldHYAXm21cZC8cXfBi0CJqHySYndzxfgfmANyit5QylV8H287uicpA2nCPW5Zq9j3gkZrvHbWtDwPnQmVBBuw+HUPwQAHLKQQPH4/LyOXYb5dqjhGuRuP/N48+nJj4ZXy/i5wj5RJRxl8oxRMP32PTi3FqSAwlILXsQi9sHnfIJOq9NR6AFTmpkclpmGst9JJK3W6KM7DijldGbQ== 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=3rFpsXqTPoZcvax2gT5ZvVCuofr40RvIhf+UrDJG/F4=; b=zt8g9tOjJPopV9sD9Xap4nChbInMS9AwBimBAuwit+ZdLdrDo30UtS5l9CqleuIdCsqGOWQhtexV6yST5tRcCyOdd0xgNCNjbU9wAVP9uJOUzEwsaHiW1Q3i8kHhc6dQyHBXBbyDb2Ms8Z6G9IggUYbHzRpG51Wieojgf8fXUmI= Received: from PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13) by PH0PR11MB4934.namprd11.prod.outlook.com (2603:10b6:510:30::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.18; Sun, 19 Sep 2021 14:25:33 +0000 Received: from PH0PR11MB4824.namprd11.prod.outlook.com ([fe80::aca2:cce5:bef2:8a27]) by PH0PR11MB4824.namprd11.prod.outlook.com ([fe80::aca2:cce5:bef2:8a27%2]) with mapi id 15.20.4523.018; Sun, 19 Sep 2021 14:25:33 +0000 From: "Gujjar, Abhinandan S" To: Anoob Joseph , Shijith Thotton CC: Jerin Jacob Kollanukkaran , "Pavan Nikhilesh Bhagavatula" , Akhil Goyal , Ray Kinsella , Ankur Dwivedi , "dev@dpdk.org" Thread-Topic: [PATCH v3] eventdev: update crypto adapter metadata structures Thread-Index: AQHXnj3WjnQgyKZ1dU+J5G+CJPvld6uYTrEggAAde4CAAHAWEIAA8W+AgAABoKCACThuAIAAAqoAgAh6tsA= Date: Sun, 19 Sep 2021 14:25:33 +0000 Message-ID: References: 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: d1ddc78a-1153-42fc-7282-08d97b795750 x-ms-traffictypediagnostic: PH0PR11MB4934: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2a+1JY1fn7OYmaYEytZaW1BjwKzuvC0IYrvrqRbdHPgFSVwWN/FwtjoaNvCKM9PQqYddw5WOebTMrrhLpGFdxbqVgdmiKndI1QFfVbVFvQYCtAXYGWLPsXdPyrAYvYzeaXo4HrzTpVbl89kcA7CObtW5xMcNDDbFkfl2lOqgv5ef1ebu4018aKIPRCcb5DKrIUVvwiNUNJdicjCMDp/ZK8rKZDVz27JNrH2xUUbS3qpGkLr2RHjsWyHd/Q7GGzJ41lGoDbxgOAPNDAx1wp+HMzzLkWi8YrMkBSkNKOqgnOciFRnVQ66CTlyYcle0+BPAeyxbb1x/wmEjyTT9BwK3g6AHhs5BfAU3jdHUp9hXCgI4McyGO3VUYcYsYQGCNAbImjsfJ4AUhkPLjax+hF5m0TcC5tMHRFpjvJzMrv7NM3vYT8Jx2P0FoOCmsdK3TXYSAJ4rV2udEks3+o3wOyvVIG9AAatoHO8Fe84lPsvjSaMnZiKv9glj1ZcRfU+fciLxoQPuBvyjOzzWqiUNsZDpwSUFFsD1RKqYO6RAtOIMVtCljwRFefbRCi4tYhlY1axZsLHd+CQm0YPPEK58+NedleWUfVJxvPJJlDFqg00vpVzG7TvgpyOo9SOoZ2agnFBmr0nDzKvN3X/P7p15jF6gJd40MovW1o/DwHiLLb+btASe8U1C/EjvzywfZqtabpIeS3M21RRXm/lBoIGHi4oYEg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB4824.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(66476007)(64756008)(33656002)(6506007)(508600001)(30864003)(15650500001)(76116006)(53546011)(83380400001)(7696005)(2906002)(66446008)(66556008)(66946007)(186003)(9686003)(26005)(110136005)(54906003)(86362001)(55016002)(8676002)(5660300002)(8936002)(122000001)(38070700005)(71200400001)(38100700002)(4326008)(316002)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MDrmvJebI3WKfyJovWgToL5TYplTKsjDFq/GKLThSPq4MwSorbzoOFPW9W3b?= =?us-ascii?Q?bpDhNxCUE84C76EUchHR/QxODKLBjfm1ubJbO+pWArOk6bi0kxeOkIQ3SkAq?= =?us-ascii?Q?G80bUYa8pT0s/v6EzxWiwI8iH7ApdHlNte09q8Y8MBAvAO3SPHqSCBE2Q8/v?= =?us-ascii?Q?EbjR9KwulXmyeaL0i2qjIjgppV/mZcGL3pAoWQlbju7zp59BG6fvUh2DnN8m?= =?us-ascii?Q?EsrAzf0r16CNKNK3q4CyXEt8X39pIWyVX/ZzhPUfCQ21myNSvwXpvdVbs74p?= =?us-ascii?Q?1duInh1AL8EBcr6bDkEH9T81C6FkgTR4R1nvKlYOju+9ciVnphfDY1lgNOA8?= =?us-ascii?Q?FX5PCO1vfMtD66eWNnnYOq5/oQRQhaXwBKA/IAY1puR9+ztIz0/oS9zwkjP+?= =?us-ascii?Q?7VdNAGD4rc3UBOEvafKwghzrQoEJv+nQVew/lMenKOceltIPIg54pbg1sX1j?= =?us-ascii?Q?91wa9EN94ISSFhuVy3YsP7vZd35Ss25rcwb7uvzTl2i9eNTSHqrSt4YIgXDq?= =?us-ascii?Q?okiG9FWbFuAgm3Ck8GC+dnpotolXApBaeMHjKUCGMqZMOAsI/U3XFILYVOQc?= =?us-ascii?Q?V1/GfmiYB+EnCaYxmt0fKWqAULvF6yBTTo0zqkIkZ3exs4Nd2Wkl1wS9b7/i?= =?us-ascii?Q?SBUi70E7ko34vtmxv/CybvBj1GDXu+c1wf/Q/q0SrYfDv2ZDdwuL24lQwWjE?= =?us-ascii?Q?JMUj4Ge2/F+6WZ4VrhoCRL2y1dhQeuJJvCqrJyEBYyLiO+Y8K72dvtxFlkbF?= =?us-ascii?Q?Ui3qOlhag81aylC1ZQFN5P1UuFwCMyW0SCm+DKzznqezYvGLoQkeol3r6Rkq?= =?us-ascii?Q?YD22gwT8qKF+7276XYNU7+ovKgLgYJtfhiGgW8I3xTjbrI9SZQ1ZR0KvrKT+?= =?us-ascii?Q?1CSX7lPCzMMflLvY+umP+4UyJuUw7VHMAOa2TM4mq9GLCYoIx79G3682LySt?= =?us-ascii?Q?gWQMKFpo+RRqbQ1RSw1BwRI6aOAUftS32H6lfQ+rq6THvdodRSJtIQYEO1rX?= =?us-ascii?Q?MWLaHmlJXqvCPo4/LcJ0dbLkI4ccOUBNHMd62Za01UIJUAPa+VUg8YEd7O0F?= =?us-ascii?Q?5QMXz6y0RDqTeAH4UQKrsJMLVs2/VZUhb6vO8mRZFgb2Eu+Nzyo2yfN/vW4D?= =?us-ascii?Q?yWcHAv5O97RJlU4Htz/mxubeBUPco6hd86pHx9JuVfhhVUyuWy5oR3gyjZmD?= =?us-ascii?Q?Y29lkwFEK1HyU+Xa/NX26gAZrllYvfaSJXLPhab3P4UcnSfWqudYZKQzzrnS?= =?us-ascii?Q?rqTwkV+Q52sIFXYC0Sxl8Rv3hvqDhjK9JQomUkx1BQ8URE9mxPoAL31CXmz3?= =?us-ascii?Q?eMo21/ZzmapLg6RAz4QXo+6D?= x-ms-exchange-transport-forked: True 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: PH0PR11MB4824.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1ddc78a-1153-42fc-7282-08d97b795750 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2021 14:25:33.4928 (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: yxy1v/MUXn6QZZNRpmHWvky8FudFmRSQDBPad5gKKMWfp4C0Ez/OqQO3We7OqvYH+lcOVssF3LDKf01uQ5m95ccCfg/PkpI6cNCIwnosBUI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4934 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] eventdev: update crypto adapter metadata structures 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" Hi Shijith & Anoob, > -----Original Message----- > From: Anoob Joseph > Sent: Tuesday, September 14, 2021 10:16 AM > To: Gujjar, Abhinandan S > Cc: Jerin Jacob Kollanukkaran ; Pavan Nikhilesh > Bhagavatula ; Akhil Goyal > ; Ray Kinsella ; Ankur Dwivedi > ; Shijith Thotton ; > dev@dpdk.org > Subject: RE: [PATCH v3] eventdev: update crypto adapter metadata > structures >=20 > Hi Abhinandan, Shijith, >=20 > Please see inline. >=20 > Thanks, > Anoob >=20 > > -----Original Message----- > > From: Shijith Thotton > > Sent: Tuesday, September 14, 2021 10:07 AM > > To: Gujjar, Abhinandan S ; dev@dpdk.org > > Cc: Jerin Jacob Kollanukkaran ; Anoob Joseph > > ; Pavan Nikhilesh Bhagavatula > > ; Akhil Goyal ; Ray > > Kinsella ; Ankur Dwivedi > > Subject: RE: [PATCH v3] eventdev: update crypto adapter metadata > > structures > > > > >> >> > > >> >> >> In crypto adapter metadata, reserved bytes in request info > > >> >> >> structure is a space holder for response info. It enforces an > > >> >> >> order of operation if the structures are updated using memcpy > > >> >> >> to avoid overwriting response info. It is logical to move the > > >> >> >> reserved space out of request info. It also solves the > > >> >> >> ordering issue > > >> mentioned before. > > >> >> >I would like to understand what kind of ordering issue you have > > >> >> >faced with the current approach. Could you please give an > > >> >> >example/sequence > > >> >> and explain? > > >> >> > > > >> >> > > >> >> I have seen this issue with crypto adapter autotest (#n215). > > >> >> > > >> >> Example: > > >> >> rte_memcpy(&m_data.response_info, &response_info, > > >> >> sizeof(response_info)); rte_memcpy(&m_data.request_info, > > >> >> &request_info, sizeof(request_info)); > > >> >> > > >> >> Here response info is getting overwritten by request info. > > >> >> Above lines can reordered to fix the issue, but can be ignored > > >> >> with this > > >> patch. > > >> >There is a reason for designing the metadata in this way. > > >> >Right now, sizeof (union rte_event_crypto_metadata) is 16 bytes. > > >> >So, the session based case needs just 16 bytes to store the data. > > >> >Whereas, for sessionless case each crypto_ops requires another 16 > > bytes. > > >> > > > >> >By changing the struct in the following way you are doubling the > > >> >memory requirement. > > >> >With the changes, for sessionless case, each crypto op requires 32 > > >> >bytes of space instead of 16 bytes and the mempool will be bigger. > > >> >This will have the perf impact too! > > >> > > > >> >You can just copy the individual members(cdev_id & queue_pair_id) > > >> >after the response_info. > > >> >OR You have a better way? > > >> > > > >> > > >> I missed the second word of event structure. It adds an extra 8 > > >> bytes, which is not required. > > >I guess you meant not adding, it is overlapping with request informati= on. > > >> Let me know, what you think of below change to metadata structure. > > >> > > >> struct rte_event_crypto_metadata { > > >> uint64_t response_info; // 8 bytes > > >With this, it lags clarity saying it is an event information. > > >> struct rte_event_crypto_request request_info; // 8 bytes }; > > >> > > >> Total structure size is 16 bytes. > > >> > > >> Response info can be set like below in test app: > > >> m_data.response_info =3D response_info.event; > > >> > > >> The main aim of this patch is to decouple response info from request > info. > > >The decoupling was required as it was doing memcpy. > > >If you copy the individual members of request info(after response), > > >you don't require it. > > > > With this change, the application will be free of such constraints. >=20 > [Anoob] Why don't we make it like, >=20 > struct rte_event_crypto_metadata { > uint64_t ev_w0_template; > /**< Template of the first word of ``struct rte_event`` > (rte_event.event) to be set in the events generated by crypto adapter in > both RTE_EVENT_CRYPTO_ADAPTER_OP_NEW and > * RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD modes. > */ > struct rte_event_crypto_request request_info; }; >=20 > This way, the usage would become more obvious and we will not have > additional space reserved as well. Thanks for the suggestion. At this point, it is like an application without= understanding the data structure/ internals has used memcpy and we are trying to fix it by changing the actual data str= ucture instead of fixing the application! With this patch, the other applications(outside of dpdk) which are using th= e data structures in a right are forced to change! I don't think, this is the right way to handle this. I think, we should be = updating the test case and documentation for this rather than changing the data structure. I expect the next version of this patch = should have those changes. Thanks! >=20 > > > > >> > > >> >> > > >> >> >> > > >> >> >> This patch removes the reserve field from request info and > > >> >> >> makes event crypto metadata type to structure from union to > > >> >> >> make space for response info. > > >> >> >> > > >> >> >> App and drivers are updated as per metadata change. > > >> >> >> > > >> >> >> Signed-off-by: Shijith Thotton > > >> >> >> Acked-by: Anoob Joseph > > >> >> >> --- > > >> >> >> v3: > > >> >> >> * Updated ABI section of release notes. > > >> >> >> > > >> >> >> v2: > > >> >> >> * Updated deprecation notice. > > >> >> >> > > >> >> >> v1: > > >> >> >> * Rebased. > > >> >> >> > > >> >> >> app/test/test_event_crypto_adapter.c | 14 ++++++= +------ > - > > >> >> >> doc/guides/rel_notes/deprecation.rst | 6 ------ > > >> >> >> doc/guides/rel_notes/release_21_11.rst | 2 ++ > > >> >> >> drivers/crypto/octeontx/otx_cryptodev_ops.c | 8 ++++--= -- > > >> >> >> drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 4 ++-- > > >> >> >> .../event/octeontx2/otx2_evdev_crypto_adptr_tx.h | 4 ++-- > > >> >> >> lib/eventdev/rte_event_crypto_adapter.c | 8 ++++--= -- > > >> >> >> lib/eventdev/rte_event_crypto_adapter.h | 15 +++++-= ------ > -- > > - > > >> >> >> 8 files changed, 26 insertions(+), 35 deletions(-) > > >> >> >> > > >> >> >> diff --git a/app/test/test_event_crypto_adapter.c > > >> >> >> b/app/test/test_event_crypto_adapter.c > > >> >> >> index 3ad20921e2..0d73694d3a 100644 > > >> >> >> --- a/app/test/test_event_crypto_adapter.c > > >> >> >> +++ b/app/test/test_event_crypto_adapter.c > > >> >> >> @@ -168,7 +168,7 @@ test_op_forward_mode(uint8_t > > session_less) > > >> { > > >> >> >> struct rte_crypto_sym_xform cipher_xform; > > >> >> >> struct rte_cryptodev_sym_session *sess; > > >> >> >> - union rte_event_crypto_metadata m_data; > > >> >> >> + struct rte_event_crypto_metadata m_data; > > >> >> >> struct rte_crypto_sym_op *sym_op; > > >> >> >> struct rte_crypto_op *op; > > >> >> >> struct rte_mbuf *m; > > >> >> >> @@ -368,7 +368,7 @@ test_op_new_mode(uint8_t session_less) > { > > >> >> >> struct rte_crypto_sym_xform cipher_xform; > > >> >> >> struct rte_cryptodev_sym_session *sess; > > >> >> >> - union rte_event_crypto_metadata m_data; > > >> >> >> + struct rte_event_crypto_metadata m_data; > > >> >> >> struct rte_crypto_sym_op *sym_op; > > >> >> >> struct rte_crypto_op *op; > > >> >> >> struct rte_mbuf *m; > > >> >> >> @@ -406,7 +406,7 @@ test_op_new_mode(uint8_t session_less) > > >> >> >> if (cap & > > >> >> >> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { > > >> >> >> /* Fill in private user data information */ > > >> >> >> rte_memcpy(&m_data.response_info, > > >> >> &response_info, > > >> >> >> - sizeof(m_data)); > > >> >> >> + sizeof(response_info)); > > >> >> >> > > rte_cryptodev_sym_session_set_user_data(sess, > > >> >> >> &m_data, > > sizeof(m_data)); > > >> >> >> } > > >> >> >> @@ -426,7 +426,7 @@ test_op_new_mode(uint8_t session_less) > > >> >> >> op->private_data_offset =3D len; > > >> >> >> /* Fill in private data information */ > > >> >> >> rte_memcpy(&m_data.response_info, > > &response_info, > > >> >> >> - sizeof(m_data)); > > >> >> >> + sizeof(response_info)); > > >> >> >> rte_memcpy((uint8_t *)op + len, &m_data, > > >sizeof(m_data)); > > >> >> >> } > > >> >> >> > > >> >> >> @@ -519,7 +519,7 @@ configure_cryptodev(void) > > >> >> >> DEFAULT_NUM_XFORMS * > > >> >> >> sizeof(struct rte_crypto_sym_xform) + > > >> >> >> MAXIMUM_IV_LENGTH + > > >> >> >> - sizeof(union rte_event_crypto_metadata), > > >> >> >> + sizeof(struct rte_event_crypto_metadata), > > >> >> >> rte_socket_id()); > > >> >> >> if (params.op_mpool =3D=3D NULL) { > > >> >> >> RTE_LOG(ERR, USER1, "Can't create > > >CRYPTO_OP_POOL\n"); > > >> >> @@ -549,12 > > >> >> >> +549,12 @@ configure_cryptodev(void) > > >> >> >> * to include the session headers & private data > > >> >> >> */ > > >> >> >> session_size =3D > > >> >> >> rte_cryptodev_sym_get_private_session_size(TEST_CDEV_ID); > > >> >> >> - session_size +=3D sizeof(union rte_event_crypto_metadata); > > >> >> >> + session_size +=3D sizeof(struct rte_event_crypto_metadata); > > >> >> >> > > >> >> >> params.session_mpool =3D > > >rte_cryptodev_sym_session_pool_create( > > >> >> >> "CRYPTO_ADAPTER_SESSION_MP", > > >> >> >> MAX_NB_SESSIONS, 0, 0, > > >> >> >> - sizeof(union rte_event_crypto_metadata), > > >> >> >> + sizeof(struct rte_event_crypto_metadata), > > >> >> >> SOCKET_ID_ANY); > > >> >> >> TEST_ASSERT_NOT_NULL(params.session_mpool, > > >> >> >> "session mempool allocation failed\n"); diff -- > > git > > >> >> >> a/doc/guides/rel_notes/deprecation.rst > > >> >> >> b/doc/guides/rel_notes/deprecation.rst > > >> >> >> index 76a4abfd6b..58ee95c020 100644 > > >> >> >> --- a/doc/guides/rel_notes/deprecation.rst > > >> >> >> +++ b/doc/guides/rel_notes/deprecation.rst > > >> >> >> @@ -266,12 +266,6 @@ Deprecation Notices > > >> >> >> values to the function > > >> >> >> ``rte_event_eth_rx_adapter_queue_add`` > > >> using > > >> >> >> the structure ``rte_event_eth_rx_adapter_queue_add``. > > >> >> >> > > >> >> >> -* eventdev: Reserved bytes of ``rte_event_crypto_request`` > > >> >> >> is a space holder > > >> >> >> - for ``response_info``. Both should be decoupled for better > clarity. > > >> >> >> - New space for ``response_info`` can be made by changing > > >> >> >> - ``rte_event_crypto_metadata`` type to structure from union. > > >> >> >> - This change is targeted for DPDK 21.11. > > >> >> >> - > > >> >> >> * metrics: The function ``rte_metrics_init`` will have a > > >> >> >> non-void > > return > > >> >> >> in order to notify errors instead of calling ``rte_exit``. > > >> >> >> > > >> >> >> diff --git a/doc/guides/rel_notes/release_21_11.rst > > >> >> >> b/doc/guides/rel_notes/release_21_11.rst > > >> >> >> index d707a554ef..ab76d5dd55 100644 > > >> >> >> --- a/doc/guides/rel_notes/release_21_11.rst > > >> >> >> +++ b/doc/guides/rel_notes/release_21_11.rst > > >> >> >> @@ -100,6 +100,8 @@ ABI Changes > > >> >> >> Also, make sure to start the actual text at the margin. > > >> >> >> > > >> >> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > >> >> >> > > >> >> >> +* eventdev: Modified type of ``union > > >> >> >> +rte_event_crypto_metadata`` to struct and > > >> >> >> + removed reserved bytes from ``struct > > rte_event_crypto_request``. > > >> >> >> > > >> >> >> Known Issues > > >> >> >> ------------ > > >> >> >> diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c > > >> >> >> b/drivers/crypto/octeontx/otx_cryptodev_ops.c > > >> >> >> index eac6796cfb..c51be63146 100644 > > >> >> >> --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c > > >> >> >> +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c > > >> >> >> @@ -710,17 +710,17 @@ submit_request_to_sso(struct ssows > > *ws, > > >> >> >> uintptr_t req, > > >> >> >> ssovf_store_pair(add_work, req, > > >> >> >> ws->grps[rsp_info->queue_id]); } > > >> >> >> > > >> >> >> -static inline union rte_event_crypto_metadata * > > >> >> >> +static inline struct rte_event_crypto_metadata * > > >> >> >> get_event_crypto_mdata(struct rte_crypto_op *op) { > > >> >> >> - union rte_event_crypto_metadata *ec_mdata; > > >> >> >> + struct rte_event_crypto_metadata *ec_mdata; > > >> >> >> > > >> >> >> if (op->sess_type =3D=3D RTE_CRYPTO_OP_WITH_SESSION) > > >> >> >> ec_mdata =3D > > rte_cryptodev_sym_session_get_user_data( > > >> >> >> op->sym- > > >>session); > > >> >> >> else if (op->sess_type =3D=3D RTE_CRYPTO_OP_SESSIONLESS && > > >> >> >> op->private_data_offset) > > >> >> >> - ec_mdata =3D (union rte_event_crypto_metadata *) > > >> >> >> + ec_mdata =3D (struct rte_event_crypto_metadata *) > > >> >> >> ((uint8_t *)op + op->private_data_offset); > > >> >> >> else > > >> >> >> return NULL; > > >> >> >> @@ -731,7 +731,7 @@ get_event_crypto_mdata(struct > > rte_crypto_op > > >> >> *op) > > >> >> >> uint16_t __rte_hot otx_crypto_adapter_enqueue(void *port, > > >> >> >> struct rte_crypto_op *op) { > > >> >> >> - union rte_event_crypto_metadata *ec_mdata; > > >> >> >> + struct rte_event_crypto_metadata *ec_mdata; > > >> >> >> struct cpt_instance *instance; > > >> >> >> struct cpt_request_info *req; > > >> >> >> struct rte_event *rsp_info; diff --git > > >> >> >> a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > > >> >> >> b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > > >> >> >> index 42100154cd..952d1352f4 100644 > > >> >> >> --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > > >> >> >> +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c > > >> >> >> @@ -453,7 +453,7 @@ otx2_ca_enqueue_req(const struct > > >> otx2_cpt_qp > > >> >> *qp, > > >> >> >> struct rte_crypto_op *op, > > >> >> >> uint64_t cpt_inst_w7) > > >> >> >> { > > >> >> >> - union rte_event_crypto_metadata *m_data; > > >> >> >> + struct rte_event_crypto_metadata *m_data; > > >> >> >> union cpt_inst_s inst; > > >> >> >> uint64_t lmt_status; > > >> >> >> > > >> >> >> @@ -468,7 +468,7 @@ otx2_ca_enqueue_req(const struct > > >> otx2_cpt_qp > > >> >> *qp, > > >> >> >> } > > >> >> >> } else if (op->sess_type =3D=3D RTE_CRYPTO_OP_SESSIONLESS > > && > > >> >> >> op->private_data_offset) { > > >> >> >> - m_data =3D (union rte_event_crypto_metadata *) > > >> >> >> + m_data =3D (struct rte_event_crypto_metadata *) > > >> >> >> ((uint8_t *)op + > > >> >> >> op->private_data_offset); > > >> >> >> } else { > > >> >> >> diff --git > > >> >> >> a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > > >> >> >> b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > > >> >> >> index ecf7eb9f56..458e8306d7 100644 > > >> >> >> --- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > > >> >> >> +++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h > > >> >> >> @@ -16,7 +16,7 @@ > > >> >> >> static inline uint16_t > > >> >> >> otx2_ca_enq(uintptr_t tag_op, const struct rte_event *ev) { > > >> >> >> - union rte_event_crypto_metadata *m_data; > > >> >> >> + struct rte_event_crypto_metadata *m_data; > > >> >> >> struct rte_crypto_op *crypto_op; > > >> >> >> struct rte_cryptodev *cdev; > > >> >> >> struct otx2_cpt_qp *qp; > > >> >> >> @@ -37,7 +37,7 @@ otx2_ca_enq(uintptr_t tag_op, const struct > > >> >> >> rte_event > > >> >> >> *ev) > > >> >> >> qp_id =3D m_data->request_info.queue_pair_id; > > >> >> >> } else if (crypto_op->sess_type =3D=3D > > RTE_CRYPTO_OP_SESSIONLESS > > >> >> && > > >> >> >> crypto_op->private_data_offset) { > > >> >> >> - m_data =3D (union rte_event_crypto_metadata *) > > >> >> >> + m_data =3D (struct rte_event_crypto_metadata *) > > >> >> >> ((uint8_t *)crypto_op + > > >> >> >> crypto_op->private_data_offset); > > >> >> >> cdev_id =3D m_data->request_info.cdev_id; diff --git > > >> >> >> a/lib/eventdev/rte_event_crypto_adapter.c > > >> >> >> b/lib/eventdev/rte_event_crypto_adapter.c > > >> >> >> index e1d38d383d..6977391ae9 100644 > > >> >> >> --- a/lib/eventdev/rte_event_crypto_adapter.c > > >> >> >> +++ b/lib/eventdev/rte_event_crypto_adapter.c > > >> >> >> @@ -333,7 +333,7 @@ eca_enq_to_cryptodev(struct > > >> >> >> rte_event_crypto_adapter *adapter, > > >> >> >> struct rte_event *ev, unsigned int cnt) { > > >> >> >> struct rte_event_crypto_adapter_stats *stats =3D &adapter- > > >> >> >> >crypto_stats; > > >> >> >> - union rte_event_crypto_metadata *m_data =3D NULL; > > >> >> >> + struct rte_event_crypto_metadata *m_data =3D NULL; > > >> >> >> struct crypto_queue_pair_info *qp_info =3D NULL; > > >> >> >> struct rte_crypto_op *crypto_op; > > >> >> >> unsigned int i, n; > > >> >> >> @@ -371,7 +371,7 @@ eca_enq_to_cryptodev(struct > > >> >> >> rte_event_crypto_adapter *adapter, > > >> >> >> len++; > > >> >> >> } else if (crypto_op->sess_type =3D=3D > > >> >> RTE_CRYPTO_OP_SESSIONLESS && > > >> >> >> crypto_op->private_data_offset) { > > >> >> >> - m_data =3D (union > > rte_event_crypto_metadata *) > > >> >> >> + m_data =3D (struct > > rte_event_crypto_metadata *) > > >> >> >> ((uint8_t *)crypto_op + > > >> >> >> crypto_op- > > >private_data_offset); > > >> >> >> cdev_id =3D m_data->request_info.cdev_id; > > @@ - > > >> >> >> 504,7 +504,7 @@ eca_ops_enqueue_burst(struct > > >> >> rte_event_crypto_adapter > > >> >> >> *adapter, > > >> >> >> struct rte_crypto_op **ops, uint16_t num) { > > >> >> >> struct rte_event_crypto_adapter_stats *stats =3D &adapter- > > >> >> >> >crypto_stats; > > >> >> >> - union rte_event_crypto_metadata *m_data =3D NULL; > > >> >> >> + struct rte_event_crypto_metadata *m_data =3D NULL; > > >> >> >> uint8_t event_dev_id =3D adapter->eventdev_id; > > >> >> >> uint8_t event_port_id =3D adapter->event_port_id; > > >> >> >> struct rte_event events[BATCH_SIZE]; @@ -523,7 +523,7 @@ > > >> >> >> eca_ops_enqueue_burst(struct rte_event_crypto_adapter > > *adapter, > > >> >> >> ops[i]->sym->session); > > >> >> >> } else if (ops[i]->sess_type =3D=3D > > >> RTE_CRYPTO_OP_SESSIONLESS && > > >> >> >> ops[i]->private_data_offset) { > > >> >> >> - m_data =3D (union > > rte_event_crypto_metadata *) > > >> >> >> + m_data =3D (struct > > rte_event_crypto_metadata *) > > >> >> >> ((uint8_t *)ops[i] + > > >> >> >> ops[i]->private_data_offset); > > >> >> >> } > > >> >> >> diff --git a/lib/eventdev/rte_event_crypto_adapter.h > > >> >> >> b/lib/eventdev/rte_event_crypto_adapter.h > > >> >> >> index f8c6cca87c..3c24d9d9df 100644 > > >> >> >> --- a/lib/eventdev/rte_event_crypto_adapter.h > > >> >> >> +++ b/lib/eventdev/rte_event_crypto_adapter.h > > >> >> >> @@ -200,11 +200,6 @@ enum rte_event_crypto_adapter_mode > { > > >> >> >> * provide event request information to the adapter. > > >> >> >> */ > > >> >> >> struct rte_event_crypto_request { > > >> >> >> - uint8_t resv[8]; > > >> >> >> - /**< Overlaps with first 8 bytes of struct rte_event > > >> >> >> - * that encode the response event information. Application > > >> >> >> - * is expected to fill in struct rte_event response_info. > > >> >> >> - */ > > >> >> >> uint16_t cdev_id; > > >> >> >> /**< cryptodev ID to be used */ > > >> >> >> uint16_t queue_pair_id; > > >> >> >> @@ -223,16 +218,16 @@ struct rte_event_crypto_request { > > >> >> >> * operation. If the transfer is done by SW, event response > > >> information > > >> >> >> * will be used by the adapter. > > >> >> >> */ > > >> >> >> -union rte_event_crypto_metadata { > > >> >> >> - struct rte_event_crypto_request request_info; > > >> >> >> - /**< Request information to be filled in by application > > >> >> >> - * for RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD mode. > > >> >> >> - */ > > >> >> >> +struct rte_event_crypto_metadata { > > >> >> >> struct rte_event response_info; > > >> >> >> /**< Response information to be filled in by application > > >> >> >> * for RTE_EVENT_CRYPTO_ADAPTER_OP_NEW and > > >> >> >> * RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD mode. > > >> >> >> */ > > >> >> >> + struct rte_event_crypto_request request_info; > > >> >> >> + /**< Request information to be filled in by application > > >> >> >> + * for RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD mode. > > >> >> >> + */ > > >> >> >> }; > > >> >> >> > > >> >> >> /** > > >> >> >> -- > > >> >> >> 2.25.1