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 A7F21A0A0C; Thu, 15 Apr 2021 10:35:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24A08162122; Thu, 15 Apr 2021 10:35:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 38171162122 for ; Thu, 15 Apr 2021 10:35:14 +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 13F8PJ6Z028620; Thu, 15 Apr 2021 01:35:06 -0700 Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2055.outbound.protection.outlook.com [104.47.36.55]) by mx0b-0016f401.pphosted.com with ESMTP id 37wqtm4wbu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Apr 2021 01:35:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfnUN7pyyTLsdx0nQ/Xn6DwEJBh5Bl4EO2++K3Elu5r1D2BmfES2pfCQWFgBTaMCuLTbepYZV0xCW6A7DxdamprfmiGcZ6/U8/2ZYHP48CbgxAAvU081Rn6BW+FWi7tP2tKaKd7f+2A+MV3JH+IkqLGFa6r6OYIo8kLRKlpHSJphvlqRtUzk/f5UwTJwggCMf1QGaoRURQq+ol1+RUYHkAWpEGJ/KZspQxPDwbRKHtZRGGH+D/a6Ng29LXd8fiuk7djwL/QycirvS5KEqeUNNE7v+4H1Hrfd6znnqtY9LJM7ymwgmxKEsff4KCvsa5tAKRrb2Hk2cCp74SPNY08LCw== 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=3Su7nqjzc0CuzI7dVBLj87y6OYm1XJy5VhBEgPsWQrI=; b=kfd7FhIN3ze21uelwAYYuawx8TTBnxRlfuWgFg8TpxiG0tt6vUUOqSUmOUykeH2hJrw4FIx9pOQHR3Sk1+aRHyHhtkUwsSsgxpelkXH0vpzyRZ5ALh9AnB4W9ZaVBMM6SNsFJBtNYwUb5dhZoenX1M9SUP/3SotJPIsOe6dqsVoePCJ0z039mltt+JA8OaeOSTpSZWAUxqvtV8O976W5zMw9lVU1q6vfaeV5NcgF7t4hAHuAhW/WR7ULizV4rybpSxK8tlp59qgv3C3QBfub3xjjETy0eVAV70WwVqQvWaz+Ws8hiOGD9NEhBixh4K8UzoCC5pDHeBYw9Iud/fYn4A== 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=3Su7nqjzc0CuzI7dVBLj87y6OYm1XJy5VhBEgPsWQrI=; b=Kv2b+FMbFAZIggCJdFEyu2BrUpToeG6UbLXUikwiAV612qB32MUR2gWuJUP66H2bXLXnUqfXAfoX3/e87Ye4/rHi6Pxp6rgRX3KOcODz1c1qqhRUGvv7R/ElR4TYgd7iVDsO8fqwEa+/Pqia5iZYpX0+weRRTLKr08rWTZ3+CBo= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by MW2PR18MB2201.namprd18.prod.outlook.com (2603:10b6:907:e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 08:35:04 +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.018; Thu, 15 Apr 2021 08:35:04 +0000 From: Akhil Goyal To: Thomas Monjalon , "dev@dpdk.org" CC: "matan@nvidia.com" , Ray Kinsella , Neil Horman , Declan Doherty Thread-Topic: [EXT] [dpdk-dev] [PATCH v5] cryptodev: support multiple cipher data-units Thread-Index: AQHXMWvfEBAK3h3cdk60BmyzufrfVKq1QW4A Date: Thu, 15 Apr 2021 08:35:03 +0000 Message-ID: References: <1612449252-395208-1-git-send-email-matan@nvidia.com> <20210414202159.1075118-1-thomas@monjalon.net> In-Reply-To: <20210414202159.1075118-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: 0c23059d-1431-42e1-5963-08d8ffe95ddd x-ms-traffictypediagnostic: MW2PR18MB2201: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: v+bo7QpxFvGQ6iLNoSWuznQlqnHaMbCWlWbL6wlgkq8lKJrdHdVHCM7PCwf+KstsHslevX5hkE5OCNcZmR3E+jONpZWRRCn4j3Uv75MymjCGLKhOZ3ser1y+f71JRWcDgcvVBhBInU7kAPuuUBdtmsDiSRCMrnWfj+BIhXPGpln+kYx7fxNbpiaaYFRWTiC9ZA3O+NRCkrgdopfLc34hoBWHiACW7jU4q7SOehZmNI9MGNUGIxZ9Zk54lBMPjuw3RrneMabcXT0qD3J4s0S55nStpr6hQbkv9/b6I8NLP6n3SlCZMiNtvzVWYW3aDpW2+GgXjO6uZPPc59S8pC97AJj3YYHEzoBYFQ/f7pyVUHD7pgOE0mGlXPKHdygB7I6ji0gE2Ul+69k0HSNyaoGsY9bfGFakW6UvP5CAiYs906Gl3M3vPqlp16qQ8O5/JKdZ5goAUMmMYXf7vA1sbkmowNGeXOYHCR9PlRmg3fQspcXGRFf9bBHLLzVQgDANYEX2gHnYX5ukwK8G3yh1D34wzIL7l+8ekTFMe+wmnLMlRW85W5EIBoB27WfwPoLJB8UKJoa32A+AG1Tt9vA8H5jVd26jtXmkfTKXySJr05IkPFI= 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)(376002)(39860400002)(366004)(136003)(346002)(396003)(55016002)(8936002)(52536014)(8676002)(7696005)(76116006)(64756008)(66556008)(316002)(66946007)(66446008)(2906002)(110136005)(54906003)(86362001)(9686003)(186003)(83380400001)(66476007)(5660300002)(6506007)(478600001)(71200400001)(33656002)(122000001)(4326008)(26005)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?YmhqjQL0neneajkdbGb//K+7nEvM8KNb/m/QQwIycv0nAnq3gyvhlCxhIuiR?= =?us-ascii?Q?NDTW3N7y1/nvjeZZiiRryRjL/0Hs/kKwR3Kd+OAWwq+tRAjgC//eQBAVWCnu?= =?us-ascii?Q?fCUy8LNsQZqHtdLg5epTxXnzt9cZSMGKeGlDsLOhIHqWvgS6Vnj4C7m+mz5M?= =?us-ascii?Q?Jvw6rFQwEYSInTu5FG1cUjXR2cvN3A40MnTe1FCgej+g2LWt7TGZgUH+D+kT?= =?us-ascii?Q?9XXbc5o0595WV/MgtsnLf6U9fqGLp0j0EdeTg0OL/Vy6bBvARqSWJXQR/JgI?= =?us-ascii?Q?zYXo+CT4W3XK5xdmkH7tza4kzV++n+4KanYwK5iA8IJdUokNJb3LPPTcquBt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7WUiTjM5XTSth2s5Y9arGWRRGrNUvPaR4?= =?us-ascii?Q?MaZIfhnvNs9IMD3D3bYD6vjLUay0v/a1JvjehmteBxdyx1Lcba/Zbqqcdq7l?= =?us-ascii?Q?m1s=3D?= x-ms-exchange-transport-forked: True 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: 0c23059d-1431-42e1-5963-08d8ffe95ddd X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 08:35:03.8776 (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: VZmD/zBdA7gIBWbAvWC7/rYbWPVRm942YH2RQM1UrUHFAj6DNPHgIbRgmoilTHOJefU/V/Wx0Xp2zEPHWQhcYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR18MB2201 X-Proofpoint-ORIG-GUID: LGDecXzpKmSi0PkeKDZMCiZ-FLQWdhnr X-Proofpoint-GUID: LGDecXzpKmSi0PkeKDZMCiZ-FLQWdhnr X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-15_03:2021-04-15, 2021-04-15 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v5] 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" > From: Matan Azrad >=20 > In cryptography, a block cipher is a deterministic algorithm operating > on fixed-length groups of bits, called blocks. >=20 > A block cipher consists of two paired algorithms, one for encryption > and the other for decryption. Both algorithms accept two inputs: > an input block of size n bits and a key of size k bits; and both yield > an n-bit output block. The decryption algorithm is defined to be the > inverse function of the encryption. >=20 > For AES standard the block size is 16 bytes. > For AES in XTS mode, the data to be encrypted\decrypted does not have to > be multiple of 16B size, the unit of data is called data-unit. > The data-unit size can be any size in range [16B, 2^24B], so, in this > case, a data stream is divided into N amount of equal data-units and > must be encrypted\decrypted in the same data-unit resolution. >=20 > For ABI compatibility reason, the size is limited to 64K (16-bit field). > The new field dataunit_len is inserted in a struct padding hole, > which is only 2 bytes long in 32-bit build. > It could be moved and extended later during an ABI-breakage window. >=20 > The current cryptodev API doesn't allow the user to select a specific > data-unit length supported by the devices. > In addition, there is no definition how the IV is detected per data-unit > when single operation includes more than one data-unit. >=20 > That causes applications to use single operation per data-unit even thoug= h > all the data is continuous in memory what reduces datapath performance. >=20 > Add a new feature flag to support multiple data-unit sizes, called > RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS. > Add a new field in cipher capability, called dataunit_set, > where the devices can report the range of the supported data-unit sizes. > Add a new cipher transformation field, called dataunit_len, where the use= r > can select the data-unit length for all the operations. >=20 > All the new fields do not change the size of their structures, > by filling some struct padding holes. > They are added as exceptions in the ABI check file libabigail.abignore. >=20 > Using a bitmap to report the supported data-unit sizes capability allows > the devices to report a range simply as same as the user to read it > simply. also, thus sizes are usually common and probably will be shared > among different devices. >=20 > Signed-off-by: Matan Azrad > Signed-off-by: Thomas Monjalon > --- Acked-by: Akhil Goyal