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 9B47BA04FF; Mon, 4 Apr 2022 12:42:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3341D40696; Mon, 4 Apr 2022 12:42:44 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 7BF9E4068C for ; Mon, 4 Apr 2022 12:42:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649068961; x=1680604961; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zwumd6sLCX5uD0pfWIKjkyBkm0wHIX4atYXp4Surcf0=; b=KGqUiMqjAIkh0qB0t7FWuTZaVbdO5G1YvQge6TT7ds2Bl7QnAJYPCUey ny3dntMhfa+SnC7J03q0aF1GphPNasg6Gq6tGWHgUvtnpPuiQTJKdjEtI W5uyUeV6ih07n2wupsOe9jPbm3ShNEQp4LH6iH29Yz1K5FZoJYeVOeUTC PmqTHBOcTYV3Nj+FsWRdxGOlxwLB/yBvjSGGkXT79EtO3Xb4jfTbizGJP ZkkKSXhzxcUNEW4bGtjZh291d2pV7S2ZqTXY7EoZLLMe1hWvlMOQCfsg8 wUBQfBXrNlMmblBrml2RSXHJ97xqAa1Se13FB9kwtlQ+J2YaxhzVGL8ag Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="259317152" X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="259317152" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2022 03:42:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="548604852" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 04 Apr 2022 03:42:40 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 4 Apr 2022 03:42:39 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 4 Apr 2022 03:42:39 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 4 Apr 2022 03:42:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awE+awiKJvPjB6ghdxK3e8jMwx8D1O+c0WwCHFuy0DlfkIj8jrgRbY5shnzqPSbPKBJ3A8soKFvTMSPxw8vbZJ9V3adIXqlhaRtiQ0tE2G76Haod6uf9rnDfXYhU8gPAFdZ7geZPfPBtVHZzT49575srSWjPopULJjnzOeQcaNzwSj6CDRUHmLPyp76inDlBWnWf+pcrjUDpbyce1nO5LMcZpMYvBsC35bygo2VHIvlNklo1ejIcu9aiHHAnrd/gmJF6WllyOiyixtswwbG0OgLg5tTx+jPICuhnzfHp3krvRtkuYnXTmPBPOqFfQCSaLemjcUiUdx3odP8SFImp1Q== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Cw/rNVMjlJziKU7jeY765nExFLFJc7D96tUlFduzQvM=; b=NCq9n/YYrKktHQEEHm3u/b+x1QrRDpwMxuv1LpuuSF1vuvxL1cWWLPSbDGOjsm4tCAWbdur/PppwjHa4wj6pZ02ZmECywwNCC/yKkUWdd4kk9Ysx731jo25vxReHpQ62+KXLjAFr5hNmLafOi3jS91eDlVjnN0pWZm1FfQz1MW6ajcD+InqoQ93ZrwflOYZv5eGv3N6vKooOtMAE48b46tNBiixoiYicA/DhVe7o/nbJtgb6MQ+XBnWNdGwq9XIH824O2U7TM3O05Eb4oUTvphKIc2TkXcxkZfqVf2FgUoOFTuCobkj3mzkBKEg8R7nYZWLlBtQ8Q4JW8j8ZrxM3dA== 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 Received: from PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13) by BN8PR11MB3618.namprd11.prod.outlook.com (2603:10b6:408:90::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Mon, 4 Apr 2022 10:42:37 +0000 Received: from PH0PR11MB4824.namprd11.prod.outlook.com ([fe80::117d:a93a:c9:2da1]) by PH0PR11MB4824.namprd11.prod.outlook.com ([fe80::117d:a93a:c9:2da1%6]) with mapi id 15.20.5123.031; Mon, 4 Apr 2022 10:42:37 +0000 From: "Gujjar, Abhinandan S" To: Akhil Goyal , Volodymyr Fialko , "dev@dpdk.org" , "Jayatheerthan, Jay" , "Vangati, Narender" CC: Jerin Jacob Kollanukkaran , Anoob Joseph Subject: RE: [PATCH 1/2] security: introduce per session event metadata Thread-Topic: [PATCH 1/2] security: introduce per session event metadata Thread-Index: AQHYQDnKOZCeF6idPEmvty/m2lBf2qzffgjggAATzYCAAA5Y8A== Date: Mon, 4 Apr 2022 10:42:37 +0000 Message-ID: References: <20220325111615.1118946-1-vfialko@marvell.com> <20220325111615.1118946-2-vfialko@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-Mentions: jay.jayatheerthan@intel.com,narender.vangati@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee26e8da-b3aa-4950-935d-08da1627d5eb x-ms-traffictypediagnostic: BN8PR11MB3618:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PCNPBoD7kSbvFL1aZTtw7+A+2x/w5CZfxr0jiNPc0od5JVDIO1Jxi7doir494jfC8tD40I7X4mlezPawL1zd6mX/LGFP+/wzNXE0dXOyOEb04p7yR/yRQfVkvrlvKW0JJ++8UPHzATYTKJ3U84GirMSLJ++58Dv3K3UqJtrF0UvFSw2ER7z9czM0yCe8Cj8fDTSCT9N1528f1Me+K+Q1Y/aZbrOOa3RPAdYikLQYPnLO4oiEzXWsc9cXsOc8nuvw7GTyIUjFNFmToBmnHhCcYS0a3R/adQKcJnAr7wHxCuYilYTvZCB7OViHSG2l+mfYuHWjt9F8ImRtm4OTmbQHYhdpsMKdC32cHFxECUpY4U3HWG2290Knv1b4LLA+fMq+ckLPOZ+5bSz8VUP4JgauQHqoAENUX7yD1gwtMvVDOFlqKuFmxJrXsU/qGkxP7+B2dpCUydI9mMKRGqb0mS5YY3PFbZI3kmNo+Xyo+zuPLPksp5f4rTorUpSy5VdjvuHW98zNS09C/XHnv63luzqunrH11Q0moQTA7Yo/ue7NoHLpMkfsJjdayNxsY9Cigb8qzi/d081QHeWFs3APfpLmF/uM69++j9JE+7ZyUfvN1Wty8u13tgO2yFBDvqge7FJkOfLmgllJZDujOt2Pg2amVhJPpUBjVkS7D7kp0eKNlHVu3C8jc1n28kkv7MlHrqDzhpa7y4MKUXOu4lOiQCDX2g== 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:(13230001)(366004)(84040400005)(26005)(186003)(38070700005)(66556008)(66476007)(110136005)(64756008)(8676002)(54906003)(66946007)(6636002)(66446008)(71200400001)(4326008)(76116006)(83380400001)(316002)(86362001)(8936002)(55016003)(38100700002)(5660300002)(9686003)(82960400001)(122000001)(33656002)(508600001)(52536014)(2906002)(53546011)(15650500001)(6506007)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7UF4eUpnSWdh7yLUTBOeVQ2YdegWYZJfIjI1bgyDlAt5xLoGO0fCxM/xmGeK?= =?us-ascii?Q?Asv9QH4f3L6L+mQ/Jct1sHqfBq1CdxNBWNOuu/ALj16cnxgqulXZinv3m241?= =?us-ascii?Q?Qy6Jk5TGiz4G2PitEtQmT8YepHr3kY6jjA6dzl5P1m7l4I0wRu0KJl9QOnhZ?= =?us-ascii?Q?Yqh6xi4ld2qIQYMH7Jipuarq6TSqW9RZUcf6mUUPPsn5lli8d2Ztd9UjNdys?= =?us-ascii?Q?/8aHGQv79KMg6WDvadouzKYSqM3hl+vif+AJrXblnUbWCwwdeHqaWn/cghbJ?= =?us-ascii?Q?cSvkFrr8K9MUsD9aGgRAdAbMeEtsZj/3SUrrDY6HdHF460UBwqtiEHdugDWj?= =?us-ascii?Q?soaKttxrIrEdPQeOb4rxAi0YQzzpT04nmPZScAf79m9XJNP5oPH0FCGTjFvq?= =?us-ascii?Q?S1jNhQa7xcgPNnOaf0i14j29I/0wX8M/wNQjNoQq3+l7xILTgDAGfTAU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R5HEsgJUlj6PRoM/F7G+F/CYtq+f27htWb?= =?us-ascii?Q?IEj8fWPBX/5Fs0zCbonB/qkSd9sgJ4pri+rbKncghwvJjry22aV2DZsaP44B?= =?us-ascii?Q?4ND3x6flyi5UsSZ4g3fhCHObCYit5pDm9mim4SiIxxIvNhBjxjZlLmMcVqsD?= =?us-ascii?Q?1UXiY0KMnIZdYfOj7q4Y0GdxOMeFb85OiixECiHxaTzSUq5ZQgFVLGcEIiGO?= =?us-ascii?Q?a/1m43nOaGf4Lz9H+QYhly/Oak1aPE5D/4HC5xpQ4zNpWAWk/7YfckKdBvrO?= =?us-ascii?Q?sB75MXJTD2XKTSuKWzmOyBFZ7PgbL2m71wk818xttnHcK0+icjv8M6hzNbvp?= =?us-ascii?Q?gPF3Tb01fLvyCvg0xA5NniRdW0YfDGcPHr83oNKaRBvLfFASMLOK9NtJSb2n?= =?us-ascii?Q?5DhUfihgdLe2XLFszcXXPWY3qD5o+OE=3D?= 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: ee26e8da-b3aa-4950-935d-08da1627d5eb X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2022 10:42:37.4087 (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: SykCYlVZ5c3wSEW8mVxo8HeW2qNMElCO72ozVnz2I6AGXcBpYkpKuanAlkT38KkAo0FaAq4lRvePNByd9g7sQfrzTRjgnxFIgo/huHrMeDA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3618 X-OriginatorOrg: intel.com 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 + @Jayatheerthan, Jay & @Vangati, Narender > -----Original Message----- > From: Akhil Goyal > Sent: Monday, April 4, 2022 3:19 PM > To: Gujjar, Abhinandan S ; Volodymyr Fialko > ; dev@dpdk.org > Cc: Jerin Jacob Kollanukkaran ; Anoob Joseph > > Subject: RE: [PATCH 1/2] security: introduce per session event metadata >=20 > Hi Abhinandan, > > ---------------------------------------------------------------------- > > Acked-by: Abhinandan Gujjar > > > This change would be an ABI breakage. So to avoid that, we are planning t= o > Propose a better solution compared to this patch. > We plan to add a new cryptodev op to set the event metadata. A single API > which can be used in all cases - sym/asym/security sessions. >=20 > As currently in case of sym crypto, userdata is being used for storing th= e event > Metadata and it is then dereferenced in the PMD which is wrong. > User data is meant only for user to use and PMD should not dereference it= . >=20 > Hence a new cryptodev op can be used to set session event metadata explic= itly > if event mode is enabled. >=20 > I will be sending the proposal soon. Would need your help in testing the = Intel > usecases. >=20 > Regards, > Akhil > > > -----Original Message----- > > > From: Volodymyr Fialko > > > Sent: Friday, March 25, 2022 4:46 PM > > > To: dev@dpdk.org; Gujjar, Abhinandan S > > > ; > > Akhil > > > Goyal > > > Cc: jerinj@marvell.com; Volodymyr Fialko ; > > > Anoob Joseph > > > Subject: [PATCH 1/2] security: introduce per session event metadata > > > > > > Implement API to set/get event data per security session. > > > > > > Signed-off-by: Volodymyr Fialko > > > Acked-by: Akhil Goyal > > > Acked-by: Anoob Joseph > > > --- > > > .../prog_guide/event_crypto_adapter.rst | 4 +- > > > lib/security/rte_security.h | 43 +++++++++++++++++= ++ > > > 2 files changed, 45 insertions(+), 2 deletions(-) > > > > > > diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst > > > b/doc/guides/prog_guide/event_crypto_adapter.rst > > > index 4fb5c688e0..227b36b4b7 100644 > > > --- a/doc/guides/prog_guide/event_crypto_adapter.rst > > > +++ b/doc/guides/prog_guide/event_crypto_adapter.rst > > > @@ -246,9 +246,9 @@ by ``rte_cryptodev_sym_session_get_user_data()`` > > API. > > > The RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA > capability > > > indicates whether HW or SW supports this feature. > > > > > > -For security session, ``rte_security_session_set_private_data()`` > > > API > > > +For security session, ``rte_security_session_set_event_mdata()`` > > > +API > > > will be used to set request/response data. The same data will be > > > obtained -by ``rte_security_session_get_private_data()`` API. > > > +by ``rte_security_session_get_event_mdata()`` API. > > > > > > For session-less it is mandatory to place the request/response data > > > with the ``rte_crypto_op``. > > > diff --git a/lib/security/rte_security.h > > > b/lib/security/rte_security.h index > > > b080d10c2c..29ec514504 100644 > > > --- a/lib/security/rte_security.h > > > +++ b/lib/security/rte_security.h > > > @@ -526,6 +526,8 @@ struct rte_security_session { > > > /**< Private session material */ > > > uint64_t opaque_data; > > > /**< Opaque user defined data */ > > > + void *event_mdata; > > > + /**< Event request/response information */ > > > }; > > > > > > /** > > > @@ -729,6 +731,47 @@ set_sec_session_private_data(struct > > > rte_security_session *sess, > > > sess->sess_private_data =3D private_data; } > > > > > > +/** > > > + * Get event meta data attached to a security session. > > > + * > > > + * @param sess Session pointer allocated by > > > + * *rte_security_session_create*. > > > + * > > > + * @return > > > + * - On success return pointer to the event crypto meta data which = is set > > > + * using *rte_security_session_set_event_mdata* > > > + * - On failure returns NULL. > > > + */ > > > +__rte_experimental > > > +static inline void * > > > +rte_security_session_get_event_mdata(const struct > > > +rte_security_session > > > +*sess) { > > > + return sess->event_mdata; > > > +} > > > + > > > +/** > > > + * Attach event crypto meta data to a security session. > > > + * > > > + * Application can allocate memory for *rte_event_crypto_metadata* > > > +and set the > > > + * reference pointer using this API which the PMD can retrieve > > > +using > > > + * *rte_security_session_get_event_mdata* > > > + * > > > + * The API should be used only in case session is used for event > > > +crypto > > > + * adapter. > > > + * > > > + * @param sess Session pointer allocated by > > > + * *rte_security_session_create*. > > > + * @param ev_mdata Pointer to the event crypto meta data > > > + * (aka *union rte_event_crypto_metadata*) > > > + */ > > > +__rte_experimental > > > +static inline void > > > +rte_security_session_set_event_mdata(struct rte_security_session *se= ss, > > > + void *ev_mdata) > > > +{ > > > + sess->event_mdata =3D ev_mdata; > > > +} > > > + > > > /** > > > * Attach a session to a crypto operation. > > > * This API is needed only in case of > > > RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD > > > -- > > > 2.25.1