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 554D7A0C45; Tue, 14 Sep 2021 06:36:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7C764068F; Tue, 14 Sep 2021 06:36:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id F2B9140151 for ; Tue, 14 Sep 2021 06:36:48 +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 18DNlcQt006383; Mon, 13 Sep 2021 21:36:46 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by mx0b-0016f401.pphosted.com with ESMTP id 3b2380ufu7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 21:36:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U9FfujmIX5FDaw7bknUqruD48PBSee0VAYvFDo+TbnIYaB8PN7DSroBBcvnbbnZOP4EympnoH5eTsfBrZwlHpDzmSwHzdFuz+YOI3MzcGCtDWbZ+bNxH98PGoROO92aZgCHY6kBNhrvOOAzi452ql4ysIhXirOXPkpKEKMFpG9nBDTqHUWPK2hX/uW5V3C6TUo5y1Bb/nRq5iR3K8eDYgy0dtVOAAmMaI0QWMpjJuhnpsQ1UpynRpYH5Mth2jGDVdC+yBdd+oCgX/O5rTP+YukzD/BDXIECtF1tnCuA91hQfDIQ+CQxZC74QXaWJ0nzRJGWgsNLSYxSxsT7VyLWbwg== 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=LMk/uUswrZp3VX79d7KhKkvKvLKRhTqLzh63m+FVboE=; b=ZUCU/Ze7pJ4blOjbEBhPLjZde5mvyudXKWDlZQjph73ahIvfTq7ov0JXsGIHcw+eZ4tAiOWXvqTUZjVvKB3c91ChkSHP+tKEkk2I+UzWIsxa8kDlEqIwOFYtFyrvRRN3zz6oamrMyTWlsoSDGS+SideUXisrCvWV7o2vRzMSSqsRPKv0C2un2pb7/Y8S9xfRnMO8pB8UReatd9Me9IsFdcDa3rvufgzoV3PuNaixomf6DOZtqmj+FWWL04p8opGTCGzGN5ia/GGTWE27Ab75pntXLQxUyw79j/gKU78xIrrCIODJ7NN2d35t/+eF8MfzutgaGtrI6ERunO2d55MV8A== 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=LMk/uUswrZp3VX79d7KhKkvKvLKRhTqLzh63m+FVboE=; b=Iru1SgmCst9u/bTGlSBDobA9E56jn+hUQqz4m2JtJ8YhNKpqGHPfug6HjngoxkRKU4ocsIpiYC8XTQLgeI+ur5KZirSMDRDNO65IOc34j0jzxMNRXld84gHM82jj9fSwWSq5sMEYrWZ2EJm2UJpeuA66l8g7dSxAb5aieFZnwGs= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by PH0PR18MB4781.namprd18.prod.outlook.com (2603:10b6:510:ca::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 14 Sep 2021 04:36:42 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::786e:61d7:67f1:ab27]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::786e:61d7:67f1:ab27%7]) with mapi id 15.20.4523.014; Tue, 14 Sep 2021 04:36:42 +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/sqz7mt1lKuYT0kAgAAY9fCAAHdwAIAA6dAQgAAHXICACTRAkA== Date: Tue, 14 Sep 2021 04:36:42 +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: fe9eb049-04f1-4531-3d28-08d977394068 x-ms-traffictypediagnostic: PH0PR18MB4781: 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: RGWDUt6Rl5b7O5kKWay71R2wSsJrCtJj0F3sKtObPYf1aYajkpU+FaJc8pH1UQ3II9hPNlld745yadz3nXmUQztXREZvERh2g+mkf/DDpQyrXeUV1URV3L2evJr9Ut1xo/mSerSCkOe16hysUboCKV5LRJl1+xAobnZ34NdpUtvacAYhK0vWENnVOowbD+5U0a9RK2/s+VEmi9zdeUJeBzcQ/XM0AzaeDEcJ+JFbJ0FN2XKGz06a00Tt83UgGNtr9iu+rkIV2fRrkXK4hLqDWnss7ErIBTuAZaTZXo47bH3i2jq3PVZpA5Tx1FvTlLSMfKmP+crYQBV/ce2uYFRlGrXffE7UnXYttFWH5SFXCOzeIj/8Pvgf6ZQk+aT1WnhRQ8vZ7F6It2HjHvi/3t5KwMKeLRusKc9jChO1ZbDguVoq3hK0UrLnc+K949T6lsQXkKCE5CdWwR1rNBh5ZqC3V4JVvn4cJD/9eahvkYnusHUBDPfR/VL84WxJObQ9pX2G4OLYdpDc8e23RgollRvipFszzZhJ0/mQD/Lm258CFuHijmiNfsEKIOEK9SYz2E3r34s6Q/8/e9w8QIKx8Oa8ejIIbKp0XNoGfYtHLo4sudmYfV5L1PpaJvJTbsNHvo25mUIHb8HvE1Qe12LUaVBfagZBhzgtkaImndzP0LNx12ie8Vu7V7Zcl0Jc7YJGkj6e6uVZVV3ftMT33+yVBjcBXw== 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)(136003)(396003)(376002)(346002)(39860400002)(366004)(83380400001)(6506007)(38070700005)(9686003)(38100700002)(186003)(55236004)(7696005)(5660300002)(8676002)(30864003)(64756008)(66556008)(66446008)(55016002)(54906003)(110136005)(122000001)(478600001)(8936002)(107886003)(2906002)(71200400001)(26005)(66476007)(86362001)(316002)(52536014)(66946007)(76116006)(33656002)(4326008)(15650500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Eoce59RLyHPnbN2QMomxP42MBtLdbzVeGCBM5OXiCHgMpvo0dk6CI0PY8AwF?= =?us-ascii?Q?a8uJyBGfS8a3L3+5TZPSX6HHRXzZ4foioHbbcCgp6ytWvE1UfUpMw20xt5UR?= =?us-ascii?Q?gMEYPesCwN2eix+xQuw2JuvPMbgIL3d/QzinOEjW2Edn8yvkN2/2ZuqJjfeU?= =?us-ascii?Q?rq3pg7pOQSvq84NBKyDf4Q5Y7tUlj7Mynx++1CqFGKPnN6gzkEWowXXyVxGa?= =?us-ascii?Q?mNlHMIllHEBwC1fTp4lIU63cGRUXj3+Z1TiW/iDfQHDTOATAbNjvrCQtAseJ?= =?us-ascii?Q?WqjfldysOBoIJVARowdauv91EZMgy2hauEWbDzaJ1YvKZXZPZgorsRASQl+p?= =?us-ascii?Q?9qD74N5BiiRnmR5RNeOZKDCdXfUYrz9OCtu1E0SfuBj4oBzBywK1HnsbBczU?= =?us-ascii?Q?DTTaB9TbzBluSdLsI8ma4u9/yjgeLq8Nemgb39q+QAH254r5g1mykWbdJw13?= =?us-ascii?Q?iROuKZV6ENUHbI3PGCVMr43A/SzV4gE9mf2RGM+mOFk3Dr4OBWnllWZqKXMf?= =?us-ascii?Q?YWklwBy/f/gK1JSAtwv84NVni3iiPEGezlo2ORLT8Dzq1N56cl1fBd5cYfhg?= =?us-ascii?Q?+5W7Yecdspuayo4JbfQQpcy+Zk4dW0//Xug3WdyHYJNQVw6SwptLHrLNVydR?= =?us-ascii?Q?AGwDae1Cy7OAIOIRJeKyhopQBEE8ajNx0EX23Lg9W1KnbKntYC/ZAcbWAMFz?= =?us-ascii?Q?+tmLtnDmf58Gjkea5+ei1ECn+vX0FVByvrnwi2bXaOZ4DJnadrVPMgWva3dL?= =?us-ascii?Q?ceXM7/G61kGg65NC6I9fxrksWfaIWa4Gpes17qILX5mYxXhOas8XQ1erZxQw?= =?us-ascii?Q?N2kbNBpWgTCr2vqhFbxk+Ju9FhbCSY9/yZPOs9p963dcORrEcXkakoBMkz1f?= =?us-ascii?Q?/FrtYgP2MNZEjRHtpOYKnRLbj7xHt+On1lLCR41FdeZtTeVlBochUy1sWAMP?= =?us-ascii?Q?3lBcJucH1Q02dNthwiJesXqksk7ULQ5ZPKBbKOwlLGGKTSuorHqTbXskXdK4?= =?us-ascii?Q?eb7MzTEjVJe0RORgNR25pijLFilwdCOVrcD/GCCvUeGK+wyZevbV2ZrPejrH?= =?us-ascii?Q?5c9zZ+asqgwNxP4TGGjkoSzHO6YYyiTQobI7O7eV+SWLg7UH4veaIUuULyh4?= =?us-ascii?Q?j9/oR4Ku2EnvDXqr0egaEBoMl48XOafCqQ1YRrXmNxT4UfkBDyw8Dj7HEYkQ?= =?us-ascii?Q?qBAh7BxM0NAJS9y94kkztud8kmt8ErwzQdoD2BJQvm3C85VkZpZL7AzQAj7g?= =?us-ascii?Q?s63SADodo1ytPvQHZSBxO17clGKVS9kcWEQ3Z2nuhaUhzys4THaupjIweXtR?= =?us-ascii?Q?c+4=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: fe9eb049-04f1-4531-3d28-08d977394068 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2021 04:36:42.4282 (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: r+Ote8w51/qB1fI63uwnmpm9N2hcTtjo86NbZlgbszLdgu2vPx+dNWiTvYflKp2QCOBmE2dwuBYEkzjyPyv8aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4781 X-Proofpoint-ORIG-GUID: cjKoHH57fNwZ91TsN5bx59ii5vsk0Mu7 X-Proofpoint-GUID: cjKoHH57fNwZ91TsN5bx59ii5vsk0Mu7 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-13_09,2021-09-09_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" >> >> >> >> >> 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 is= sue >> 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 t= his >> 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, w= hich >> is not required. >I guess you meant not adding, it is overlapping with request information. >> 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 inf= o. >The decoupling was required as it was doing memcpy. >If you copy the individual members of request info(after response), you do= n't >require it. =20 With this change, the application will be free of such constraints. >> >> >> >> >> >> >> >> >> 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 clar= ity. >> >> >> - 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