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 5C7A543C4E; Tue, 5 Mar 2024 08:13:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0410340270; Tue, 5 Mar 2024 08:13:40 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id D76FE4026B for ; Tue, 5 Mar 2024 08:13:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709622820; x=1741158820; h=from:to:subject:date:message-id:mime-version; bh=0qAsu53cHzQA9FvK9w6NAlhMCrb1AYzNh6q+SQitH0E=; b=BrN36QgomouUwfJVKaei1ccwU9WJ/bpLk6reTEuoz9P4GeEqpvYV9r7+ dawsneCVsSXkxe9qVVSJvIkaSfDB9VEPwD7UGmoAgijDJe/mLy2XA/C6q gCua1GTx+iEUIQijaZqkCEmEcfZaUd9X5xLmUEiCQwxyzw+vOolGvFIJh d6MWYOR4P/KGPLa08QTwG1RDxOyuWP74p22PQD+sTX8w/XDFTOZft/2NZ xq1DDvyRj7e7naJjry7I1d540nlUQdslRzmNUmmx2OOYO/Shnesct1eyu R0a5M9pHTlEr5tWJz0KeyDcM5aeMpQAmbknqj5rDgrZqE40P0Wtw+HJw/ A==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4015038" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208,217";a="4015038" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 23:13:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208,217";a="13930216" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Mar 2024 23:13:37 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 4 Mar 2024 23:13:37 -0800 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.2507.35; Mon, 4 Mar 2024 23:13:36 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2507.35 via Frontend Transport; Mon, 4 Mar 2024 23:13:36 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 4 Mar 2024 23:13:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l/01wWhkECEOM8Knpl4R14MnMQEdfWBwZYGQEijKrOxfeLpXJ3JxxqL6VMT6lsYOyZRkvqfqEQYifgKJnko0Lv7fWZvC44fquxEzEgEJ81rtACxW7kI7s1eW0YAHRsF95Le88acqjkbCsvwkBEOZISFy2K8mxePOfHn+l3yTAFjleNZqT8wmPhN3xIcICcjx91oLObjbxIH41C9fqiGcWqvVxQmAwHKT9ns9Emt2BJH8CofE+5ewXq/ocp8fucqUJ6tpT6PbvYktnxgOV7VdcQvWTWyzriBcU1RQXIFlLarL/X7Vy1LsAOkh5+B6I/9TycMw/GYcMfithxqFC6XJuA== 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=3SwvADGx9DgTfSwhw7X/P4qbUyxWCMW0WcFKxLd6RLA=; b=Pv5Men3uT0BSykm/hBCZV4RrOJXwOCMXGSdeGX954TupAmhAK4+f8ZuY6n/bcvaDtZ+TU9iPTFdbFeYIvJL0hUwNtksaJ8I+jMlUE3Gh50gYs40HXtfvj33GUsndJONCpL8o5DnKi1gR1HTjBYYUAxJ7wS+2gT05tdPabTdHjdZYJfhak+6abBzAJi8sxE/ymbPD7Zg6kkZyLndInhhY479MZebyG9OA8NfyBjVUIm8jKTzV1i8+SepkfRixooDFwTsqZkLr3mdr22O5a4CQIvqgL6hJqx8Ga2cL/I6I7+2oR5gAxYqA1ReUlNcHm/OSKZ4KZNI5prxWmVo4DaAYSA== 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 MW4PR11MB5911.namprd11.prod.outlook.com (2603:10b6:303:16b::16) by BL3PR11MB6482.namprd11.prod.outlook.com (2603:10b6:208:3bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.22; Tue, 5 Mar 2024 07:13:34 +0000 Received: from MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::6446:3cb8:5fd5:c636]) by MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::6446:3cb8:5fd5:c636%3]) with mapi id 15.20.7362.019; Tue, 5 Mar 2024 07:13:34 +0000 From: "Kundapura, Ganapati" To: dpdk-dev , "gakhil@marvell.com" , "fanzhang.oss@gmail.com" , "Ji, Kai" , "Power, Ciara" , "Kusztal, ArkadiuszX" , "Gujjar, Abhinandan S" , "Jayatheerthan, Jay" , Jerin Jacob Subject: RFC: Using and renaming 8-bit reserved field of rte_crypto_op for implementation specific Thread-Topic: RFC: Using and renaming 8-bit reserved field of rte_crypto_op for implementation specific Thread-Index: AdpuzBj7+MAvLpaLTkGIacnPGT5mjg== Date: Tue, 5 Mar 2024 07:13:33 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5911:EE_|BL3PR11MB6482:EE_ x-ms-office365-filtering-correlation-id: 93a1dc99-d9b7-4dfc-2ecb-08dc3ce3c501 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: luCUDjRAn+nN2h1/ydAzbrwukyinedACZa+cwSB7IYTHagJR7cqcOXWm18k+yGs3j/quBXfdwmXlrRffFTInI2q3k/PIuibFADr7hXwB6f1gQBlI3OaQVzL65zX+7B38PkON1uRhTnZUeM4R4JkdR3TnsfQVoVtgC/Ae1ScHAkmZgl6n32o5F11OI3HfH0nCctpG9qLPPUwRV3pbrGOmQZHKr/9k8KfeVelYv2/MbHm4rbhmG95HjPuEN4hEwiEtY1NIMfiVFIYju0g5wB98/LIZIZ9ve+kC9yLL1HI1Y+NMJLKcjHZXLH0O921bH99DgUNC6U5dcB2c2KA29DHSb3EAdIPrZPsmj157w5BMv5wCh0JemYSkTeQExKHUBjTE0fqOBMe32Ton3FrgsBQgYnfEWG8D/CYq8Kf/M8VCkbGJJFc8lqVkQDmQCcQM7fqnXHCuwjCkHs6ChGmkZCZzE4cpgDeYO1XM7O/ZsTCFvLLtSo//M8cFryI9nEmJKOsYfwoTlyB7wY6gwawBCvFDoI2XXlEDFSDPui5Q6aIQc+swPRnQcV75OGRZuLc764/sFaxgIdquv/hRUsBKuKRFSdFvglt0WE/3D8iRRj+sIifUKEzvRJZrhQ/8hxv/JS5fhD5ytDpKuSuclNFSlAadjACuTw9+uS9M4d4OLlQrETrG4K1WPU402ppjn3eYzWfWoXIVpTDyIIy/lARpR5c0qHewydz8k2DCxf3RADc+BzA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5911.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(921011)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NXxtSRZ+UhuQEcCsHMcoyKzKu8u1yshii1DZrDba69EMxJdiKcm1O3ecnOjZ?= =?us-ascii?Q?inDpQa/eGiv4x0qgrszlp3O0c3WNWNQTexuI2Bs7EWzfk8QVANIZaAtqv0WF?= =?us-ascii?Q?mgOHDpij2J97fm2CItujDiV68N8QT8znMBo+E00IPCPCT3AZhAPejTsTuQC1?= =?us-ascii?Q?vPL3iIkMvwoJMtyGJ6tCCVFSY8iZsQcRd0BWoM9hIaZ2cQzSDCfetupzCKpQ?= =?us-ascii?Q?XmRL6wzY+dU5k4LRL2s8F9G1sClH1IDiiXyz8gnT+9mKpJK7HWW4xgdbNwMe?= =?us-ascii?Q?SxHLBJ3tfaIn1hMohWzCGpLHHDJW/LT06mgTZDjKsTygr5qKfZBYLRbdFnxL?= =?us-ascii?Q?qwy/9x4h5vikUWr5AFAuZntDBNgy6cWi7HxCJhKEtxgJnnNrY2OIjOlT3RPl?= =?us-ascii?Q?euRtiz8FmZfUzIidAspvrBzlvuxA5+vAjvVzpIPLa6g29gfxqk67eNr7nxCP?= =?us-ascii?Q?2+DqQ4jpedWf8XwTbIbVItYP5E3qPMGg5A/Usvf+ib7+cocGZJ+Qm3aRaGCo?= =?us-ascii?Q?64RZWGanCjQsw7m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hbfuZ?= =?us-ascii?Q?nTF2WKs+d455Qpr22TsJjSmMLP/0kIUAxwzVV/T2bSG5kxQ7FXitoNmXRhwQ?= =?us-ascii?Q?xCizhlx7n+rW5JtLgPYJimB13OvzrVryFvZ4fo1aR+uUtL3QxGWNg4n0Fxjd?= =?us-ascii?Q?ZFFgdUePiJ+yxbz2CeuRnOflRtw1Epq/2T+h/0f+RCJM48CBmv1s3dDeg0EY?= =?us-ascii?Q?uQ=3D=3D?= Content-Type: multipart/alternative; boundary="_000_MW4PR11MB59115297140DB034BD39047187222MW4PR11MB5911namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5911.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93a1dc99-d9b7-4dfc-2ecb-08dc3ce3c501 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2024 07:13:33.9695 (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: SZyPfmIDohNTdYrivDEaBOpvwulmLbYiEKXu3FwzMTmtmTUqjSO2a2Nn5+pRFCPeAqoY3btmLjCfheqF7jLP3Bpfzr4tGDmux0MEztrXVwo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6482 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 --_000_MW4PR11MB59115297140DB034BD39047187222MW4PR11MB5911namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi dpdk-dev, Can 'uint8_t reserved[1]' of 'struct rte_crypto_op' be renamed to 'uint8_t impl_opaque' for implementation specific? An implementation may use this field to hold implementation specific value to share value between dequeue and enqueue operation and crypto libra= ry/driver can also use this field to share implementation specfic value to event cryp= to adapter/application. 'struct rte_event' has 'uint8_t impl_opaque' member struct rte_event { ... uint8_t impl_opaque; /**< Implementation specific opaque value. * An implementation may use this field to hold * implementation specific value to share between * dequeue and enqueue operation. * The application should not modify this field. */ ... }; Event crypto adapter, on dequeuing the event, enqueues rte_event::event_ptr to cryptodev as rte_crypto_op and converts the dequeued crypto op to rte_ev= ent without restoring the implementation specific opaque value. By having the 'uint8_t impl_opaque' member in 'struct rte_crypto_op' as diff --git a/lib/cryptodev/rte_crypto.h b/lib/cryptodev/rte_crypto.h index dbc2700..af46ec9 100644 --- a/lib/cryptodev/rte_crypto.h +++ b/lib/cryptodev/rte_crypto.h @@ -146,10 +146,13 @@ struct rte_crypto_op { /**< TLS record */ } param1; /**< Additional per operation parameter 1. */ - uint8_t reserved[1]; - /**< Reserved bytes to fill 64 bits for - * future additions + uint8_t impl_opaque; + /**< Implementation specific opaque value. + * An implementation may use this field to hold + * implementation specific value to share between + * dequeue and enqueue operation. */ + which is untouched in library/driver and rte_event::impl_opaque field can b= e restored while enqueuing the event back to eventdev. Also crypto library/driver can use rte_crypto_op::impl_opaque field to share implementation specific opaque value to the event crypto adapter/appl= ication. I look forward to feedback on this proposal. Patch will be submitted for review once the initial feedback is received. Thank you, Ganapati --_000_MW4PR11MB59115297140DB034BD39047187222MW4PR11MB5911namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi dpdk-dev,

   Can 'uint8_t reserved[1]' of 'struct rt= e_crypto_op' be renamed

to 'uint8_t impl_opaque' for implementation specific= ?

 

An implementation may use this field to hold impleme= ntation specific

value to share value between dequeue and enqueue ope= ration and crypto library/driver

can also use this field to share implementation spec= fic value to event crypto adapter/application.

 

'struct rte_event' has 'uint8_t impl_opaque' member<= o:p>

struct rte_event {

        &nbs= p;       ...

        &nbs= p;       uint8_t impl_opaque;

        &nbs= p;       /**< Implementation specific opaq= ue value.

        &nbs= p;       * An implementation may use this fie= ld to hold

        &nbs= p;       * implementation specific value to s= hare between

        &nbs= p;       * dequeue and enqueue operation.

        &nbs= p;       * The application should not modify = this field.

        &nbs= p;       */

        &nbs= p;       ...

};

 

Event crypto adapter, on dequeuing the event, enqueu= es rte_event::event_ptr

to cryptodev as rte_crypto_op and converts the deque= ued crypto op to rte_event

without restoring the implementation specific opaque= value.

 

By having the 'uint8_t impl_opaque' member in 'struc= t rte_crypto_op' as

diff --git a/lib/cryptodev/rte_crypto.h b/lib/crypto= dev/rte_crypto.h

index dbc2700..af46ec9 100644

--- a/lib/cryptodev/rte_crypto.h

+++ b/lib/cryptodev/rte_crypto.h

@@ -146,10 +146,13 @@ struct rte_crypto_op {

        &nbs= p;            &= nbsp;          /**< TLS rec= ord */

        &nbs= p;            &= nbsp;  } param1;

        &nbs= p;            &= nbsp;  /**< Additional per operation parameter 1. */

-        &nb= sp;            =   uint8_t reserved[1];

-        &nb= sp;            =   /**< Reserved bytes to fill 64 bits for

-        &nb= sp;            =    * future additions

+        &nb= sp;            =   uint8_t impl_opaque;

+        &nb= sp;            =   /**< Implementation specific opaque value.

+        &nb= sp;            =    * An implementation may use this field to hold

+        &nb= sp;            =    * implementation specific value to share between

+        &nb= sp;            =    * dequeue and enqueue operation.

        &nbs= p;            &= nbsp;   */

+

 

which is untouched in library/driver and rte_event::= impl_opaque field can be restored

while enqueuing the event back to eventdev.

 

Also crypto library/driver can use rte_crypto_op::im= pl_opaque field to

share implementation specific opaque value to the ev= ent crypto adapter/application.

 

I look forward to feedback on this proposal. Patch w= ill be submitted

for review once the initial feedback is received.

 

Thank you,

Ganapati

--_000_MW4PR11MB59115297140DB034BD39047187222MW4PR11MB5911namp_--