numam-dpdk/devtools
Matan Azrad d014dddb2d cryptodev: support multiple cipher data-units
In cryptography, a block cipher is a deterministic algorithm operating
on fixed-length groups of bits, called blocks.

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.

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.

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.

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.

That causes applications to use single operation per data-unit even though
all the data is continuous in memory what reduces datapath performance.

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 user
can select the data-unit length for all the operations.

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.

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.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-04-16 12:43:33 +02:00
..
cocci devtools/cocci: create safer version of strlcpy script 2019-04-04 22:45:33 +02:00
build-dict.sh devtools: add checkpatch spelling dictionary builder 2020-07-31 01:09:26 +02:00
build-tags.sh config: remove default configs used with make 2020-09-08 00:11:30 +02:00
check-abi-version.sh devtools: handle internal version in symbols check 2020-05-19 19:12:18 +02:00
check-abi.sh devtools: skip removed DLB driver in ABI check 2021-04-13 11:25:56 +02:00
check-dup-includes.sh devtools: support FreeBSD 2019-07-31 00:22:33 +02:00
check-forbidden-tokens.awk devtools: fix directory filter in forbidden token check 2020-11-13 09:35:04 +01:00
check-git-log.sh switch default git branch name to main 2020-08-12 15:32:07 +02:00
check-maintainers.sh devtools: rename variables in maintainers file parsing 2020-08-07 13:02:11 +02:00
check-spdx-tag.sh build: remove Windows export symbol list 2021-04-08 17:57:33 +02:00
check-symbol-change.sh devtools: ignore internal ABI check 2020-04-25 17:01:01 +02:00
check-symbol-maps.sh build: remove Windows export symbol list 2021-04-08 17:57:33 +02:00
checkpatches.sh switch default git branch name to main 2020-08-12 15:32:07 +02:00
cocci.sh fix Mellanox copyright and SPDX tag 2020-02-13 18:47:28 +01:00
gen-abi.sh devtools: adjust verbosity of ABI check 2021-01-13 00:04:33 +01:00
get-maintainer.sh devtools: support FreeBSD 2019-07-31 00:22:33 +02:00
git-log-fixes.sh build: remove makefiles 2020-09-08 00:09:50 +02:00
libabigail.abignore cryptodev: support multiple cipher data-units 2021-04-16 12:43:33 +02:00
load-devel-config devtools: add SPDX license tag to config loader 2020-02-22 15:17:03 +01:00
test-meson-builds.sh build: alias default build as generic 2021-04-09 19:11:26 +02:00
test-null.sh eal: replace blacklist/whitelist options 2020-11-16 00:11:22 +01:00
update_version_map_abi.py build: remove Windows export symbol list 2021-04-08 17:57:33 +02:00
update-abi.sh build: replace use of old build macros 2020-10-19 22:15:44 +02:00
words-case.txt devtools: add acronyms in dictionary for commit checks 2021-03-12 07:00:11 +01:00