From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 5016BA0C47;
	Tue,  7 Sep 2021 20:01:58 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CAC22410FC;
	Tue,  7 Sep 2021 20:01:57 +0200 (CEST)
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by mails.dpdk.org (Postfix) with ESMTP id 6A5D0410EF
 for <dev@dpdk.org>; Tue,  7 Sep 2021 19:30:47 +0200 (CEST)
X-IronPort-AV: E=McAfee;i="6200,9189,10100"; a="200477845"
X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="200477845"
Received: from fmsmga007.fm.intel.com ([10.253.24.52])
 by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 07 Sep 2021 10:30:45 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="464917575"
Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16])
 by fmsmga007.fm.intel.com with ESMTP; 07 Sep 2021 10:30:44 -0700
Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by
 ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2242.12; Tue, 7 Sep 2021 10:30:43 -0700
Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) 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; Tue, 7 Sep 2021 10:30:43 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Tue, 7 Sep 2021 10:30:43 -0700
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170)
 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.10; Tue, 7 Sep 2021 10:30:43 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Mhqs4lj4bbqLD6xiktRXPiuT131sa0SRBiWyciMuLZvPnovifKnDZJI5Y00earbAOzOXwpbt+YJI9yHIsmPb7Pt6kOcvN+3fHIyzdIKxiCrsFo3A3rm2Fxv4J4JaHmhpdLXjnEBUbXVZz1UpyYQS3Jjn5niy806Q1gs72mJa6qxp9aaOjqKWHWpKZVvvP//w1OjRC9Mf8R52EvRjeOb0JnJ91yst802xMWV8BuYWN5lC9a4iDYUuQGh3iCglTPbn+0R1k9b9dIII1ztGjLFN5d4OucZQSdtr4T8WSyHqHUo1T4yQNgBnfbymYB5lBzfLhfS3/JsB10fIww4P1k/35w==
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=m6FmStMjTlqh0QcvKVmwdxf7eX8LQ8KsolBfEwsuRDc=;
 b=QNM7UycrIgv9Gx5owqicBUwmkcyZcIbSqpOfUBeIc34jD23jb1cpdyQRErqqMhfkDw5M/Tyl/u4acfpwCMoI17S0i/5CNpVhXRO0gfVoDXWXVZNXm4khSNQOqYhbD6H1vlyqKbNkxltNCjZaHwPHBbH5WTqlVq6bRhvBIk6E9Q9XCAMcO1YnrymDqJCGeyxI6pSyrDd9nvBvtXwGHWRny4FlVmi3MKNHAinHk7wBHWnSynC9lZMzyZ14a3g2EUbLsohbt4+QU2jl1ragWqT7v0QOWfhAjueALRxFHHLYDGUCRsimX/iNBM/VmBHjwzA9bSFeGBU0b4H2diFfKcTJnA==
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=m6FmStMjTlqh0QcvKVmwdxf7eX8LQ8KsolBfEwsuRDc=;
 b=I8I7Gy7ubPa3bxPEvidQtRkYvuG7ZaS+n8q6S7SsEXZVcGZnInoGjW3smkR2AXHxhP3pMa+H4OjqSwIKXEqNBxtMo3S+zbOsh/fGii/SWEASloGeUFooX5n32FEfoyepapcBI1GABOsuScEayjCw47xzsx5JGKXxPJt1TZj3ivI=
Received: from PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13)
 by PH0PR11MB4903.namprd11.prod.outlook.com (2603:10b6:510:36::6) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 7 Sep
 2021 17:30:42 +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.4500.014; Tue, 7 Sep 2021
 17:30:42 +0000
From: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>
To: Shijith Thotton <sthotton@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: Jerin Jacob Kollanukkaran <jerinj@marvell.com>, Anoob Joseph
 <anoobj@marvell.com>, Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>, 
 Akhil Goyal <gakhil@marvell.com>, Ray Kinsella <mdr@ashroe.eu>, Ankur Dwivedi
 <adwivedi@marvell.com>
Thread-Topic: [PATCH v3] eventdev: update crypto adapter metadata structures
Thread-Index: AQHXnj3WjnQgyKZ1dU+J5G+CJPvld6uYTrEggAAde4CAAHAWEA==
Date: Tue, 7 Sep 2021 17:30:42 +0000
Message-ID: <PH0PR11MB482432FB7708C24016D38D7EE8D39@PH0PR11MB4824.namprd11.prod.outlook.com>
References: <a58110ca3d35bc1bbd78f0f1887d467a4be11b40.1630353395.git.sthotton@marvell.com>
 <f7cd7ff7559b56ff6496e54bf63c94ce15232b48.1630396445.git.sthotton@marvell.com>
 <PH0PR11MB48243163607D7B41E816B424E8D39@PH0PR11MB4824.namprd11.prod.outlook.com>
 <PH0PR18MB442523E8978778F0242E4992D9D39@PH0PR18MB4425.namprd18.prod.outlook.com>
In-Reply-To: <PH0PR18MB442523E8978778F0242E4992D9D39@PH0PR18MB4425.namprd18.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
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: d6d95fb1-5093-435c-f519-08d9722537df
x-ms-traffictypediagnostic: PH0PR11MB4903:
x-microsoft-antispam-prvs: <PH0PR11MB4903339EA50592E5F18E50CDE8D39@PH0PR11MB4903.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Av6cazx7zGbUZGqMcVuMupyQmyIuVFKW76fIz60+6JwQ3Wy5QqB50CaElBiR4ofyepwsS5WQ2wAApjHMYfRdobx1dYjXucRW4z/WLd5etloSIM40rMgJXgUN0mjzf7Fj4gm7ibE7tk3jRNb8dPig1wcoRpfzh8U/ZXXjo28OYjSuOyc3LIrnKvP7rYInbqtOoOJo2UY8YGOR4FeyBy9+S+kkV63Jwjyzlj/gVKmSg/9Ls1X8wu7qqSofkiJ9zhPsul+RjPuUOG6rHNjrSUD4pLk9w4XEyxXxzWlzi2a+clT2233wZgqf3aVJU634/ltmQSb4yqE4o6vQKYlq+Mxk1c9wuMYl/UoF6TI8oymGbVkLAzn47sE5e7pDSpkiUJHYL2CvR+JHQicoVlEGQ/b3fv8DMWvd56Ks4XjD1xZkX5m3JZ94ZJ5LP/u9X/KytmN6IaRsqwWkYwZpjThxX87KiWiB7f4dMgn6J1cl3u36NeQonM/XQbGlm51Fu6KmnHkpoogXiKNcTiiJVSWd1GYrjpDQ5GK7TLfZplnhEV+8xabNNXdqBMOATP+xtnBz7vgcbNyt5A3iKqYeuJChAcTgeifisIuzwLjIDnIyp5pxGhASkJb9+ClUfBqifmnbeWZsw1sDSB0xGicYNbpioyysFzh2ZAB9rs//eyHP/UhSqCfWAOiQ+w4xxSEAFUNBFQvTf1xwUWjanhSydIYvCfzzhA==
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)(346002)(136003)(39860400002)(396003)(376002)(316002)(55016002)(30864003)(38070700005)(54906003)(8936002)(110136005)(6506007)(71200400001)(4326008)(9686003)(53546011)(86362001)(66556008)(66476007)(15650500001)(76116006)(38100700002)(478600001)(122000001)(5660300002)(52536014)(66446008)(33656002)(64756008)(66946007)(7696005)(26005)(8676002)(186003)(83380400001)(2906002);
 DIR:OUT; SFP:1102; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EQbs5SUvVx5jj3/slp8zpRl7pIO3dM4c9PG9MPWYuhA0Y/gzz1EbfQdWYDRL?=
 =?us-ascii?Q?xyu84HGQugEzs1ucgBU3rNi63zBOqO3PAjG+2qJNBqw1qcHlGjQDK8TzYVii?=
 =?us-ascii?Q?/hLmxJa+oOGnQYxBubkW0rwwpB/zlks7pgOfN87UY0tdLTOvb3T7/Y9kXwu9?=
 =?us-ascii?Q?NkxS+JXJFORUUyrhpCHdsB4naO2sSDxRYBaMuonTmef0EH/+nQq0puzHVPri?=
 =?us-ascii?Q?BH3O/2DyfX6i/KrPKTRkdH3BTvJ+lQZEX/fTiEoKLro4MbbO0TzkXWghNrGV?=
 =?us-ascii?Q?ZRA+/SYP9poQUtaJ0ens00oN+klrODkOL1wQBzDqSD+Mehht8bftK74OnbfL?=
 =?us-ascii?Q?NgPln1uh6heTImy0u4rKcmeYPRmcpB1DX/D1y8K0FMPKpxTtOqW5t6lkeWxM?=
 =?us-ascii?Q?SvIzl/F3QEPQsqWvj7EUzh3sDFvYS0RmEWgi/9eG354gcsevAhnYeNVHkAYd?=
 =?us-ascii?Q?pV8utF5edO9SR6GgjF3fARGm0jSanOtyT8JX6NwDsBs0GdZosUKjVrhBPrqS?=
 =?us-ascii?Q?KP0jySKrTWMs07bSiruEtLcp9no6Zvr9sqHrS3VO+buD6EB7+Z9hO97rDSjU?=
 =?us-ascii?Q?WWLwFr0LaJabji3LywR3DyS5GDAK9SaNhDFeMW8CT6xWmnLx32x6Mk6iaLPn?=
 =?us-ascii?Q?AlL5X6SYJxIHcrH+KTqYyQQPFuU/sFjmeP2xIz6+NEbtHW53Y7n0meomILo1?=
 =?us-ascii?Q?wuv9xq+ysuXZowObnTwCTj1eH3n8d6erLRlDJDkeZtUM3Te/7zWidbRPGGwi?=
 =?us-ascii?Q?FkigwYkfa7OrxB4Zb6jDeVsK0TyZOvRBuBT/rQCC2hxGX7TjLyQZIH+oD/eX?=
 =?us-ascii?Q?QffVT5njSG+AXDei9XUtt5S+68FgiJFeBoy0l+IuuHwJ6HeEg0GjgzOX7UN5?=
 =?us-ascii?Q?7YdMZhwdi9nNERWZ8/QzYeb47FtBtoUPQhJ+bx9VoDz2jaRcZo2ztYpl5uKf?=
 =?us-ascii?Q?sd8HVDE3owzBDanW8cCHUtKnsnJ3A/qX14prmAnkNRRcoAZsF7bRGC6PDcNm?=
 =?us-ascii?Q?Urq3lFgjDioynh5or7KpCjiNtJan5PNScFmXYxDMHStZuvvDfapJd2auHH0r?=
 =?us-ascii?Q?jiLx1SuoqD8Ycfv9j5B/t92GRB3sux0kpfmgb7HSxB+OqCFz/YcKEXaKJrir?=
 =?us-ascii?Q?Iq1qTQsSL0F3rKRTZBfgGNgPTEMAYl2LS6b0UV9UasJz20h2LLZ4bsBM1xwu?=
 =?us-ascii?Q?LU3Y+ngYHsinjuvrwc3+LT9S9cYbsJItoaaplCFcYbxOHZ6Kb4JWw3W0DfDy?=
 =?us-ascii?Q?J5wnyQDRde/ziId+osgWDpYs5fp4xKgmkhPXTwXGXbwYS17eKcB568l56joB?=
 =?us-ascii?Q?UVHvlM+2Vd+iecO0Gfs0mx2m?=
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: d6d95fb1-5093-435c-f519-08d9722537df
X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2021 17:30:42.5689 (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: 0Z+WxO1bhbLf0lwjHj4Y2kTia7bt+3jkszLjzi9SOCu3ukrh7ImKC4Sl+pEmt9yr/DDGYAE/Rehbfp51yZYLNNka5XTr5fBM8lfJ71BwbXw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4903
X-OriginatorOrg: intel.com
X-Mailman-Approved-At: Tue, 07 Sep 2021 20:01:56 +0200
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hi Shijith,

> -----Original Message-----
> From: Shijith Thotton <sthotton@marvell.com>
> Sent: Tuesday, September 7, 2021 4:07 PM
> To: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Anoob Joseph
> <anoobj@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Ray
> Kinsella <mdr@ashroe.eu>; Ankur Dwivedi <adwivedi@marvell.com>
> Subject: RE: [PATCH v3] eventdev: update crypto adapter metadata
> structures
>=20
> Hi Abhinandan,
>=20
> >> 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 befor=
e.
> >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?
> >
>=20
> I have seen this issue with crypto adapter autotest (#n215).
>=20
> Example:
> rte_memcpy(&m_data.response_info, &response_info,
> sizeof(response_info)); rte_memcpy(&m_data.request_info,
> &request_info, sizeof(request_info));
>=20
> 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 req=
uirement.
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?

>=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 <sthotton@marvell.com>
> >> Acked-by: Anoob Joseph <anoobj@marvell.com>
> >> ---
> >> 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 ret=
urn
> >>    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 informati=
on
> >>   * 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