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 13BA7A0C56; Wed, 8 Sep 2021 09:54:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 983D14003E; Wed, 8 Sep 2021 09:54:05 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 24B154003C for ; Wed, 8 Sep 2021 09:54:02 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10100"; a="281428291" X-IronPort-AV: E=Sophos;i="5.85,277,1624345200"; d="scan'208";a="281428291" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2021 00:53:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,277,1624345200"; d="scan'208";a="449338773" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga002.jf.intel.com with ESMTP; 08 Sep 2021 00:53:59 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 8 Sep 2021 00:53:59 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 8 Sep 2021 00:53:58 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 8 Sep 2021 00:53:58 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 8 Sep 2021 00:53:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jw9SqpqFRHce+US7+FAl8LUa1e2vg8vtaTFtszXmOwwhLkx6/GEtdKua6J+lY33yMsAGh1rrPVYXMD3v4XNDyfXdWI3IjJK6pVD1BL6GWoC8+5HXjz1CJDYwIjhdpIqSNCIZysb8q7ROfRkWJUln7gaZN5uOXofFAR3j+Q1vollNLiL25ABtdWulEAOj3RZ7ZKmAIkM8l2tUp4eGQi8B7Y6oEExAyuNeNKI2VDcP32UdqPpHLT/eH/uKIhYxRBQyWvQ3VLldWlbFPZQqLPOO33cUvHxzZ5SiHlXalUBZe/abIVHrgfi7W8P/SalVat53sObltzGCVMb/58ToiQvwSg== 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=1wVZY8JygvkueeGI9HWYwn9Lq8fiUJ4bEQL2pmgEg9U=; b=ALK5HlmKjAQRBKwau4hM1Au5ILZmYzytAK4jO2pDwZ5bJzyWW1kVwwtgqmGhtDZUc99s29AXnahYUmbXeGzixNDeo0z1eU3C6hj4W0aV+KVx0kcGBWSSPY82VdyulHpKjmkrikgm8Pa3dGQeoxvixI+w5oghJ8isnYvFqxIwhozDjqyW24LLaZu2N0BVS3c5Ue0mYHZTTaZKa6FVZWzVOve8/LOiFvYL518UUB+AkezhkqhcvVsNz0/9NdR/UyfelfDjoJ3Cwy/jHCZQGdq7MP6aZPRYIgEXha/YxOPe6/u0eRBAss22ThTMIHXNW0lNWkVJ4J3kHW6AOrYRBLmFkg== 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=1wVZY8JygvkueeGI9HWYwn9Lq8fiUJ4bEQL2pmgEg9U=; b=l6yqGnJmu1+op+lkKUekHxekQ1w6I44yHrjSKHXPfqgogWHhoH7uF4H9U8ovvUt4VliSNZf7GbYOGMne4jDuOJP560vmwpW5QaRwfiyhw4mMi7OQq/5zEpuD+splM56E0C9urIsSZDt4aTv/nJp0aIlfw37PmKp3SQ8/lZj0Lkw= Received: from PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13) by PH0PR11MB4774.namprd11.prod.outlook.com (2603:10b6:510:40::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Wed, 8 Sep 2021 07:53:53 +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; Wed, 8 Sep 2021 07:53:53 +0000 From: "Gujjar, Abhinandan S" To: Shijith Thotton , "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: AQHXnj3WjnQgyKZ1dU+J5G+CJPvld6uYTrEggAAde4CAAHAWEIAA8W+AgAABoKA= Date: Wed, 8 Sep 2021 07:53:53 +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: 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: 96b68915-f201-488f-2701-08d9729dcdbf x-ms-traffictypediagnostic: PH0PR11MB4774: 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: 5CK6hH7OJaObFYQSDpSzU08Gxce6VtyjVR6XDkxNDKZZmYMmwJK0J+JAfVM+WxcCFYAaBJmzgJDqJTf04qXghlLKRMNzPPgD8NWNZekwprYB6MUJSTLGOF1zR7cYgROBCn+F6C7wh2oPTzdh74S9i5QTnuTCVad8XlgvickgG+rPK7hpFcGWwtl1mpnzSI1DYjOgx6J4RXcQs9mxfy1NohQkgUjr8pLohrBlLmoIlaDvJDH1BQG06NQfDLQsMybTSnFWVFk8mG/x+V/vLzv4cYIzp/nJj0bf+etTh7PVQimmEnrQbuqY394fDyAmE6nMVh8WPoi2B2zfhZN9tsWoo4nds2cd9vkreV1S43vQEXT3A5N6tmVxI1ygdBdVDDVZ4/maVHUAuHL7QTwB8+N2wXpLXQ48ykhSO5wPogj/ebFDeJN9f9mk1Q4CSIuUAFTzaUTnpqfBDu6TOS3nQr9nn650QJ+AF564RfAivBPsQzTeosodKeiqlMDCgVzCcUjZD2+jtjFpxX5I2U528a9J0ZNqEyNTNB9CewS56dV7j42KU1uJj5OfgrSGy+eN21Rx+U5Cb+kBo7NQ96fqG/8ZTS5I4cO+zgEX8ZHraC5WSCzSGBNlVychH3fWwsDQQ3BqvxNa92spzj+nrdPLIY90uFp3S8xSlkY6A7Tc7WO0J0AbQHDMnEGztq3T+kfI0QuIkBt08OBkIb1x3DVcKSZbUA== 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)(376002)(136003)(39860400002)(366004)(346002)(396003)(8936002)(7696005)(52536014)(5660300002)(66946007)(2906002)(54906003)(38100700002)(186003)(30864003)(33656002)(110136005)(26005)(55016002)(64756008)(66476007)(38070700005)(71200400001)(9686003)(122000001)(66446008)(478600001)(66556008)(15650500001)(83380400001)(8676002)(53546011)(4326008)(6506007)(86362001)(76116006)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8W0nk7zHNHBpT8WkRWtLYIFg8nQ1pCI5xnSdYSE+os/XjXSo4YDdSmbnwwb8?= =?us-ascii?Q?2ja0wu0oAe4mggMo79U/aPrtFXHqcu05uOLSnCkFziuctjiHkgAcn/idxbC+?= =?us-ascii?Q?tahmGHUE7nXHPyXBgmEJwfXHVAzvddH46DBSL6kVntihXOJsvb1JIlAOClud?= =?us-ascii?Q?qzZYhJMtP8U4K4BWpnIGEI0wi34CT/HZ/8RE18Lz/rknmpQ6YCEvCkQto7st?= =?us-ascii?Q?vtsQy8st4JUzja5o9dKsA1HiOMJ2+RQy0+7mYHmSFj6Go9FwVd0GoNWZuDBz?= =?us-ascii?Q?Sj/Jn2Mse3b2rqb2ypOA4YIt4MsYxBFunMInBQdvGxp6clZ8Vf8dD2uBSvzB?= =?us-ascii?Q?NNMq+ePYtftNZawpHgSoSxTSWPxtyBth5DEfFglt0C+96vKKC+xEcWGWgawl?= =?us-ascii?Q?vKsBHcm28mI93/x2k9CJEHuWMPLH1xZ08yBO9O9O/NSDUI4zEnQSPK79fw8B?= =?us-ascii?Q?e04MUHWA4ORFUjazdIsq1tvtX6guk9QyQMFMHwN5rOxg4Dt4WHhI5bRCJKDO?= =?us-ascii?Q?UgESjasy+xo96fkr7GSsNngfCibg61P5cR21ZpZRgc7HVF2mqeZWxiSIxPub?= =?us-ascii?Q?yRtGaIVEKxCcLS9hQiGgaA7RnKTZ1M1PbtWYcxcKKqiTDpVjB1VQL7S2czTT?= =?us-ascii?Q?85ebqoLu4qcFBYLqopW3XrqcH5XeAUdweehGmDc266AQf7+OWz7JJxtv+3zL?= =?us-ascii?Q?tqrf8VMUX7MsTy4WGaosFoSqKjeu4nR5peJDglBd1vsN8XJTW7V8h+PWvC1/?= =?us-ascii?Q?rGZ73oYpyacJIYn3ooMmET8xtzQzF7Ob97i+eJ0XEtBimgK3B+1vkCcTPP9C?= =?us-ascii?Q?TxKH5N7bNvCtsPUqCPn/GPkEirhJGM4X28fuE7WZRBTAd8n060QB1WNjCfKb?= =?us-ascii?Q?WX24dU91sdv2BHuimre40P8VadWtNQMD3kVesHmsz9B9OZPINFNeLmIHSR5Z?= =?us-ascii?Q?jw8WKeoH8LDu7mRwu1uWSURtb+ZL6VM44KjOdkgvvO+GJ+nksutW0s1gocWi?= =?us-ascii?Q?yHr0QXgCDUx966pC32eSb5nha6ToOrLI+1ZjL46Qc4K/lSXf2l3fkhwKeaoz?= =?us-ascii?Q?hbQoxFMv554A88CYA14T68V22dspmJth+ENkSvE4mYuq2oaIaCQGWzPSrBcw?= =?us-ascii?Q?4YqiH2wm0icf9xhgGydh1xFvrL4fACeQ7SVNfFu7tcrVL/OB1IL43MJYDgMT?= =?us-ascii?Q?MdW2ljMqm5JW+rX/+FKU29YVx7lLLpBAIpldolshhaLdrASpFRj+ATsvxPKl?= =?us-ascii?Q?b6OSgTCfHlWxUoAMgYHJhBmnPb6DUVOL0YZ+IE67rNV0l/Hz8wDzEICe3Jpc?= =?us-ascii?Q?zHTQctcwoVI10Stidu4bMTTL?= 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: 96b68915-f201-488f-2701-08d9729dcdbf X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 07:53:53.6078 (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: N+/1guYP9s6lvmKpLHeWfKAqyosoFKU1sAJnh0mMhxUck7RsKO4VZheWOIUC9QT2kFg1LigfmnHit6NNG3hzi/nOHPswCw8ah7pbWv7PYPA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4774 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] eventdev: update crypto adapter metadata structures X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Shijith, > -----Original Message----- > From: Shijith Thotton > Sent: Wednesday, September 8, 2021 1:13 PM > To: Gujjar, Abhinandan S ; dev@dpdk.org > Cc: Jerin Jacob Kollanukkaran ; Anoob Joseph > ; Pavan Nikhilesh Bhagavatula > ; Akhil Goyal ; Ray > Kinsella ; Ankur Dwivedi > Subject: RE: [PATCH v3] eventdev: update crypto adapter metadata > structures >=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 iss= ue > 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 th= is > 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? > > >=20 > I missed the second word of event structure. It adds an extra 8 bytes, wh= ich > 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. >=20 > 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 }; >=20 > Total structure size is 16 bytes. >=20 > Response info can be set like below in test app: > m_data.response_info =3D response_info.event; >=20 > The main aim of this patch is to decouple response info from request info= . The decoupling was required as it was doing memcpy. If you copy the individual members of request info(after response), you don= 't require it. >=20 > >> > >> >> > >> >> This patch removes the reserve field from request info and makes > >> >> event crypto metadata type to structure from union to make space > >> >> for response info. > >> >> > >> >> App and drivers are updated as per metadata change. > >> >> > >> >> Signed-off-by: Shijith Thotton > >> >> Acked-by: Anoob Joseph > >> >> --- > >> >> v3: > >> >> * Updated ABI section of release notes. > >> >> > >> >> v2: > >> >> * Updated deprecation notice. > >> >> > >> >> v1: > >> >> * Rebased. > >> >> > >> >> app/test/test_event_crypto_adapter.c | 14 +++++++----= --- > >> >> doc/guides/rel_notes/deprecation.rst | 6 ------ > >> >> doc/guides/rel_notes/release_21_11.rst | 2 ++ > >> >> drivers/crypto/octeontx/otx_cryptodev_ops.c | 8 ++++---- > >> >> drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 4 ++-- > >> >> .../event/octeontx2/otx2_evdev_crypto_adptr_tx.h | 4 ++-- > >> >> lib/eventdev/rte_event_crypto_adapter.c | 8 ++++---- > >> >> lib/eventdev/rte_event_crypto_adapter.h | 15 +++++------= ---- > >> >> 8 files changed, 26 insertions(+), 35 deletions(-) > >> >> > >> >> diff --git a/app/test/test_event_crypto_adapter.c > >> >> b/app/test/test_event_crypto_adapter.c > >> >> index 3ad20921e2..0d73694d3a 100644 > >> >> --- a/app/test/test_event_crypto_adapter.c > >> >> +++ b/app/test/test_event_crypto_adapter.c > >> >> @@ -168,7 +168,7 @@ test_op_forward_mode(uint8_t session_less) > { > >> >> struct rte_crypto_sym_xform cipher_xform; > >> >> struct rte_cryptodev_sym_session *sess; > >> >> - union rte_event_crypto_metadata m_data; > >> >> + struct rte_event_crypto_metadata m_data; > >> >> struct rte_crypto_sym_op *sym_op; > >> >> struct rte_crypto_op *op; > >> >> struct rte_mbuf *m; > >> >> @@ -368,7 +368,7 @@ test_op_new_mode(uint8_t session_less) { > >> >> struct rte_crypto_sym_xform cipher_xform; > >> >> struct rte_cryptodev_sym_session *sess; > >> >> - union rte_event_crypto_metadata m_data; > >> >> + struct rte_event_crypto_metadata m_data; > >> >> struct rte_crypto_sym_op *sym_op; > >> >> struct rte_crypto_op *op; > >> >> struct rte_mbuf *m; > >> >> @@ -406,7 +406,7 @@ test_op_new_mode(uint8_t session_less) > >> >> if (cap & > >> >> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { > >> >> /* Fill in private user data information */ > >> >> rte_memcpy(&m_data.response_info, > >> &response_info, > >> >> - sizeof(m_data)); > >> >> + sizeof(response_info)); > >> >> rte_cryptodev_sym_session_set_user_data(sess, > >> >> &m_data, sizeof(m_data)); > >> >> } > >> >> @@ -426,7 +426,7 @@ test_op_new_mode(uint8_t session_less) > >> >> op->private_data_offset =3D len; > >> >> /* Fill in private data information */ > >> >> rte_memcpy(&m_data.response_info, &response_info, > >> >> - sizeof(m_data)); > >> >> + sizeof(response_info)); > >> >> rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); > >> >> } > >> >> > >> >> @@ -519,7 +519,7 @@ configure_cryptodev(void) > >> >> DEFAULT_NUM_XFORMS * > >> >> sizeof(struct rte_crypto_sym_xform) + > >> >> MAXIMUM_IV_LENGTH + > >> >> - sizeof(union rte_event_crypto_metadata), > >> >> + sizeof(struct rte_event_crypto_metadata), > >> >> rte_socket_id()); > >> >> if (params.op_mpool =3D=3D NULL) { > >> >> RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n"); > >> @@ -549,12 > >> >> +549,12 @@ configure_cryptodev(void) > >> >> * to include the session headers & private data > >> >> */ > >> >> session_size =3D > >> >> rte_cryptodev_sym_get_private_session_size(TEST_CDEV_ID); > >> >> - session_size +=3D sizeof(union rte_event_crypto_metadata); > >> >> + session_size +=3D sizeof(struct rte_event_crypto_metadata); > >> >> > >> >> params.session_mpool =3D rte_cryptodev_sym_session_pool_create( > >> >> "CRYPTO_ADAPTER_SESSION_MP", > >> >> MAX_NB_SESSIONS, 0, 0, > >> >> - sizeof(union rte_event_crypto_metadata), > >> >> + sizeof(struct rte_event_crypto_metadata), > >> >> SOCKET_ID_ANY); > >> >> TEST_ASSERT_NOT_NULL(params.session_mpool, > >> >> "session mempool allocation failed\n"); diff --git > >> >> a/doc/guides/rel_notes/deprecation.rst > >> >> b/doc/guides/rel_notes/deprecation.rst > >> >> index 76a4abfd6b..58ee95c020 100644 > >> >> --- a/doc/guides/rel_notes/deprecation.rst > >> >> +++ b/doc/guides/rel_notes/deprecation.rst > >> >> @@ -266,12 +266,6 @@ Deprecation Notices > >> >> values to the function ``rte_event_eth_rx_adapter_queue_add`` > using > >> >> the structure ``rte_event_eth_rx_adapter_queue_add``. > >> >> > >> >> -* eventdev: Reserved bytes of ``rte_event_crypto_request`` is a > >> >> space holder > >> >> - for ``response_info``. Both should be decoupled for better clari= ty. > >> >> - 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