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 3EFD7A0C45; Tue, 14 Sep 2021 06:46:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32AA94068F; Tue, 14 Sep 2021 06:46:23 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7A7DD40151 for ; Tue, 14 Sep 2021 06:46:21 +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 18DNlcRU006383; Mon, 13 Sep 2021 21:46:19 -0700 Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2103.outbound.protection.outlook.com [104.47.55.103]) by mx0b-0016f401.pphosted.com with ESMTP id 3b2380ugre-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 21:46:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJgpVewIvuHYICcso/h4ns9b2V8F0gLpUVpjlM8Z4GDtg8dPdwoimz61lJhyOJnA47IsfnDkEg60tsSXhmjUR87cfSIBPUHdSChJEFgQ59GMynT9EIJqlxECDHLzFm4Xq4k0BYJeyx++EiZWKziMLxqrbV/mX74g5x3QciGBrykUzBLVrc64nmzSxaL9S62d0SiEr0NvesSJKHKBNuTt0tYgbrfNLrl8TcAGEALIraI8tOc+Zc/yVx5t9ZEHeMl5xOzC3Ntfy24JgFVzxk9EKfvttQ8B/pGyENHkPRmUjvExo4h9zDfDZaARwHlghLbyJHyf8EXwCe5/3t2c4YUBbA== 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=6TzzxOeVfFe024Zp5rRTWovuG5m4kLdMWMZFR7zuWTg=; b=aPubtyvMcWOtWLUQUOaSa9vmizQY1kUhgVEXtM/4wkv7z6xDLlspRDgPBmOeulNtqd6E6HgDiUq96DSnsnyh00FVtieM4MfdmJfYibctPYdHazTptkSWZrDhwKsQW5Cs3V/67ggzn6xluDl93+aktSPKX3krA/Eb47syE3Gcu2C4pVi4ffhwbK3rv+1l+tfOJ7GmmYDYRG3l2bFBISJn/sqMbGqE4oIhg7j46mzT0A9YpPeIkFgkS1pi/M9gnQHFV5fexklgVKFIxflMg+KiM78KXSx5sWAZvqzvG2AHEtWQJD2vtY3PADj0bzkiSzZ+BTMfNwCyVrx6XBUm2KHUzQ== 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=6TzzxOeVfFe024Zp5rRTWovuG5m4kLdMWMZFR7zuWTg=; b=DRk4NEfqbqe1smvU8jlsH5RuO5dpirlwoh7NNbgyx305XJ6VM3avUgd/c0ojl4JruFAzSGo0EKiBOgXScEU1400IqsmS5MjpgqE2qEFgNSM6G8lP+1XaPCyJXJzcf/6AJccXewZ9fqt0lIsxZ3o/FTKK1n2Kj45IvMes7GgCvng= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by PH0PR18MB4521.namprd18.prod.outlook.com (2603:10b6:510:e2::17) 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:46:15 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::85aa:3d01:94f6:984%4]) with mapi id 15.20.4500.019; Tue, 14 Sep 2021 04:46:14 +0000 From: Anoob Joseph To: "Gujjar, Abhinandan S" CC: Jerin Jacob Kollanukkaran , Pavan Nikhilesh Bhagavatula , Akhil Goyal , Ray Kinsella , Ankur Dwivedi , Shijith Thotton , "dev@dpdk.org" Thread-Topic: [PATCH v3] eventdev: update crypto adapter metadata structures Thread-Index: AQHXnj3SYRIKrcgjIESY/Xhs52xIAauYT0kAgAAc44CAAHOCAIAA7gOAgAADKYCACTblAIAAAD/w Date: Tue, 14 Sep 2021 04:46:14 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-IN, 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: 4853f470-47ee-4c1e-4f7b-08d9773a9579 x-ms-traffictypediagnostic: PH0PR18MB4521: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1YetwNc73BCjbTF5UTXT5q6uXftTSU0JwhAxXBMQLd3oOhlGgRF378hSN8Ugu0waGKTRIomYfu6c07Q2Lf9vzGehFiYwW4OVLcQqRXbhZECHFguQmX6a3hWnH6/mautja2WN+JLSNo0fKF5DKrEwHDtR/mTuqIxO5yodo+KSANE2G/Cs9F9MEMOzD84n2NGzoy0kw7i3EDl6fj6ll+yPL/+0cEp6hvbIVgtNjbv84luepFqJmaOvs7UVMMVvxc3Jnpkeu3QPw1hSXiUZu0O/h/wPP/iDN8g3h3GnAx2mwnhIvg15QvG3C0jZ2Heeem1+YsCEEZoaLFAfQ6TVrDvC8LsxV01CcYzfMmcCHJ2+5CYFMgC4/TAYUXJSKYtzKJ+PZccBnfNuOpR91yYpyDrg1yihN0Pf4Lwrp+eLVOKQ4nVMv0dK6V2VR4ZZsbKkSbSir/j7jt4viSDV4xhdiKhmRFzy0VgiiHeZoyUoSYdCN0QDNjkIL9HSs0DcSvmTjKkv4Ti9Q+XhMJq3gcNbqn/Ls2H5CZ27zIRrEXZwtt02abFjXkNXnNbpDRD9FGl6lCpHGg9ySnmrXIbil2jvnuYDlYsB3LBlVcislSFoVea6O6GazzL18wR3h/qgNY3qLMLwI52vqV/OqBu3D32hN1tb00tHoN2eYjvVESunwamTqZbICGrHsuhG6QGuFS09Yjx/HkquV7gsvjKNJaKGM8CiUw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(376002)(396003)(39860400002)(346002)(2906002)(54906003)(316002)(38100700002)(38070700005)(6916009)(66556008)(30864003)(64756008)(66446008)(55016002)(6506007)(66476007)(8936002)(76116006)(8676002)(66946007)(478600001)(122000001)(15650500001)(186003)(86362001)(52536014)(33656002)(7696005)(4326008)(53546011)(83380400001)(5660300002)(9686003)(71200400001)(579004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6el1GrjSfQyWDlGYoyElc0xOOQQzClwO3YVP+gFwJOR5QsOVUjigzraXAYz8?= =?us-ascii?Q?LmEU+86BTuDBzQJqHgkg51qsQMAVWRYButUb8ZJrKROLykBbwK96n03NUlZl?= =?us-ascii?Q?w3XLRvzDASNPS29LEQCXj7B1ZXeWNo0/CMZvBGYWyV5x8hSoXrcBtd0qN/lI?= =?us-ascii?Q?o2EYEgcWWbWp/hU54JC1wI4NHFAK8BEuczSOuOFels31M1dz3D0aar1M5iZz?= =?us-ascii?Q?BewsTYuqdxSLLqqmnMfza+4b4xBflOXuCbB473E7mAR6JWORIq01phHI5ZkH?= =?us-ascii?Q?FEx3DY9k9JALRK+JxgDDpCJG284+3OPKUTmSXHaGgz1orf86G97utF2R/AYm?= =?us-ascii?Q?nOsyZ6L3QUcIz1pMI7pB8YZcTcQTuNQ9VLhnNI8v0MoeO2VwB9FYbsCQY2nS?= =?us-ascii?Q?XgI6JIu1RYVmV4UuEBqlKsrhbEGwf5jM+d9/bbdlLvx2JvYSMq6Z0gFOYIK+?= =?us-ascii?Q?i0lP3HVGsF+eAAOozsKiWRrBggGpmKqTzVEk/Jv9r0+EMhl94499S4KW3dlw?= =?us-ascii?Q?rfcjU2joj0XkjqkC1IqGJjXMUmI+myKxzfGQ3uyxVLmKh9sQgva//QF+vInD?= =?us-ascii?Q?lqlvt7Vs/h1oYDz5zMciuk8pMticN5mXCWztSM+uNs2jrPt+ICliI1RUOnDc?= =?us-ascii?Q?Cd3osnNkcGSiOOxwVi5yJV0fNw/XVod5+HPbLU2QU4iqjeyBTKSCJAEZ8E75?= =?us-ascii?Q?ZmH/H2iVThpV5ozhUPgWQQlYOIGN3OjYjqCV+lfEc/+kMmMz2X4nArCXdTQZ?= =?us-ascii?Q?oaHvaCq9J/BjOM7XNZDHgZvpS6SeKz8HfJ7pLjD8+/d9LqiCGiYyMXjK4Mnv?= =?us-ascii?Q?dHw4ErrE2s3PrGjmlr4Z4eU9yaVQRDUlcEDxLbdm/0CKXEGU38g4mzw3OsJI?= =?us-ascii?Q?khqoyn9EfikjZ13PwhBEaeB2K8bgGAUB+l9w/rj1Ddu6au/a/xTdLpFBTcgx?= =?us-ascii?Q?Q5DJuGm8yMWgvKQfLYOs7JKeTDtjmhwzeDPd5x2YQY/s2L1BCis3kToHkxXl?= =?us-ascii?Q?kIAOiFMBr+zpjrub2AGqVxDY6gsBi81TRn7hR0sMzhUB4vwZ//uzn8EGZ9wS?= =?us-ascii?Q?8fdA8USFgO4q7h8saNmRqkK0ArFqcyYyZAEN0EJueB63uOtzrGfu0b6Sz7Xe?= =?us-ascii?Q?jLdmLiPtE0zQP3NP3ugpOHvR+3lgLjjqnfTBSI3J+aU/GrIjM/iz7mjid61L?= =?us-ascii?Q?CDfO1pFSOazdcextszyI5X6B2TYvXdC6jh+U8c9jV1CG+VVyvF8Q+ciaecqU?= =?us-ascii?Q?BK4zUCBCM+rkB9evYIkbwRauzUulTUgtdAVoJ1i3FZamgN9cRBGHw0Wpx+Jz?= =?us-ascii?Q?okAhxZV6yQKVGkCu9biCR7PfrFwF88mMlX4iOLxkfGEtFv8hvI59v75/yBs9?= =?us-ascii?Q?BCi/jPHJEzQWquhVUoprPGhWV2BW?= 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: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4853f470-47ee-4c1e-4f7b-08d9773a9579 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2021 04:46:14.7029 (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: v9yMP7MQfazJP6+B/OwpDIgBUdoXZvyKl+9rWpCaq07kPTUFNHu0hbZ3qdk7lB9TqA4go6xqpexAnmvflzcCog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4521 X-Proofpoint-ORIG-GUID: 9aVVIMib5e14ybGnQSwoAULNLxp7PrkI X-Proofpoint-GUID: 9aVVIMib5e14ybGnQSwoAULNLxp7PrkI 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" Hi Abhinandan, Shijith, Please see inline. Thanks, Anoob > -----Original Message----- > From: Shijith Thotton > Sent: Tuesday, September 14, 2021 10:07 AM > 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 > >> >> >> 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 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 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, which 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 i= nfo. > >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 > With this change, the application will be free of such constraints. [Anoob] Why don't we make it like, struct rte_event_crypto_metadata { uint64_t ev_w0_template; /**< Template of the first word of ``struct rte_event`` (rte_= event.event) to be set in the events generated by crypto adapter in both RT= E_EVENT_CRYPTO_ADAPTER_OP_NEW and * RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD modes. */ struct rte_event_crypto_request request_info; }; =20 This way, the usage would become more obvious and we will not have addition= al space reserved as well. >=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 cl= arity. > >> >> >> - 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-vo= id > 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