Skip to contentSkip to conversation

examples/l2fwd-crypto: support cipher multiple data-unit

PATCH Superseded Matan Azrad 2 participants 3 messages Apr 26, 2021 – Jul 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/l2fwd-crypto: support cipher multiple data-unit

Patch [1] added a new API to support multiple data-units in cipher operations.

Add a support for this API:
- Add a new command-line argument to provide the data-unit length.
- Set the length in the cipher xform.
- Validate device capabilities for this feature.
- Pad the AES-XTS operation length to be aligned to the defined data-unit.

[1]: commit d014dddb2d69 ("cryptodev: support multiple cipher data-units")

---
 .../sample_app_ug/l2_forward_crypto.rst       |  7 ++-
 examples/l2fwd-crypto/main.c                  | 61 +++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/l2_forward_crypto.rst +5 -2
index e2c0f9f1ec..cc772aaec4 100644
@@ -41,8 +41,9 @@ The application requires a number of command line options:
 
     ./<build_dir>/examples/dpdk-l2fwd-crypto [EAL options] -- [-p PORTMASK] [-q NQ] [-s] [-T PERIOD] /
     [--cdev_type HW/SW/ANY] [--chain HASH_CIPHER/CIPHER_HASH/CIPHER_ONLY/HASH_ONLY/AEAD] /
-    [--cipher_algo ALGO] [--cipher_op ENCRYPT/DECRYPT] [--cipher_key KEY] /
-    [--cipher_key_random_size SIZE] [--cipher_iv IV] [--cipher_iv_random_size SIZE] /
+    [--cipher_algo ALGO] [--cipher_op ENCRYPT/DECRYPT] [--cipher_dataunit_len SIZE] /
+    [--cipher_key KEY] [--cipher_key_random_size SIZE] [--cipher_iv IV] /
+    [--cipher_iv_random_size SIZE] /
     [--auth_algo ALGO] [--auth_op GENERATE/VERIFY] [--auth_key KEY] /
     [--auth_key_random_size SIZE] [--auth_iv IV] [--auth_iv_random_size SIZE] /
     [--aead_algo ALGO] [--aead_op ENCRYPT/DECRYPT] [--aead_key KEY] /
@@ -81,6 +82,8 @@ where,
 
     (default is ENCRYPT)
 
+*   cipher_dataunit_len: set the length of the cipher data-unit.
+
 *   cipher_key: set the ciphering key to be used. Bytes has to be separated with ":"
 
 *   cipher_key_random_size: set the size of the ciphering key,
examples/l2fwd-crypto/main.c +61 -0

115 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 examples/l2fwd-crypto: support cipher multiple data-unit

The support for multiple data-units includes the next:
- Add a new command-line argument to provide the data-unit length.
- Set the length in the cipher xform.
- Validate device capabilities for this feature.
- Pad the AES-XTS operation length to be aligned to the defined data-unit.

---

v2: remove the feature patch reference.

 .../sample_app_ug/l2_forward_crypto.rst       |  7 ++-
 examples/l2fwd-crypto/main.c                  | 61 +++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/l2_forward_crypto.rst +5 -2
index e2c0f9f1ec..cc772aaec4 100644
@@ -41,8 +41,9 @@ The application requires a number of command line options:
 
     ./<build_dir>/examples/dpdk-l2fwd-crypto [EAL options] -- [-p PORTMASK] [-q NQ] [-s] [-T PERIOD] /
     [--cdev_type HW/SW/ANY] [--chain HASH_CIPHER/CIPHER_HASH/CIPHER_ONLY/HASH_ONLY/AEAD] /
-    [--cipher_algo ALGO] [--cipher_op ENCRYPT/DECRYPT] [--cipher_key KEY] /
-    [--cipher_key_random_size SIZE] [--cipher_iv IV] [--cipher_iv_random_size SIZE] /
+    [--cipher_algo ALGO] [--cipher_op ENCRYPT/DECRYPT] [--cipher_dataunit_len SIZE] /
+    [--cipher_key KEY] [--cipher_key_random_size SIZE] [--cipher_iv IV] /
+    [--cipher_iv_random_size SIZE] /
     [--auth_algo ALGO] [--auth_op GENERATE/VERIFY] [--auth_key KEY] /
     [--auth_key_random_size SIZE] [--auth_iv IV] [--auth_iv_random_size SIZE] /
     [--aead_algo ALGO] [--aead_op ENCRYPT/DECRYPT] [--aead_key KEY] /
@@ -81,6 +82,8 @@ where,
 
     (default is ENCRYPT)
 
+*   cipher_dataunit_len: set the length of the cipher data-unit.
+
 *   cipher_key: set the ciphering key to be used. Bytes has to be separated with ":"
 
 *   cipher_key_random_size: set the size of the ciphering key,
examples/l2fwd-crypto/main.c +61 -0

115 lines not on this page · raw message

Signature · 1 line
2.25.1
Acked-by on v2 1/1 Applied
#2 lore raw
Quoted 8 lines

The support for multiple data-units includes the next:
- Add a new command-line argument to provide the data-unit length.
- Set the length in the cipher xform.
- Validate device capabilities for this feature.
- Pad the AES-XTS operation length to be aligned to the defined data-unit.

---

Applied to dpdk-next-crypto

Thanks