cryptodev: add ff_disable field in cryptodev config
Checks
Commit Message
Adding a new field, ff_disable, to allow applications to control the
features enabled on the crypto device. This would allow for efficient
usage of HW/SW offloads by disabling the features not required by the
application.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
doc/guides/rel_notes/deprecation.rst | 14 --------------
doc/guides/rel_notes/release_19_08.rst | 11 ++++++++++-
lib/librte_cryptodev/Makefile | 2 +-
lib/librte_cryptodev/meson.build | 2 +-
lib/librte_cryptodev/rte_cryptodev.h | 7 +++++++
5 files changed, 19 insertions(+), 17 deletions(-)
Comments
>
> Adding a new field, ff_disable, to allow applications to control the
> features enabled on the crypto device. This would allow for efficient
> usage of HW/SW offloads by disabling the features not required by the
> application.
>
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Hi Anoob,
>
> Adding a new field, ff_disable, to allow applications to control the
> features enabled on the crypto device. This would allow for efficient
> usage of HW/SW offloads by disabling the features not required by the
> application.
>
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
I see a compilation issue with this change.
/home/akhil/up/dpdk-next-crypto/examples/fips_validation/fips_dev_self_test.c: In function 'fips_dev_auto_test_init':
/home/akhil/up/dpdk-next-crypto/examples/fips_validation/fips_dev_self_test.c:1560:9: error: missing initializer for field 'ff_disable' of 'struct rte_cryptodev_config' [-Werror=missing-field-initializers]
struct rte_cryptodev_config conf = {rte_cryptodev_socket_id(dev_id), 1};
^~~~~~~~~~~~~~~~~~~~
In file included from /home/akhil/up/dpdk-next-crypto/examples/fips_validation/fips_dev_self_test.c:5:0:
/home/akhil/up/dpdk-next-crypto/arm64-dpaa-linuxapp-gcc/include/rte_cryptodev.h:615:11: note: 'ff_disable' declared here
uint64_t ff_disable;
^~~~~~~~~~
Please add a patch for all applications which use struct rte_cryptodev_config and set the default values of its parameters.
> ---
> doc/guides/rel_notes/deprecation.rst | 14 --------------
> doc/guides/rel_notes/release_19_08.rst | 11 ++++++++++-
> lib/librte_cryptodev/Makefile | 2 +-
> lib/librte_cryptodev/meson.build | 2 +-
> lib/librte_cryptodev/rte_cryptodev.h | 7 +++++++
> 5 files changed, 19 insertions(+), 17 deletions(-)
>
Hi Akhil,
I'll fix the issues and send a revised patch.
Thanks,
Anoob
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Akhil Goyal
> Sent: Friday, June 21, 2019 6:40 PM
> To: Anoob Joseph <anoobj@marvell.com>; Declan Doherty
> <declan.doherty@intel.com>; Fiona Trahe <fiona.trahe@intel.com>; Pablo
> de Lara <pablo.de.lara.guarch@intel.com>; dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Narayana Prasad Raju
> Athreya <pathreya@marvell.com>
> Subject: [EXT] Re: [dpdk-dev] [PATCH] cryptodev: add ff_disable field in
> cryptodev config
>
> External Email
>
> ----------------------------------------------------------------------
> Hi Anoob,
>
> >
> > Adding a new field, ff_disable, to allow applications to control the
> > features enabled on the crypto device. This would allow for efficient
> > usage of HW/SW offloads by disabling the features not required by the
> > application.
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
>
> I see a compilation issue with this change.
> /home/akhil/up/dpdk-next-
> crypto/examples/fips_validation/fips_dev_self_test.c: In function
> 'fips_dev_auto_test_init':
> /home/akhil/up/dpdk-next-
> crypto/examples/fips_validation/fips_dev_self_test.c:1560:9: error: missing
> initializer for field 'ff_disable' of 'struct rte_cryptodev_config' [-
> Werror=missing-field-initializers]
> struct rte_cryptodev_config conf = {rte_cryptodev_socket_id(dev_id), 1};
> ^~~~~~~~~~~~~~~~~~~~
> In file included from /home/akhil/up/dpdk-next-
> crypto/examples/fips_validation/fips_dev_self_test.c:5:0:
> /home/akhil/up/dpdk-next-crypto/arm64-dpaa-linuxapp-
> gcc/include/rte_cryptodev.h:615:11: note: 'ff_disable' declared here
> uint64_t ff_disable;
> ^~~~~~~~~~
>
> Please add a patch for all applications which use struct rte_cryptodev_config
> and set the default values of its parameters.
>
> > ---
> > doc/guides/rel_notes/deprecation.rst | 14 --------------
> > doc/guides/rel_notes/release_19_08.rst | 11 ++++++++++-
> > lib/librte_cryptodev/Makefile | 2 +-
> > lib/librte_cryptodev/meson.build | 2 +-
> > lib/librte_cryptodev/rte_cryptodev.h | 7 +++++++
> > 5 files changed, 19 insertions(+), 17 deletions(-)
> >
@@ -75,20 +75,6 @@ Deprecation Notices
kernel modules in DPDK. As a result users won't be able to use ``ethtool``
via ``igb`` & ``ixgbe`` anymore.
-* cryptodev: New member in ``rte_cryptodev_config`` to allow applications to
- disable features supported by the crypto device. Only the following features
- would be allowed to be disabled this way,
-
- - ``RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO``
- - ``RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO``
- - ``RTE_CRYPTODEV_FF_SECURITY``
-
- Disabling unused features would facilitate efficient usage of HW/SW offload.
-
- - Member ``uint64_t ff_disable`` in ``rte_cryptodev_config``
-
- The field would be added in v19.08.
-
* cryptodev: the ``uint8_t *data`` member of ``key`` structure in the xforms
structure (``rte_crypto_cipher_xform``, ``rte_crypto_auth_xform``, and
``rte_crypto_aead_xform``) will be changed to ``const uint8_t *data``.
@@ -99,6 +99,15 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: New member in ``rte_cryptodev_config`` to allow applications to
+ disable features supported by the crypto device. Only the following features
+ would be allowed to be disabled this way,
+
+ - ``RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO``
+ - ``RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO``
+ - ``RTE_CRYPTODEV_FF_SECURITY``
+
+ Disabling unused features would facilitate efficient usage of HW/SW offload.
Shared Library Versions
-----------------------
@@ -130,7 +139,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cfgfile.so.2
librte_cmdline.so.2
librte_compressdev.so.1
- librte_cryptodev.so.7
+ + librte_cryptodev.so.8
librte_distributor.so.1
librte_eal.so.10
librte_efd.so.1
@@ -7,7 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_cryptodev.a
# library version
-LIBABIVER := 7
+LIBABIVER := 8
# build flags
CFLAGS += -O3
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-version = 7
+version = 8
allow_experimental_apis = true
sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c')
headers = files('rte_cryptodev.h',
@@ -612,6 +612,13 @@ struct rte_cryptodev_config {
int socket_id; /**< Socket to allocate resources on */
uint16_t nb_queue_pairs;
/**< Number of queue pairs to configure on device */
+ uint64_t ff_disable;
+ /**< Feature flags to be disabled. Only the following features are
+ * allowed to be disabled,
+ * - RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO
+ * - RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO
+ * - RTE_CRYTPODEV_FF_SECURITY
+ */
};
/**