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 7962DA0562; Wed, 14 Apr 2021 20:37:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0025F161C63; Wed, 14 Apr 2021 20:37:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id AC692161C5E for ; Wed, 14 Apr 2021 20:37:24 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13EIQE33022900; Wed, 14 Apr 2021 11:37:21 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by mx0b-0016f401.pphosted.com with ESMTP id 37wqtm2vq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 11:37:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J78YsmvGSJIHjrCWaPlEGFpEK1OACeA9/erAPSYxKgLP+vbi6WvOEjbOKIe/utPjaurPt6Wamx+3Ga5yf2ZnK1HnLqI/BF1TEmdsrkpEb/44wQsH9QiIfM4gTEvvdWILSo05oqFUC8FtQkmN+uaQZZPH6Fbat76Tqg+KCnaWuVa8ZcZIL53qaqihjSYiws7rFGZIb3G4/n8BTCvs9ZNfbkQ+2P6S2PiO2JJCy8uxC6uAuazPJCtfcmKru2cwhU0gB/pjArjNCD0gFY5zMGbo4Jb1UagyoUlRqEPL0L2vsHufZBKCCH3GcsTPZ2VvInuKd8BQKNBaTEEP4tes3z6CsQ== 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-SenderADCheck; bh=x8E6r7a+4PQGCp+qGDu4rjB+000iE3Z7cpqz0886WSU=; b=njJQ5B9ks4TR8XjjcGIXMfwf9hDfV08Uq2MyVnVLGK5ttOvIdW9xxdVn0hWUypyV9ZVv0yLC+4+V3BYjLvPP2lB/RDs3rnRAeykxZcE+3En4H+ZZrv5Gdxvqt9yvnTyOWWJpngQ6Or08MPrKOvlc8EMn2UeAtt6iejqnT4m3VGXvYEzzmpdvpAtwraaYrNx59vyHvq8/CsTQP5d/znSZjvg7G6xTn98FTV1ilWT72wZ2gO3VPsnS7U6WU9OJT5VCNayunCIozK/L34uA9HaGYWAMz8ytvC8nzWjGMuoIFXz13+qPhF7+KE6VM3CrOvJMOsBhRB6MYTyLacarDncH+A== 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=x8E6r7a+4PQGCp+qGDu4rjB+000iE3Z7cpqz0886WSU=; b=XWXLySf4nWXaW2NXIGxU3Nglq1vX67DL/bQTtjK82FXaato2BeBzbqZqeKKGxSsUGDsWdw7Oaor0xpnURCPnv9PLrBXK+gSYuMEL9scQ4n+fmXN9Ufzopt7qngWRsPKai1CmJpqZDQdseUFnsr2utXNaLMk0fFblffAEYRT1vc8= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by CO6PR18MB3971.namprd18.prod.outlook.com (2603:10b6:5:34a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Wed, 14 Apr 2021 18:37:18 +0000 Received: from MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f]) by MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f%7]) with mapi id 15.20.4042.016; Wed, 14 Apr 2021 18:37:18 +0000 From: Akhil Goyal To: Thomas Monjalon , "dev@dpdk.org" CC: "arkadiuszx.kusztal@intel.com" , Anoob Joseph , Matan Azrad , Ray Kinsella , Neil Horman , Declan Doherty Thread-Topic: [EXT] [dpdk-dev] [PATCH v4] cryptodev: support multiple cipher data-units Thread-Index: AQHXMKWi35DEzMdbP0ygc1kxg4Ofoaq0V1iA Date: Wed, 14 Apr 2021 18:37:18 +0000 Message-ID: References: <1612449252-395208-1-git-send-email-matan@nvidia.com> <20210413204250.3989341-1-thomas@monjalon.net> In-Reply-To: <20210413204250.3989341-1-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=marvell.com; x-originating-ip: [182.69.47.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f213fe58-9c4a-4d74-9e39-08d8ff745563 x-ms-traffictypediagnostic: CO6PR18MB3971: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1w2hae21r4UlueJqQTHg/7jNKDZMAIrfhSH04MliuI1T1PUD++0StB7NV2h4kR2uGTwv/C6NWeaw4/moNq0tPuN0LhlkCiSXTqtk11oenW5fHOxtcyhgHaAlGdwZi2lePdHnAV6T/hW7J27I5qN+pPrDKa6WToDAjG4AyE+e3r3YdkI9RrS7UJ0IxOa18ENXDoD11f8Vw207UW6xVK/+0FiGeUXG0z4L7r0+nJG4eZetxv7pneSkPVV5BwRcrS4n1Vfdy+RxUvVyvw9zA7PaSILl6UpGdMAtTuKYLubiQNJhkMjI/Hr+c0nHe90+s3ztHTB31Oqu05rGRA4HHGBt6eDZSDDpvuL0o+AfDcVWxibc+wU8A4PB7bI0OBdBRb0d6hx+cb/vHdSZ/6vyuS8f+g7fjKAn5ebOhwGtZ7piak0Suxja7yZ3NC5e//h06fXQX5JrgliJQ491IxwMpztZZPkNiXuyXW/mh7eqnlFUbUpUk6ycDgq+ceFKco+yjUtFYQ932xVBB0GPHREjVbSXSDLzKz925VsUbzedK7qbztS0lxR5YZyIeOrT6bfObysWJB1h2t2t/VYALwT6paN7SUtKKeDOKasPXeWFPpwUyss= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2284.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(39860400002)(346002)(366004)(376002)(478600001)(7696005)(52536014)(6506007)(26005)(4326008)(8676002)(76116006)(54906003)(66946007)(66556008)(64756008)(66446008)(8936002)(66476007)(5660300002)(122000001)(71200400001)(110136005)(83380400001)(33656002)(38100700002)(186003)(86362001)(9686003)(55016002)(2906002)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/0gkLJYmUJtBifxI/q1l5a0lTGW3roi7vxNAj1NJAHW8eIGixawk1ewyiYQ2?= =?us-ascii?Q?tU1nQjDaOvxi9FzDVTzQVLfE2UDMkwOsBnt8yM/XOKdkz6amEBrlzyKMGrjj?= =?us-ascii?Q?NObyXC44D3cT+JvwD3JoZjjYu3ReJTy1Mqsq4MSX/11HZR46QLTygquERnZE?= =?us-ascii?Q?4LYaApYu5GfblIKCilIQRTUhg12CoDlCK4VMZL8mEx3UwpFvmRre+YiOg+wU?= =?us-ascii?Q?941uYhuNMAuEatf+yFrQJvwEiS0J+Goht0bTsY677m1rA8A2JmZC6IlocQyO?= =?us-ascii?Q?0Qa1YWfsewXopYUW2AP1eNCPBH7U/JRKyt32q8t4VRaudU7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jriQdEG7/4XGSgms2FUtK18qFOpfzgzPLwB?= =?us-ascii?Q?xW5wwrAT8apYDjtHRJssE6oLHjdMNxuyXqcptbslHDCJrKSMydrIr0kKbasC?= =?us-ascii?Q?iFI=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: MW2PR18MB2284.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f213fe58-9c4a-4d74-9e39-08d8ff745563 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 18:37:18.5686 (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: s3MnZsOIo3l8u1AwSAvQnCYeHfaj8255XFiwqdWv9E5OvXnH5v+B9phZLs09KdH9ZG9qdm9d57N0XikuwvVgYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB3971 X-Proofpoint-ORIG-GUID: scyGrg90ERhHjmlYqMGSTG5AiUPlpeGt X-Proofpoint-GUID: scyGrg90ERhHjmlYqMGSTG5AiUPlpeGt X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-14_10:2021-04-14, 2021-04-14 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v4] cryptodev: support multiple cipher data-units 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 Thomas, > + RTE_STD_C11 > + union { /* temporary anonymous union for ABI compatibility */ > + > struct { > const uint8_t *data; /**< pointer to key data */ > uint16_t length; /**< key length in bytes */ > @@ -222,6 +225,27 @@ struct rte_crypto_cipher_xform { > * - Each key can be either 128 bits (16 bytes) or 256 bits (32 bytes)= . > * - Both keys must have the same size. > **/ > + > + RTE_STD_C11 > + struct { /* temporary anonymous struct for ABI compatibility */ > + const uint8_t *_key_data; /* reserved for key.data union */ > + uint16_t _key_length; /* reserved for key.length union */ > + /* next field can fill the padding hole */ > + > + uint16_t dataunit_len; > + /**< When RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS is > enabled, > + * this is the data-unit length of the algorithm, > + * otherwise or when the value is 0, use the operation length. > + * The value should be in the range defined by the dataunit_set field > + * in the cipher capability. > + * > + * - For AES-XTS it is the size of data-unit, from IEEE Std 1619-2007. > + * For-each data-unit in the operation, the tweak (IV) value is > + * assigned consecutively starting from the operation assigned IV. > + */ > + > + }; }; /* temporary struct nested in union for ABI compatibility */ > + Can we add a deprecation notice also in this patch to remove these temporar= y Struct and union, so that we remember to remove them in 21.11 > +/** > + * Data-unit supported lengths of cipher algorithms. > + * A bit can represent any set of data-unit sizes > + * (single size, multiple size, range, etc). > + */ > +#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_512_BYTES (1 << 0) > +#define RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_4096_BYTES (1 << 1) > + > /** > * Symmetric Crypto Capability > */ > @@ -127,6 +135,11 @@ struct rte_cryptodev_symmetric_capability { > /**< cipher key size range */ > struct rte_crypto_param_range iv_size; > /**< Initialisation vector data size range */ > + uint32_t dataunit_set; > + /**< > + * A bitmap for a set of the supported data-unit > lengths. Add reference to the newly created macros here > + * 0 for any length defined in the algorithm standard. > + */