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 721FFA0C56; Wed, 8 Sep 2021 09:42:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B7C84013F; Wed, 8 Sep 2021 09:42:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 969E94003C for ; Wed, 8 Sep 2021 09:42:40 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1882pV6X018346; Wed, 8 Sep 2021 00:42:38 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2108.outbound.protection.outlook.com [104.47.58.108]) by mx0b-0016f401.pphosted.com with ESMTP id 3axcmjafps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Sep 2021 00:42:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CtwAC7LkoJ1ir88XCGUxJUm0yiXYd6by6f1fHI3V+zrHdF0uc5ufzk3DlN+J5ssicMKwjMTrRXnkwDLcGXQGsuworL8rqy1xpw+I6ShqXZh584MP+lKPbsKt/NFZAlbqeLqjpHeb/QLZhW5/8Fex8x84GfE/h9j3ziwEEMYiJcySKET7bv8/aQhzHc/ZOegs95hpItyOJlf9C7t12HeumexiFmMOft2dk41uxHWxNN/ozJiqxhfQd3YBQcvX5ZDCYms+ldMbqHxmEBJuS/h8vdV8D2JzWibGK1N7eKPc03RLTYwEdh6Njm2u8E0B+4KUwJG32+lB4Gt4IootsFGLeg== 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=OWscGGFw5VUxkd0WGRaNpmAfvR6NlThzGhEIknBZOTM=; b=nU54tszgOs3+qP1wgX/Zk4vxoqeZOajtzQnfLn6fVFfr2yafanhggNCJpPMtQ2w2CcQ6XwIV4d8C7f65e8McKRd0xQiCxYBWN2Ony+XO97sQJ7lPahiXHYCcAhwRkCnvcM6ekFAmM9a53p6y4u8coet/Vy7vkDBg05qqcaqqfIKPT4DWu8pyDemuF+klqotBTg7itwAhhCjQWgZAf8Eh3DIf/hJm7lw9Q80d954ZgK0VLqOeHgalMKNWreVS3N69rXSCdXpq4x/EGsJdAHkmEkcsCGDgVmB9/dPeHDi+lTBhSmSY/l586xxRuy2u28stWVsCYxixD8AcBlG45WiHcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OWscGGFw5VUxkd0WGRaNpmAfvR6NlThzGhEIknBZOTM=; b=OEyqtsd1GkYnKqhZO63aoii1ZzJ75sstFcuItKSfNciZ0u2sh46mI8RmY1BkHZhH8hrAUwaRf6QeguoUjgNapdfdaeaNlTG10+WinoFBAhiqNpYG85IbA6BwG8xyx0+FU38HnrRGMBOF7XVHGuemI/gwu1UIJCMy6JoVGL1Hrl8= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by PH0PR18MB4717.namprd18.prod.outlook.com (2603:10b6:510:c8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 07:42:36 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::786e:61d7:67f1:ab27]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::786e:61d7:67f1:ab27%6]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 07:42:36 +0000 From: Shijith Thotton To: "Gujjar, Abhinandan S" , "dev@dpdk.org" CC: Jerin Jacob Kollanukkaran , Anoob Joseph , Pavan Nikhilesh Bhagavatula , Akhil Goyal , Ray Kinsella , Ankur Dwivedi Thread-Topic: [PATCH v3] eventdev: update crypto adapter metadata structures Thread-Index: AQHXnj3SUZL5IpF390m1/sqz7mt1lKuYT0kAgAAY9fCAAHdwAIAA6dAQ Date: Wed, 8 Sep 2021 07:42:35 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fffcb212-9326-4310-b0e9-08d9729c39f8 x-ms-traffictypediagnostic: PH0PR18MB4717: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: 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: NsettHcpm5MOFbNMXdnd340qXBWO7anHvLoe8ffeSmMp+k6zZd+QOa7pBakEkFRlvad4aN1BhRtMGPrVvXIYkwyMEtYfVPuXvzhnwSYEjSmLqJaxURpf1WmHylMZXrkEoXGYaL6ANA/iJsqoOzm/CqvmlFpAj+E3Tfwt/OUN7704KT2YtdVt1c+dMVfw6JfRhIhJp8uk0lPW770XpNwwx/IigTZ11cNytHxMiNHoYX/lCvYd1VKXVnVKzbqDYyYHLY2aV7zDHjnETILJvNJ2IguQxXAK3hPQA8hp7TVMLz1dZqN3Qt9uClvc5E6l+d/xAt6RTi6TQvUXY+9T2ASxhGrR36svUQvrKWfqm+2Vl9VURY7pfTCQvumaadhH+WftZdbyFRaBGEJ32z55Cwm1gJUsOTDEsZkJIMrTX/Ft0c8WwZOe9e05/PJHg9ss6PCoAPzd+JPBkk5zCUfFEGBAZ2Fpae+PzGwrx0NGKXSozxFTtjFq0H1bFsbSUEJxkog/C7Rpl9dj3vkMNCBdYhqqy0f3r1zao+5rqvxfL38G3FrVyW0oLxasD6vFN+kgt8rh+mqMhDpCIM5Tp7KP4lA+H0Y3Yr29Xl/sW11iVLg4jwghsN/4OO8JmPRCzYU4QrDg1p2dI3Iu8ri1TMqa+m6x/Bqo2PIiQYkFlPAS7ZwjkjHbUChvC88Z8fslyLLVS+N3ZkKZHbZFKnNG+Q25WQt4Fw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4425.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38100700002)(66476007)(2906002)(64756008)(66556008)(9686003)(66446008)(122000001)(55016002)(83380400001)(71200400001)(508600001)(26005)(6506007)(66946007)(76116006)(33656002)(30864003)(86362001)(107886003)(7696005)(186003)(15650500001)(8676002)(5660300002)(8936002)(54906003)(110136005)(4326008)(38070700005)(316002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tlUJTwLryV6ZuQOST2tZzMyK7qkHS46tO2N2DMORaYkPzuBanuoE2QL2k/TQ?= =?us-ascii?Q?uK64/9vn2roV0lWRMp7wzy4rre7l72mnLjYk0vuqdcdzskGfMUxHHfHANO3K?= =?us-ascii?Q?ZBul14Aj6wTvQhHCdRjtFecUb1rOkMk9Tmu+fwVdaIJiPoRhS48xrxRMQTVu?= =?us-ascii?Q?v/H2tXKxfSAehMqrncazJ88tlB18Y1Z8sp7sbTypMudgCxt6tOffb94jce1C?= =?us-ascii?Q?YHwILbrK644z0dMW5dHA5G5t88jDttzdvc2x/FwtxYz+gu0oB4zVfPDlqG4O?= =?us-ascii?Q?XPNho5jFsZ3p5oNgkzhGswyvoLZC9IohQ6TiP0O5zMKCc8QYQNaKXxes2MMm?= =?us-ascii?Q?HOPob4JOOTnRp2FsUP8N/6IsupS2hq3LglVJksGsH7lrgXLKGHiKvgNcqfZN?= =?us-ascii?Q?LFijaveh6TUtyqNxslNQacdBWqv+5g0zwuiyeBAE3U1b/M9qlZBmP1noCe6K?= =?us-ascii?Q?KYJui57axe5YSG3qxTWbAYIIqDBXQnkvQ0mcKqsM7mJ3hsfHg2+exN9rZn0r?= =?us-ascii?Q?94/dHLYmIbW48yu2BIxz0sXaJq2HZIYsY9+DBB1S1+Ohx9qc6JXF0Y0GflBz?= =?us-ascii?Q?ZKxNK8ANR62PH96Z8KJ88lQ5OuflLrHHxpjPnUW+wDzXCkudlYSxaffZrhGF?= =?us-ascii?Q?Zu4h4VqjlfoK9OsbMKJBJG2vQ3kQYAApd1FSgqzc9LibwZ7qgEEl6neNvl2K?= =?us-ascii?Q?Z/tuLry7Z7Y2TiRrRb7qmrZO4pCNE9bqd5pLtrrvRNwZb8+WtDa9VFjYx+8M?= =?us-ascii?Q?oChkTSx+zoDAfsXQkdn14RtiVdlV4JXrTYDGzuOr6+f9iqrq5xx+wwgVmViJ?= =?us-ascii?Q?k+nPrj7Bkx9uCzLA7ik3JRH6+nJr8tfmAn4qkgHRcGke2B4yZW45GorJsuTQ?= =?us-ascii?Q?7HO8+W6y8Ig1kBSf5UxSEz35D8WKhrRNVfJpLDiNMAIGleZiP/yOhNRFxVq7?= =?us-ascii?Q?Iq/8ZT5xIjT+tT0HeVejgapjOJm1VG9YmiW7jyK6mcEviyryUMNIRNOoqkBP?= =?us-ascii?Q?4C23boDzym3CJ98w86srIrLtkKE3fMgvluqTb6fkmRdYbX1RSpEx9Xx4MmQ9?= =?us-ascii?Q?tI3c677I4GJ3AUsFms+oIOfMEnmXxpnKsS7WHhZmTJu5Bn+k7j/KYktshFbs?= =?us-ascii?Q?DjraSKU6mk7r86uzgqBf1JyoAdUCDUPyxzfMG1kdzKHR05bxBXYUWtQAB+D7?= =?us-ascii?Q?AzEhBFdKpJAgQpTpvPK8IUPUbw5s6veEiIPLvFHUgkCiXCcc5hgqZbgDI3vi?= =?us-ascii?Q?jMg0aVqMVTP8T5E2u5Quz6nnubMTo9g+3l/v1pLZrtiN3n7HYQiqE/8VXbqR?= =?us-ascii?Q?gbQ=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4425.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fffcb212-9326-4310-b0e9-08d9729c39f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 07:42:35.9882 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yWMnZp+xV+aFcVd/hpvxxwPXCSNWIxG54Otv7znZNJtVYQQ3DWksSkU9ieApeKXuezsUeSvCCTD1MsOO+WgOmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4717 X-Proofpoint-GUID: I4JIC-N1AKNIX-gjGgGyz4eWr-pc-EVV X-Proofpoint-ORIG-GUID: I4JIC-N1AKNIX-gjGgGyz4eWr-pc-EVV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-08_02,2021-09-07_02,2020-04-07_01 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" >> >> >> 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 befo= re. >> >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 o= f 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 th= e >response_info. >OR You have a better way? > =20 I missed the second word of event structure. It adds an extra 8 bytes, whic= h is not required. Let me know, what you think of below change to metadata structure. struct rte_event_crypto_metadata { uint64_t response_info; // 8 bytes 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. >> >> >> >> >> 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`` usin= g >> >> 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 re= turn >> >> 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 informat= ion >> >> * 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