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 BC5E7A0C41; Tue, 7 Sep 2021 12:37:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9986D410ED; Tue, 7 Sep 2021 12:37:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C006E410EC for ; Tue, 7 Sep 2021 12:37:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1879YAsg015949; Tue, 7 Sep 2021 03:37:21 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2170.outbound.protection.outlook.com [104.47.56.170]) by mx0a-0016f401.pphosted.com with ESMTP id 3ax5jjg6ca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Sep 2021 03:37:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WpD+rvljhyQRx5W7TvzTQ7OtR64ILeuyGgYR5gMRqwBcTgoB64Ej5xvCfhgmBAtDJX2eqzygSPD4D7WT1CEjCLZ2/moUKJ3eW/dfAv+UdCoM4hVlc8l1Q6KXKsX21v3xmrssmpOyHBALoTk9+Ow5s182HjxPie/CRNLgYSR2Ayxoa3irn17EMXaj6LL3rHibYr9vxN2VZSnsnT17Utd7p1EIv1BYl1gY+hEmJI+TO4sDOTmMp6rR9JcjH8ddckk9ez4qGH/V5RSqd3TEEys33XcitN9pI0IXLE2ouVRXsmkaJ3OWznE66Lza3JK+geq4c/cCkt4KBYDPbVePFRttBQ== 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=VUGzv5Bytp4VnDCBBSCWjdVVja9WycaLtyUfvjNZbZo=; b=VwjlIiq0pJXWuri8kaz/5hExEqDK2DzUUwkd5+7xEygczUbTLKNlWZu1ci/jLdhV8EtmSJKjG8FiIgx1fE0mA4WiX1pDmehoCOO6Fqd/t2QuMP6X/OeRuiGHesRiZOXXciVfTOQlu78IxnvQ7nTqT3/sCf8iMMvXQIY9qUgbfsgkSDEfGBVbVDYBIq2euFlbDgSnaGTVOD/zPfw2JKKsVgUWp5fYpHODFEFZzw+VC/J00zdu0ps6xwgMT3fAcRHCf4J2a5UF3Ui24OzyQeI+msNmWeEb84d3Ex6SeyspBLtuvVK8jfzilm6mYmZVCqjmLMEE2/xJVsqER1syLw0iHQ== 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=VUGzv5Bytp4VnDCBBSCWjdVVja9WycaLtyUfvjNZbZo=; b=WYF4+UdGss/sjTkeMMywpbNZwB0OpBS4wGWXYimT3gYe/P1ZNuuTheOMk/LFcxkinyEFwqff3t3/xZgD69AYFsugTvELcWnyAbJc5b42G5O+jDnQTt0bUDl9naRR89WH0dx1FTj4lcFzGJsrLAYLJQ1BeAREGP/HiRaXYQujF+A= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by PH0PR18MB4671.namprd18.prod.outlook.com (2603:10b6:510:c8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Tue, 7 Sep 2021 10:37:17 +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; Tue, 7 Sep 2021 10:37:17 +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/sqz7mt1lKuYT0kAgAAY9fA= Date: Tue, 7 Sep 2021 10:37:17 +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: 5f7d8302-d9e2-4175-3c16-08d971eb76ef x-ms-traffictypediagnostic: PH0PR18MB4671: 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: Fr7z2myhHrnc7VpT0bv5oQrJHc0erh2GbNNDShDVBLBOtO6AJCtbDoM28QmSkkJHLgUr3oWsEsOZafTQ6ipva5gTLv9zNvhx5szkyG7GkVXc1yhs/f6xZWpqKvJjYhQ3uICXXnTWZAZGZcpud4yaro4UIXDDCyjlc3i628BeM5KT18gmoM7o3cfEVqfw8GGID+f5AQnX82IvHM0fkdEqAgym1vkdHi1LsxidDzNu9r2It3ZzEqVY4kPRBy8eFdeDaIsgtj9PLeH9JH4hLedTmDe9OYHBhdL0VPUngtMzBaWnt3TErzArXrxrCBhbyCJYZPaMDERnqRNacaCesdBZUPQnOKG7eofmPsLvNYApK9HNiJe1IhJV0jSf50WoEClldYrTyi+2E04CWz8eaQdhTWJCDSibTQzHUQcRj9qhFK1uBNxOspWhH+IrYQ4/aClDUkpB8BZpiCyuxQH3Wzy+KnZ7Ibi3+QiCFiNndreLRB92IudIPXqAYoiLVHd+1lbSNUYCjliKyZ9AbAdWBx0SMiy7PUFmyyIipNhKpjCTdH6Wt6GoqRimPBmbmlvs7GMICAjTlXapy69KSCV1RgRskuhCW5VjVOjyOKA8bc/Lz/6fhDuIOpHkpfKThfn1Wk+UQn+mnHWLqPQ1I9SscHwgYPDrEe5c27JWHBjG80UUUIqUuNKzK7e9Kct+hJYOeq4+ 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)(376002)(136003)(366004)(396003)(346002)(39860400002)(6506007)(8676002)(316002)(5660300002)(83380400001)(7696005)(8936002)(33656002)(15650500001)(55016002)(26005)(86362001)(2906002)(38100700002)(71200400001)(122000001)(30864003)(52536014)(4326008)(9686003)(64756008)(66446008)(186003)(107886003)(66556008)(478600001)(54906003)(66476007)(38070700005)(76116006)(66946007)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nL2lRoN3R9/Hgwlw9V5KC6ksIfE+OlqrcwSVSiseKF5p0sMR/T99iJW2Bpgk?= =?us-ascii?Q?MGRNvXTtIljx7IG0hDIlyM204XB9Hlj76N3pRmiAfr3Eqm3e+jdwnVYm9AMd?= =?us-ascii?Q?3bwa7otPQZf7Vh+jQqrHNAJNgDeMxfC92hRy6Yv6tdq69qTwPAmgoBtDdGyq?= =?us-ascii?Q?hrI3oQIzHdwvSjQLLGtllIq/i4Yt+dH7SpZJyGhkZEYYmsbRT65GMAXt3U7a?= =?us-ascii?Q?IPkSm01heBvfOOU9CaLYoteUVHW59il8XJJ3QYnVTBp0J3mWYSaXtpz/kumL?= =?us-ascii?Q?JrYDDYnId03DsAbc6Kq8SVjmzOu/9U6EN5gwQkNHnS2q0el1OFAt3Mb6GVTa?= =?us-ascii?Q?BrMRHeM2fFkh/m6uc368jlAooMnCkXMCkgsbl/a6LH+JcE38dIkYG54Afw3K?= =?us-ascii?Q?WPYiVNMul25WNVxArKCkMsOefMHg81KuiC8+csnVtDUIMOfxW4D5k3NheYbx?= =?us-ascii?Q?pgs3pRD+iA9+dqCX7f3L/Opq8jsBCWr6FS4ggVrZFEeGA2dxFzVhl0I2eh0f?= =?us-ascii?Q?dSzj9Nbed1vH4e7xYD5voaPx47dCkZ5WDE7boLy0J9A3GuaMeMqn//f4314+?= =?us-ascii?Q?tArJjGjETLN1wyf7i+tetNq9HlHkMHbPlvk6NcUWU04DybyG+qDLepxrWrVy?= =?us-ascii?Q?NYuvuF7LH/78GFDzqXXCoH7waP/eDuysoK377vTK8vy1YpmtHMbflAAhCoVV?= =?us-ascii?Q?ZB2QJMXuh7moVscpuqnfcJDc/v7VRxQlYZnFnc7DWqx9XlYrm5MdBb/WtDLO?= =?us-ascii?Q?9CsJqsN11IEfZ9l0Hi4+Ji2wzztNyv4KHTdF2YqWmaCwLwIfY73cEECCXcFx?= =?us-ascii?Q?rfUGb0VnzcdJPRbITyRGvFPxcphuJXEgpEyBMobAoWuFzd230GKiGknAPiS6?= =?us-ascii?Q?2XnCXl8hyloyuFGYcUswyHXRHKQ/MFLhy7lszpez2vRGRDqS2oNFliIhQSBp?= =?us-ascii?Q?uBB7BUdRPhjctXb1OBKBmuUj+Yv5nfWsCVw/sFFWb7kdc6RrcK+elMlP4vJ0?= =?us-ascii?Q?MBlH2O8RxtXLMOam65UQQdMzwPKUhwOgOZjxxIvHhIlIxAuX6W+ItO1pL+LU?= =?us-ascii?Q?qnC1+Clnkldii8qXGMXzxtOYoj+UuQuvtHW5DGDpADDHt5Wp8/BwtekKHY9b?= =?us-ascii?Q?xNC/d9vgEp7HdvAlF6haeBxjzvzY6+OGpAulh0387hRw9yykEKlXnwXKpx+A?= =?us-ascii?Q?+jjU5ToJgNqfyeEJBJ4L2HZV9tR8MsOLc2TYTc6gzpoT3OnJgKBJwrvY0DUO?= =?us-ascii?Q?Ewy7dpOp0itEsQd1iEk0HeSg0b2T3GUzCdgCNE47zsI6iDMRvMwSF880QLs2?= =?us-ascii?Q?KAc=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: 5f7d8302-d9e2-4175-3c16-08d971eb76ef X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2021 10:37:17.5114 (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: VHikjxcWUu4LP66NiA/hZhNjndNCOt7PZkNcmimPG2raEVPTh+kymfgX8/QBbVzGihUqWglcUHuxYS0c4ECjmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4671 X-Proofpoint-GUID: GO0ue_0oopfoGsJIV6T-L6hhablpYLC7 X-Proofpoint-ORIG-GUID: GO0ue_0oopfoGsJIV6T-L6hhablpYLC7 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-07_03,2021-09-07_01,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" Hi Abhinandan, >> 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 solve= s 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 explai= n? > 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 pa= tch. >> >> 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 retur= n >> 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