From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: declan.doherty@intel.com, akhil.goyal@nxp.com,
shally.verma@caviumnetworks.com, ravi1.kumar@amd.com,
jerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com,
fiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com
Cc: dev@dpdk.org, Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag
Date: Thu, 5 Jul 2018 03:08:02 +0100 [thread overview]
Message-ID: <20180705020805.38308-14-pablo.de.lara.guarch@intel.com> (raw)
In-Reply-To: <20180705020805.38308-1-pablo.de.lara.guarch@intel.com>
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.
Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/cryptodevs/features/aesni_gcm.ini | 3 +-
doc/guides/cryptodevs/features/default.ini | 6 +++-
doc/guides/cryptodevs/features/dpaa2_sec.ini | 6 +++-
doc/guides/cryptodevs/features/dpaa_sec.ini | 6 +++-
doc/guides/cryptodevs/features/null.ini | 2 +-
doc/guides/cryptodevs/features/openssl.ini | 3 +-
doc/guides/cryptodevs/features/qat.ini | 6 +++-
doc/guides/cryptodevs/overview.rst | 32 ++++++++++++++-----
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 8 +++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 3 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 3 +-
drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++---------
test/test/test_cryptodev.c | 31 +++++++++++++------
test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
20 files changed, 157 insertions(+), 53 deletions(-)
diff --git a/doc/guides/cryptodevs/features/aesni_gcm.ini b/doc/guides/cryptodevs/features/aesni_gcm.ini
index 920b6b6ac..65811e2fe 100644
--- a/doc/guides/cryptodevs/features/aesni_gcm.ini
+++ b/doc/guides/cryptodevs/features/aesni_gcm.ini
@@ -10,7 +10,8 @@ CPU AESNI = Y
CPU SSE = Y
CPU AVX = Y
CPU AVX2 = Y
-Mbuf scatter gather = Y
+OOP SGL In FB Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'aesni_gcm' crypto driver.
;
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 42783887a..82efe3e31 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -18,7 +18,11 @@ CPU AVX512 =
CPU AESNI =
CPU NEON =
CPU ARM CE =
-Mbuf scatter gather =
+In Place SGL =
+OOP SGL In SGL Out =
+OOP SGL In FB Out =
+OOP FB In SGL Out =
+OOP FB In FB Out =
;
; Supported crypto algorithms of a default crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa2_sec.ini b/doc/guides/cryptodevs/features/dpaa2_sec.ini
index 68c9960d8..5f23fde51 100644
--- a/doc/guides/cryptodevs/features/dpaa2_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa2_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
Protocol offload = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'dpaa2_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini
index 260fae728..521faeab6 100644
--- a/doc/guides/cryptodevs/features/dpaa_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
Protocol offload = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'dpaa_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/null.ini b/doc/guides/cryptodevs/features/null.ini
index a9e172da8..ecf5779ac 100644
--- a/doc/guides/cryptodevs/features/null.ini
+++ b/doc/guides/cryptodevs/features/null.ini
@@ -6,7 +6,7 @@
[Features]
Symmetric crypto = Y
Sym operation chaining = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
;
; Supported crypto algorithms of the 'null' crypto driver.
diff --git a/doc/guides/cryptodevs/features/openssl.ini b/doc/guides/cryptodevs/features/openssl.ini
index 691565865..5f03166b9 100644
--- a/doc/guides/cryptodevs/features/openssl.ini
+++ b/doc/guides/cryptodevs/features/openssl.ini
@@ -6,7 +6,8 @@
[Features]
Symmetric crypto = Y
Sym operation chaining = Y
-Mbuf scatter gather = Y
+OOP SGL In FB Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'openssl' crypto driver.
diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 51ed5967f..ccfc042c6 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -7,7 +7,11 @@
Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'qat' crypto driver.
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index 493cd5f55..cc9c0f5a6 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -11,14 +11,30 @@ Supported Feature Flags
.. include:: overview_feature_table.txt
-Note, the mbuf scatter gather feature (aka chained mbufs, scatter-gather-lists
-or SGLs) indicate all following combinations are supported unless otherwise called
-out in the Limitations section of each PMD.
-
-* In place operation, input buffer as multiple segments, same buffer used for output
-* Out of place operation, input buffer as single segment and output as multiple segments
-* Out of place operation, input buffer as multiple segments and output as single segment
-* Out of place operation, input buffer as multiple segments and output as multiple segments
+.. Note::
+
+ - "In Place SGL" feature flag stands for "In place Scatter-gather list",
+ which means that an input mbuf can consist of multiple segments,
+ being the operation in-place (input = output).
+
+ - "OOP SGL In SGL Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+ which means that the input and output mbufs can consist of multiple segments.
+
+ - "OOP SGL In FB Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
+ which means that the input mbuf can consist of multiple segments combined
+ with a single segment mbuf in the output.
+
+ - "OOP FB In SGL Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that the output mbuf can consist of multiple segments combined
+ with a single segment mbuf in the input.
+
+ - "OOP FB In FB Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that Out-of-place operation is supported,
+ with single segment input and output mbufs.
Supported Cipher Algorithms
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..9cf3ea3df 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..ce740e97a 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,8 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..1dd8dab83 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..49ff7584e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..865f8a75e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,8 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..33ac831fe 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..608db36c7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+ return "IN_PLACE_SGL";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT:
+ return "OOP_SGL_IN_FB_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT:
+ return "OOP_FB_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT:
+ return "OOP_FB_IN_FB_OUT";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..7942527e8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
*
* Keep these flags synchronised with rte_cryptodev_get_feature_name()
*/
-#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
+#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
/**< Symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
+#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
/**< Asymmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
+#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
/**< Chaining symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
+#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
/**< Utilises CPU SIMD SSE instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
+#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
/**< Utilises CPU SIMD AVX instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
+#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
/**< Utilises CPU SIMD AVX2 instructions */
-#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
+#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
/**< Utilises CPU AES-NI instructions */
-#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
+#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT (1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT (1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT (1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..e23eecb66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
return 0;
}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
- return -ENOTSUP;
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..712771605 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+ uint64_t feat_flags = dev_info.feature_flags;
+ uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
+
+ if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+ if (!(feat_flags & oop_flag)) {
+ printf("Device doesn't support out-of-place "
+ "scatter-gather in input mbuf. "
+ "Test Skipped.\n");
+ return 0;
+ }
+ } else {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place "
+ "scatter-gather mbufs. "
"Test Skipped.\n");
- return 0;
+ return 0;
+ }
}
+
nb_segs = 3;
}
--
2.14.4
next prev parent reply other threads:[~2018-07-05 10:14 UTC|newest]
Thread overview: 135+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-21 12:43 ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-21 13:03 ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
2018-06-12 11:37 ` Tomasz Duszynski
2018-06-12 13:53 ` De Lara Guarch, Pablo
2018-06-13 6:11 ` Tomasz Duszynski
2018-06-13 8:23 ` De Lara Guarch, Pablo
2018-06-13 10:11 ` Tomasz Duszynski
2018-06-19 13:20 ` Trahe, Fiona
2018-06-25 16:42 ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-21 12:50 ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
2018-06-21 12:59 ` Akhil Goyal
2018-06-22 17:02 ` Verma, Shally
2018-06-25 16:40 ` De Lara Guarch, Pablo
2018-06-26 5:28 ` Verma, Shally
2018-06-26 8:17 ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-18 6:29 ` Akhil Goyal
2018-06-25 16:43 ` De Lara Guarch, Pablo
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 04/15] test/crypto: " Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: " Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29 8:02 ` Tomasz Duszynski
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric " Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04 12:13 ` Akhil Goyal
2018-07-04 12:15 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
2018-07-04 12:21 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04 12:04 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04 12:30 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04 12:40 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29 8:04 ` Tomasz Duszynski
2018-07-02 10:58 ` De Lara Guarch, Pablo
2018-07-04 12:42 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04 11:29 ` Akhil Goyal
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-28 0:53 ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 11:31 ` Akhil Goyal
2018-06-28 0:53 ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 12:57 ` Akhil Goyal
2018-07-04 15:53 ` De Lara Guarch, Pablo
2018-06-28 0:53 ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04 11:33 ` Akhil Goyal
2018-06-28 0:53 ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04 11:36 ` Akhil Goyal
2018-06-28 0:53 ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-06-28 13:40 ` Verma, Shally
2018-06-28 14:15 ` De Lara Guarch, Pablo
2018-07-04 12:27 ` Akhil Goyal
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 04/16] test/crypto: " Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
2018-07-05 11:27 ` Verma, Shally
2018-07-05 11:30 ` Akhil Goyal
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-09 10:53 ` De Lara Guarch, Pablo
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-05 2:08 ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-05 2:08 ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-05 2:08 ` Pablo de Lara [this message]
2018-07-05 11:35 ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Akhil Goyal
2018-07-05 2:08 ` [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-05 2:08 ` [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-05 2:08 ` [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 04/16] test/crypto: " Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-10 10:42 ` Tomasz Duszynski
2018-07-10 10:45 ` De Lara Guarch, Pablo
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-10 8:46 ` Akhil Goyal
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-10 0:36 ` [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10 11:00 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180705020805.38308-14-pablo.de.lara.guarch@intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jianjay.zhou@huawei.com \
--cc=ravi1.kumar@amd.com \
--cc=roy.fan.zhang@intel.com \
--cc=shally.verma@caviumnetworks.com \
--cc=tdu@semihalf.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).