* [dpdk-dev] [PATCH v2 1/4] cryptodev: remove obsolete include
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
@ 2017-07-12 19:58 ` Jan Blunck
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 2/4] cryptodev: move initialization Jan Blunck
` (8 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: Jan Blunck @ 2017-07-12 19:58 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_cryptodev/rte_cryptodev.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 1d975e5f9..2048d6e29 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -49,7 +49,6 @@ extern "C" {
#include "rte_crypto.h"
#include "rte_dev.h"
#include <rte_common.h>
-#include <rte_vdev.h>
extern const char **rte_cyptodev_names;
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v2 2/4] cryptodev: move initialization
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
@ 2017-07-12 19:58 ` Jan Blunck
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h Jan Blunck
` (7 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: Jan Blunck @ 2017-07-12 19:58 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/rte_cryptodev.c | 3 +++
lib/librte_cryptodev/rte_cryptodev_pmd.c | 6 ------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8ee5d47a9..09e4671be 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -587,6 +587,9 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id)
cryptodev->data->socket_id = socket_id;
cryptodev->data->dev_started = 0;
+ /* init user callbacks */
+ TAILQ_INIT(&(cryptodev->link_intr_cbs));
+
cryptodev->attached = RTE_CRYPTODEV_ATTACHED;
cryptodev_globals.nb_devs++;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faadcf..ec6eeffa1 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -101,9 +101,6 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
cryptodev->device = &vdev->device;
- /* initialise user call-back tail queue */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
return cryptodev;
}
@@ -188,9 +185,6 @@ rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
cryptodev->device = &pci_dev->device;
- /* init user callbacks */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
/* Invoke PMD device initialization function */
RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
retval = dev_init(cryptodev);
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 2/4] cryptodev: move initialization Jan Blunck
@ 2017-07-12 19:58 ` Jan Blunck
2017-07-15 11:04 ` De Lara Guarch, Pablo
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
` (6 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-07-12 19:58 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
By moving the helper to the header we don't require rte_vdev.h at
build-time of the librte_cryptodev library. This is a preparation to
move the vdev bus into a standalone library.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/rte_cryptodev_pmd.c | 29 --------------------------
lib/librte_cryptodev/rte_cryptodev_vdev.h | 29 ++++++++++++++++++++++++--
lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
3 files changed, 27 insertions(+), 32 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index ec6eeffa1..eaeddf74b 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -75,35 +75,6 @@ rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
return 0;
}
-struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
- int socket_id, struct rte_vdev_device *vdev)
-{
- struct rte_cryptodev *cryptodev;
-
- /* allocate device structure */
- cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
- if (cryptodev == NULL)
- return NULL;
-
- /* allocate private device structure */
- if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
- cryptodev->data->dev_private =
- rte_zmalloc_socket("cryptodev device private",
- dev_private_size,
- RTE_CACHE_LINE_SIZE,
- socket_id);
-
- if (cryptodev->data->dev_private == NULL)
- rte_panic("Cannot allocate memzone for private device"
- " data");
- }
-
- cryptodev->device = &vdev->device;
-
- return cryptodev;
-}
-
int
rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
const char *input_args)
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index 94ab9d33d..04d0796d4 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -78,9 +78,34 @@ struct rte_crypto_vdev_init_params {
* - Cryptodev pointer if device is successfully created.
* - NULL if device cannot be created.
*/
-struct rte_cryptodev *
+static inline struct rte_cryptodev *
rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
- int socket_id, struct rte_vdev_device *vdev);
+ int socket_id, struct rte_vdev_device *dev)
+{
+ struct rte_cryptodev *cryptodev;
+
+ /* allocate device structure */
+ cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
+ if (cryptodev == NULL)
+ return NULL;
+
+ /* allocate private device structure */
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ cryptodev->data->dev_private =
+ rte_zmalloc_socket("cryptodev device private",
+ dev_private_size,
+ RTE_CACHE_LINE_SIZE,
+ socket_id);
+
+ if (cryptodev->data->dev_private == NULL)
+ rte_panic("Cannot allocate memzone for private device"
+ " data");
+ }
+
+ cryptodev->device = &dev->device;
+
+ return cryptodev;
+}
/**
* @internal
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e9ba88ac5..abdbbdada 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -74,7 +74,6 @@ DPDK_17.08 {
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
rte_cryptodev_vdev_parse_init_params;
- rte_cryptodev_vdev_pmd_init;
rte_crypto_aead_algorithm_strings;
rte_crypto_aead_operation_strings;
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h Jan Blunck
@ 2017-07-15 11:04 ` De Lara Guarch, Pablo
2017-09-04 14:32 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-15 11:04 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
Hi
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Wednesday, July 12, 2017 8:59 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v2 3/4] cryptodev: rework PMD init to not require
> rte_vdev.h
>
> The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> By moving the helper to the header we don't require rte_vdev.h at build-
> time of the librte_cryptodev library. This is a preparation to move the vdev
> bus into a standalone library.
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
I am seeing some clang errors when applying this patch:
lib/librte_cryptodev/rte_cryptodev_vdev.h:88:14: error: implicit declaration of function
'rte_cryptodev_pmd_allocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
^
lib/librte_cryptodev/rte_cryptodev_vdev.h:88:12: error: incompatible integer to pointer
conversion assigning to 'struct rte_cryptodev *' from 'int' [-Werror,-Wint-conversion]
cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
Also, looks like git commit title is not correct, according to check-git-log.sh:
Wrong headline format:
cryptodev: rework PMD init to not require rte_vdev.h
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
2017-07-15 11:04 ` De Lara Guarch, Pablo
@ 2017-09-04 14:32 ` De Lara Guarch, Pablo
2017-10-05 14:52 ` Jan Blunck
0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-09-04 14:32 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Jan Blunck, dev; +Cc: Doherty, Declan
Hi Jan,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Saturday, July 15, 2017 12:05 PM
> To: Jan Blunck <jblunck@infradead.org>; dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not
> require rte_vdev.h
>
> Hi
>
> > -----Original Message-----
> > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> > Sent: Wednesday, July 12, 2017 8:59 PM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [PATCH v2 3/4] cryptodev: rework PMD init to not require
> > rte_vdev.h
> >
> > The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> > By moving the helper to the header we don't require rte_vdev.h at
> > build- time of the librte_cryptodev library. This is a preparation to
> > move the vdev bus into a standalone library.
> >
> > Signed-off-by: Jan Blunck <jblunck@infradead.org>
>
> I am seeing some clang errors when applying this patch:
>
> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:14: error: implicit
> declaration of function 'rte_cryptodev_pmd_allocate' is invalid in C99 [-
> Werror,-Wimplicit-function-declaration]
> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
> ^
> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:12: error: incompatible
> integer to pointer conversion assigning to 'struct rte_cryptodev *' from 'int'
> [-Werror,-Wint-conversion]
> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
>
> Also, looks like git commit title is not correct, according to check-git-log.sh:
>
> Wrong headline format:
> cryptodev: rework PMD init to not require rte_vdev.h
Would you have time in this release to fix this?
Thanks,
Pablo
>
>
> Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
2017-09-04 14:32 ` De Lara Guarch, Pablo
@ 2017-10-05 14:52 ` Jan Blunck
2017-10-05 15:19 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-05 14:52 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev, Doherty, Declan
On Mon, Sep 4, 2017 at 4:32 PM, De Lara Guarch, Pablo
<pablo.de.lara.guarch@intel.com> wrote:
> Hi Jan,
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
>> Pablo
>> Sent: Saturday, July 15, 2017 12:05 PM
>> To: Jan Blunck <jblunck@infradead.org>; dev@dpdk.org
>> Cc: Doherty, Declan <declan.doherty@intel.com>
>> Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not
>> require rte_vdev.h
>>
>> Hi
>>
>> > -----Original Message-----
>> > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
>> > Sent: Wednesday, July 12, 2017 8:59 PM
>> > To: dev@dpdk.org
>> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
>> > <pablo.de.lara.guarch@intel.com>
>> > Subject: [PATCH v2 3/4] cryptodev: rework PMD init to not require
>> > rte_vdev.h
>> >
>> > The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
>> > By moving the helper to the header we don't require rte_vdev.h at
>> > build- time of the librte_cryptodev library. This is a preparation to
>> > move the vdev bus into a standalone library.
>> >
>> > Signed-off-by: Jan Blunck <jblunck@infradead.org>
>>
>> I am seeing some clang errors when applying this patch:
>>
>> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:14: error: implicit
>> declaration of function 'rte_cryptodev_pmd_allocate' is invalid in C99 [-
>> Werror,-Wimplicit-function-declaration]
>> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
>> ^
>> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:12: error: incompatible
>> integer to pointer conversion assigning to 'struct rte_cryptodev *' from 'int'
>> [-Werror,-Wint-conversion]
>> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
>>
Pablo,
I can not reproduce this. There is already an include for
rte_cryptodev_pmd_allocate() in rte_cryptodev_vdev.h.
>> Also, looks like git commit title is not correct, according to check-git-log.sh:
>>
>> Wrong headline format:
>> cryptodev: rework PMD init to not require rte_vdev.h
>
This script complains about underscores ...
Tell me what you think,
Jan
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
2017-10-05 14:52 ` Jan Blunck
@ 2017-10-05 15:19 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-05 15:19 UTC (permalink / raw)
To: Jan Blunck; +Cc: dev, Doherty, Declan
> -----Original Message-----
> From: jblunck@gmail.com [mailto:jblunck@gmail.com] On Behalf Of Jan
> Blunck
> Sent: Thursday, October 5, 2017 3:53 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [PATCH v2 3/4] cryptodev: rework PMD init to not require
> rte_vdev.h
>
> On Mon, Sep 4, 2017 at 4:32 PM, De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com> wrote:
> > Hi Jan,
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> >> Pablo
> >> Sent: Saturday, July 15, 2017 12:05 PM
> >> To: Jan Blunck <jblunck@infradead.org>; dev@dpdk.org
> >> Cc: Doherty, Declan <declan.doherty@intel.com>
> >> Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to
> >> not require rte_vdev.h
> >>
> >> Hi
> >>
> >> > -----Original Message-----
> >> > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> >> > Sent: Wednesday, July 12, 2017 8:59 PM
> >> > To: dev@dpdk.org
> >> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch,
> >> > Pablo <pablo.de.lara.guarch@intel.com>
> >> > Subject: [PATCH v2 3/4] cryptodev: rework PMD init to not require
> >> > rte_vdev.h
> >> >
> >> > The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> >> > By moving the helper to the header we don't require rte_vdev.h at
> >> > build- time of the librte_cryptodev library. This is a preparation
> >> > to move the vdev bus into a standalone library.
> >> >
> >> > Signed-off-by: Jan Blunck <jblunck@infradead.org>
> >>
> >> I am seeing some clang errors when applying this patch:
> >>
> >> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:14: error: implicit
> >> declaration of function 'rte_cryptodev_pmd_allocate' is invalid in
> >> C99 [- Werror,-Wimplicit-function-declaration]
> >> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
> >> ^
> >> lib/librte_cryptodev/rte_cryptodev_vdev.h:88:12: error: incompatible
> >> integer to pointer conversion assigning to 'struct rte_cryptodev *' from
> 'int'
> >> [-Werror,-Wint-conversion]
> >> cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
> >>
>
> Pablo,
>
> I can not reproduce this. There is already an include for
> rte_cryptodev_pmd_allocate() in rte_cryptodev_vdev.h.
Yes, but you are adding that header file in patch 4, so patch 3 fails.
You should add it in patch 3:
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -36,6 +36,7 @@
#include <rte_vdev.h>
#include <inttypes.h>
+#include "rte_cryptodev_pmd.h"
#include "rte_cryptodev.h"
#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
>
> >> Also, looks like git commit title is not correct, according to check-git-
> log.sh:
> >>
> >> Wrong headline format:
> >> cryptodev: rework PMD init to not require rte_vdev.h
> >
>
> This script complains about underscores ...
Yes, could you reword it a bit? Instead of rte_vdev, use vdev header?
>
> Tell me what you think,
> Jan
Thanks,
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v2 4/4] cryptodev: move parameter parsing to its own header
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (2 preceding siblings ...)
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h Jan Blunck
@ 2017-07-12 19:58 ` Jan Blunck
2017-07-19 13:31 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 De Lara Guarch, Pablo
` (5 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: Jan Blunck @ 2017-07-12 19:58 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
This moves the parameter parsing functions out of the
rte_cryptodev_vdev.h header to not require the rte_vdev.h header
at build time of the library.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/Makefile | 1 +
lib/librte_cryptodev/rte_cryptodev_pmd.c | 2 +-
lib/librte_cryptodev/rte_cryptodev_vdev.h | 44 +-----------
lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89 ++++++++++++++++++++++++
4 files changed, 93 insertions(+), 43 deletions(-)
create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev_params.h
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index 6ac331bc9..59d9a4e2e 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -49,6 +49,7 @@ SYMLINK-y-include += rte_crypto_sym.h
SYMLINK-y-include += rte_cryptodev.h
SYMLINK-y-include += rte_cryptodev_pmd.h
SYMLINK-y-include += rte_cryptodev_vdev.h
+SYMLINK-y-include += rte_cryptodev_vdev_params.h
SYMLINK-y-include += rte_cryptodev_pci.h
# versioning export map
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index eaeddf74b..d6eaa2a90 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -32,7 +32,7 @@
#include <rte_malloc.h>
-#include "rte_cryptodev_vdev.h"
+#include "rte_cryptodev_vdev_params.h"
#include "rte_cryptodev_pci.h"
#include "rte_cryptodev_pmd.h"
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index 04d0796d4..94df46cab 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -36,33 +36,8 @@
#include <rte_vdev.h>
#include <inttypes.h>
-#include "rte_cryptodev.h"
-
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
-
-#define RTE_CRYPTODEV_VDEV_NAME ("name")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
-#define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
-
-static const char * const cryptodev_vdev_valid_params[] = {
- RTE_CRYPTODEV_VDEV_NAME,
- RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
- RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
- RTE_CRYPTODEV_VDEV_SOCKET_ID
-};
-
-/**
- * @internal
- * Initialisation parameters for virtual crypto devices
- */
-struct rte_crypto_vdev_init_params {
- unsigned int max_nb_queue_pairs;
- unsigned int max_nb_sessions;
- uint8_t socket_id;
- char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-};
+#include "rte_cryptodev_pmd.h"
+#include "rte_cryptodev_vdev_params.h"
/**
* @internal
@@ -107,19 +82,4 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
return cryptodev;
}
-/**
- * @internal
- * Parse virtual device initialisation parameters input arguments
- *
- * @params params Initialisation parameters with defaults set.
- * @params input_args Command line arguments
- *
- * @return
- * 0 on successful parse
- * <0 on failure to parse
- */
-int
-rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
- const char *input_args);
-
#endif /* _RTE_CRYPTODEV_VDEV_H_ */
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev_params.h b/lib/librte_cryptodev/rte_cryptodev_vdev_params.h
new file mode 100644
index 000000000..66ba0d482
--- /dev/null
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev_params.h
@@ -0,0 +1,89 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_CRYPTODEV_VDEV_PARAMS_H_
+#define _RTE_CRYPTODEV_VDEV_PARAMS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <inttypes.h>
+
+#include "rte_cryptodev.h"
+
+#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
+#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
+
+#define RTE_CRYPTODEV_VDEV_NAME ("name")
+#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
+#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
+#define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
+
+static const char * const cryptodev_vdev_valid_params[] = {
+ RTE_CRYPTODEV_VDEV_NAME,
+ RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
+ RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
+ RTE_CRYPTODEV_VDEV_SOCKET_ID
+};
+
+/**
+ * @internal
+ * Initialisation parameters for virtual crypto devices
+ */
+struct rte_crypto_vdev_init_params {
+ unsigned int max_nb_queue_pairs;
+ unsigned int max_nb_sessions;
+ uint8_t socket_id;
+ char name[RTE_CRYPTODEV_NAME_MAX_LEN];
+};
+
+/**
+ * @internal
+ * Parse virtual device initialisation parameters input arguments
+ *
+ * @params params Initialisation parameters with defaults set.
+ * @params input_args Command line arguments
+ *
+ * @return
+ * 0 on successful parse
+ * <0 on failure to parse
+ */
+int
+rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
+ const char *input_args);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_CRYPTODEV_VDEV_PARAMS_H_ */
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (3 preceding siblings ...)
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
@ 2017-07-19 13:31 ` De Lara Guarch, Pablo
2017-07-27 19:31 ` Jan Blunck
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1 Jan Blunck
` (4 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-19 13:31 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Wednesday, July 12, 2017 8:59 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v2 0/4] cryptodev vdev changes for -rc2
>
> This series is a preparation to move the vdev bus out of librte_eal. For that
> the newly added cryptodev vdev functions need to change signature to not
> require the rte_vdev.h header.
>
> Changes since v1:
> - move params parsing into new header
> - make rte_cryptodev_vdev_pmd_init() static inline
>
> Jan Blunck (4):
> cryptodev: remove obsolete include
> cryptodev: move initialization
> cryptodev: rework PMD init to not require rte_vdev.h
> cryptodev: move parameter parsing to its own header
>
> lib/librte_cryptodev/Makefile | 1 +
> lib/librte_cryptodev/rte_cryptodev.c | 3 +
> lib/librte_cryptodev/rte_cryptodev.h | 1 -
> lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
> lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
> lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89
> ++++++++++++++++++++++++
> lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
> 7 files changed, 122 insertions(+), 81 deletions(-) create mode 100644
> lib/librte_cryptodev/rte_cryptodev_vdev_params.h
>
> --
> 2.13.2
Hi Jan,
Since there are some issues in this patchset and knowing that these changes are required
for work to be done in 17.11 (vdev moving out of EAL), let's postpone this for the next release,
as also there is no API breakage in this (correct me if I am wrong).
Thanks,
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2
2017-07-19 13:31 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 De Lara Guarch, Pablo
@ 2017-07-27 19:31 ` Jan Blunck
2017-08-01 10:39 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-07-27 19:31 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev, Doherty, Declan
On Wed, Jul 19, 2017 at 9:31 AM, De Lara Guarch, Pablo
<pablo.de.lara.guarch@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> > Sent: Wednesday, July 12, 2017 8:59 PM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [PATCH v2 0/4] cryptodev vdev changes for -rc2
> >
> > This series is a preparation to move the vdev bus out of librte_eal. For that
> > the newly added cryptodev vdev functions need to change signature to not
> > require the rte_vdev.h header.
> >
> > Changes since v1:
> > - move params parsing into new header
> > - make rte_cryptodev_vdev_pmd_init() static inline
> >
> > Jan Blunck (4):
> > cryptodev: remove obsolete include
> > cryptodev: move initialization
> > cryptodev: rework PMD init to not require rte_vdev.h
> > cryptodev: move parameter parsing to its own header
> >
> > lib/librte_cryptodev/Makefile | 1 +
> > lib/librte_cryptodev/rte_cryptodev.c | 3 +
> > lib/librte_cryptodev/rte_cryptodev.h | 1 -
> > lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
> > lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
> > lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89
> > ++++++++++++++++++++++++
> > lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
> > 7 files changed, 122 insertions(+), 81 deletions(-) create mode 100644
> > lib/librte_cryptodev/rte_cryptodev_vdev_params.h
> >
> > --
> > 2.13.2
>
> Hi Jan,
>
> Since there are some issues in this patchset and knowing that these changes are required
> for work to be done in 17.11 (vdev moving out of EAL), let's postpone this for the next release,
> as also there is no API breakage in this (correct me if I am wrong).
Unexporting a function does require a soname change. So this is affecting ABI.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2
2017-07-27 19:31 ` Jan Blunck
@ 2017-08-01 10:39 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-08-01 10:39 UTC (permalink / raw)
To: Jan Blunck; +Cc: dev, Doherty, Declan
> -----Original Message-----
> From: jblunck@gmail.com [mailto:jblunck@gmail.com] On Behalf Of Jan
> Blunck
> Sent: Thursday, July 27, 2017 8:32 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [PATCH v2 0/4] cryptodev vdev changes for -rc2
>
> On Wed, Jul 19, 2017 at 9:31 AM, De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> > > Sent: Wednesday, July 12, 2017 8:59 PM
> > > To: dev@dpdk.org
> > > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch,
> > > Pablo <pablo.de.lara.guarch@intel.com>
> > > Subject: [PATCH v2 0/4] cryptodev vdev changes for -rc2
> > >
> > > This series is a preparation to move the vdev bus out of librte_eal.
> > > For that the newly added cryptodev vdev functions need to change
> > > signature to not require the rte_vdev.h header.
> > >
> > > Changes since v1:
> > > - move params parsing into new header
> > > - make rte_cryptodev_vdev_pmd_init() static inline
> > >
> > > Jan Blunck (4):
> > > cryptodev: remove obsolete include
> > > cryptodev: move initialization
> > > cryptodev: rework PMD init to not require rte_vdev.h
> > > cryptodev: move parameter parsing to its own header
> > >
> > > lib/librte_cryptodev/Makefile | 1 +
> > > lib/librte_cryptodev/rte_cryptodev.c | 3 +
> > > lib/librte_cryptodev/rte_cryptodev.h | 1 -
> > > lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
> > > lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
> > > lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89
> > > ++++++++++++++++++++++++
> > > lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
> > > 7 files changed, 122 insertions(+), 81 deletions(-) create mode
> > > 100644 lib/librte_cryptodev/rte_cryptodev_vdev_params.h
> > >
> > > --
> > > 2.13.2
> >
> > Hi Jan,
> >
> > Since there are some issues in this patchset and knowing that these
> > changes are required for work to be done in 17.11 (vdev moving out of
> > EAL), let's postpone this for the next release, as also there is no API
> breakage in this (correct me if I am wrong).
>
> Unexporting a function does require a soname change. So this is affecting
> ABI.
Right, sorry for the delay. You are right, I thought this was not affecting,
as it was internal for the PMDs, but that is also an ABI breakage.
We are discussing in another thread ("cryptodev: fix NULL pointer dereference),
if we are going to have any further API/ABI breakages in the next release, and this is one then.
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (4 preceding siblings ...)
2017-07-19 13:31 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 De Lara Guarch, Pablo
@ 2017-10-06 8:39 ` Jan Blunck
2017-10-25 14:33 ` De Lara Guarch, Pablo
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 1/4] cryptodev: remove obsolete include Jan Blunck
` (3 subsequent siblings)
9 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-06 8:39 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
This series is a preparation to move the vdev bus out of librte_eal. For
that the newly added cryptodev vdev functions need to change signature
to not require the rte_vdev.h header.
Changes since v1:
- move params parsing into new header
- make rte_cryptodev_vdev_pmd_init() static inline
Changes since v2:
- fix bisect compile errors
- workaround check-git-log.sh stupidity
Jan Blunck (4):
cryptodev: remove obsolete include
cryptodev: move initialization
cryptodev: rework dependency on vdev header
cryptodev: move parameter parsing to its own header
lib/librte_cryptodev/Makefile | 1 +
lib/librte_cryptodev/rte_cryptodev.c | 3 +
lib/librte_cryptodev/rte_cryptodev.h | 1 -
lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89 ++++++++++++++++++++++++
lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
7 files changed, 122 insertions(+), 81 deletions(-)
create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev_params.h
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1 Jan Blunck
@ 2017-10-25 14:33 ` De Lara Guarch, Pablo
2017-10-25 16:05 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-25 14:33 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Friday, October 6, 2017 9:40 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
>
> This series is a preparation to move the vdev bus out of librte_eal. For that
> the newly added cryptodev vdev functions need to change signature to not
> require the rte_vdev.h header.
>
> Changes since v1:
> - move params parsing into new header
> - make rte_cryptodev_vdev_pmd_init() static inline
>
> Changes since v2:
> - fix bisect compile errors
> - workaround check-git-log.sh stupidity
>
> Jan Blunck (4):
> cryptodev: remove obsolete include
> cryptodev: move initialization
> cryptodev: rework dependency on vdev header
> cryptodev: move parameter parsing to its own header
>
> lib/librte_cryptodev/Makefile | 1 +
> lib/librte_cryptodev/rte_cryptodev.c | 3 +
> lib/librte_cryptodev/rte_cryptodev.h | 1 -
> lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
> lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
> lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89
> ++++++++++++++++++++++++
> lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
> 7 files changed, 122 insertions(+), 81 deletions(-) create mode 100644
> lib/librte_cryptodev/rte_cryptodev_vdev_params.h
>
> --
> 2.13.2
Hi Jan,
Declan has submitted a patchset that drops all vdev/PCI code from cryptodev,
so it superseds your two last patches.
Therefore, I will drop them and get the first two. The end goal should be the same,
Anyway.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
2017-10-25 14:33 ` De Lara Guarch, Pablo
@ 2017-10-25 16:05 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-25 16:05 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Wednesday, October 25, 2017 3:33 PM
> To: Jan Blunck <jblunck@infradead.org>; dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-
> rc1
>
>
>
> > -----Original Message-----
> > From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> > Sent: Friday, October 6, 2017 9:40 AM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
> >
> > This series is a preparation to move the vdev bus out of librte_eal.
> > For that the newly added cryptodev vdev functions need to change
> > signature to not require the rte_vdev.h header.
> >
> > Changes since v1:
> > - move params parsing into new header
> > - make rte_cryptodev_vdev_pmd_init() static inline
> >
> > Changes since v2:
> > - fix bisect compile errors
> > - workaround check-git-log.sh stupidity
> >
> > Jan Blunck (4):
> > cryptodev: remove obsolete include
> > cryptodev: move initialization
> > cryptodev: rework dependency on vdev header
> > cryptodev: move parameter parsing to its own header
> >
> > lib/librte_cryptodev/Makefile | 1 +
> > lib/librte_cryptodev/rte_cryptodev.c | 3 +
> > lib/librte_cryptodev/rte_cryptodev.h | 1 -
> > lib/librte_cryptodev/rte_cryptodev_pmd.c | 37 +---------
> > lib/librte_cryptodev/rte_cryptodev_vdev.h | 71 ++++++++-----------
> > lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89
> > ++++++++++++++++++++++++
> > lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
> > 7 files changed, 122 insertions(+), 81 deletions(-) create mode
> > 100644 lib/librte_cryptodev/rte_cryptodev_vdev_params.h
> >
> > --
> > 2.13.2
>
> Hi Jan,
>
> Declan has submitted a patchset that drops all vdev/PCI code from
> cryptodev, so it superseds your two last patches.
>
> Therefore, I will drop them and get the first two. The end goal should be the
> same, Anyway.
>
> Thanks,
> Pablo
Patch 1 and 2 applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v3 1/4] cryptodev: remove obsolete include
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (5 preceding siblings ...)
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1 Jan Blunck
@ 2017-10-06 8:39 ` Jan Blunck
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 2/4] cryptodev: move initialization Jan Blunck
` (2 subsequent siblings)
9 siblings, 0 replies; 31+ messages in thread
From: Jan Blunck @ 2017-10-06 8:39 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_cryptodev/rte_cryptodev.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7ec9c4bc4..ad97ff940 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -49,7 +49,6 @@ extern "C" {
#include "rte_crypto.h"
#include "rte_dev.h"
#include <rte_common.h>
-#include <rte_vdev.h>
extern const char **rte_cyptodev_names;
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] cryptodev: move initialization
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (6 preceding siblings ...)
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 1/4] cryptodev: remove obsolete include Jan Blunck
@ 2017-10-06 8:39 ` Jan Blunck
2017-10-10 8:45 ` De Lara Guarch, Pablo
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header Jan Blunck
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
9 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-06 8:39 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/rte_cryptodev.c | 3 +++
lib/librte_cryptodev/rte_cryptodev_pmd.c | 6 ------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 327d7e846..5e8f7f4fe 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -583,6 +583,9 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id)
cryptodev->data->socket_id = socket_id;
cryptodev->data->dev_started = 0;
+ /* init user callbacks */
+ TAILQ_INIT(&(cryptodev->link_intr_cbs));
+
cryptodev->attached = RTE_CRYPTODEV_ATTACHED;
cryptodev_globals.nb_devs++;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faadcf..ec6eeffa1 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -101,9 +101,6 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
cryptodev->device = &vdev->device;
- /* initialise user call-back tail queue */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
return cryptodev;
}
@@ -188,9 +185,6 @@ rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
cryptodev->device = &pci_dev->device;
- /* init user callbacks */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
/* Invoke PMD device initialization function */
RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
retval = dev_init(cryptodev);
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/4] cryptodev: move initialization
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 2/4] cryptodev: move initialization Jan Blunck
@ 2017-10-10 8:45 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-10 8:45 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Friday, October 6, 2017 9:40 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v3 2/4] cryptodev: move initialization
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (7 preceding siblings ...)
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 2/4] cryptodev: move initialization Jan Blunck
@ 2017-10-06 8:39 ` Jan Blunck
2017-10-10 8:47 ` De Lara Guarch, Pablo
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
9 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-06 8:39 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
By moving the helper to the header we don't require rte_vdev.h at
build-time of the librte_cryptodev library. This is a preparation to
move the vdev bus into a standalone library.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/rte_cryptodev_pmd.c | 29 ------------------------
lib/librte_cryptodev/rte_cryptodev_vdev.h | 31 +++++++++++++++++++++++---
lib/librte_cryptodev/rte_cryptodev_version.map | 1 -
3 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index ec6eeffa1..eaeddf74b 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -75,35 +75,6 @@ rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
return 0;
}
-struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
- int socket_id, struct rte_vdev_device *vdev)
-{
- struct rte_cryptodev *cryptodev;
-
- /* allocate device structure */
- cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
- if (cryptodev == NULL)
- return NULL;
-
- /* allocate private device structure */
- if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
- cryptodev->data->dev_private =
- rte_zmalloc_socket("cryptodev device private",
- dev_private_size,
- RTE_CACHE_LINE_SIZE,
- socket_id);
-
- if (cryptodev->data->dev_private == NULL)
- rte_panic("Cannot allocate memzone for private device"
- " data");
- }
-
- cryptodev->device = &vdev->device;
-
- return cryptodev;
-}
-
int
rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
const char *input_args)
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index 94ab9d33d..c6bafd01b 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -36,7 +36,7 @@
#include <rte_vdev.h>
#include <inttypes.h>
-#include "rte_cryptodev.h"
+#include "rte_cryptodev_pmd.h"
#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
@@ -78,9 +78,34 @@ struct rte_crypto_vdev_init_params {
* - Cryptodev pointer if device is successfully created.
* - NULL if device cannot be created.
*/
-struct rte_cryptodev *
+static inline struct rte_cryptodev *
rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
- int socket_id, struct rte_vdev_device *vdev);
+ int socket_id, struct rte_vdev_device *dev)
+{
+ struct rte_cryptodev *cryptodev;
+
+ /* allocate device structure */
+ cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
+ if (cryptodev == NULL)
+ return NULL;
+
+ /* allocate private device structure */
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ cryptodev->data->dev_private =
+ rte_zmalloc_socket("cryptodev device private",
+ dev_private_size,
+ RTE_CACHE_LINE_SIZE,
+ socket_id);
+
+ if (cryptodev->data->dev_private == NULL)
+ rte_panic("Cannot allocate memzone for private device"
+ " data");
+ }
+
+ cryptodev->device = &dev->device;
+
+ return cryptodev;
+}
/**
* @internal
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e9ba88ac5..abdbbdada 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -74,7 +74,6 @@ DPDK_17.08 {
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
rte_cryptodev_vdev_parse_init_params;
- rte_cryptodev_vdev_pmd_init;
rte_crypto_aead_algorithm_strings;
rte_crypto_aead_operation_strings;
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header Jan Blunck
@ 2017-10-10 8:47 ` De Lara Guarch, Pablo
2017-10-10 11:29 ` Jan Blunck
0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-10 8:47 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Friday, October 6, 2017 9:40 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
>
> The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> By moving the helper to the header we don't require rte_vdev.h at build-
> time of the librte_cryptodev library. This is a preparation to move the vdev
> bus into a standalone library.
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
This looks good, but could you also remove the deprecation notice from the previous release?
Apart from that:
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header
2017-10-10 8:47 ` De Lara Guarch, Pablo
@ 2017-10-10 11:29 ` Jan Blunck
2017-10-10 12:49 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-10 11:29 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev, Doherty, Declan
On Tue, Oct 10, 2017 at 10:47 AM, De Lara Guarch, Pablo
<pablo.de.lara.guarch@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
>> Sent: Friday, October 6, 2017 9:40 AM
>> To: dev@dpdk.org
>> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>
>> Subject: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
>>
>> The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
>> By moving the helper to the header we don't require rte_vdev.h at build-
>> time of the librte_cryptodev library. This is a preparation to move the vdev
>> bus into a standalone library.
>>
>> Signed-off-by: Jan Blunck <jblunck@infradead.org>
>
> This looks good, but could you also remove the deprecation notice from the previous release?
> Apart from that:
>
I wondered about that too. The message said that it will be static
from 17.11 on and I wonder if we should actually keep it into the
notes for this release.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header
2017-10-10 11:29 ` Jan Blunck
@ 2017-10-10 12:49 ` De Lara Guarch, Pablo
2017-10-11 14:45 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-10 12:49 UTC (permalink / raw)
To: Jan Blunck; +Cc: dev, Doherty, Declan
> -----Original Message-----
> From: jblunck@gmail.com [mailto:jblunck@gmail.com] On Behalf Of Jan
> Blunck
> Sent: Tuesday, October 10, 2017 12:30 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
>
> On Tue, Oct 10, 2017 at 10:47 AM, De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> >> Sent: Friday, October 6, 2017 9:40 AM
> >> To: dev@dpdk.org
> >> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> >> <pablo.de.lara.guarch@intel.com>
> >> Subject: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
> >>
> >> The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> >> By moving the helper to the header we don't require rte_vdev.h at
> >> build- time of the librte_cryptodev library. This is a preparation to
> >> move the vdev bus into a standalone library.
> >>
> >> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> >
> > This looks good, but could you also remove the deprecation notice from
> the previous release?
> > Apart from that:
> >
>
> I wondered about that too. The message said that it will be static from
> 17.11 on and I wonder if we should actually keep it into the notes for this
> release.
Well, actually this change should be added in release notes (under API changes, I think),
and removed from deprecation.rst.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header
2017-10-10 12:49 ` De Lara Guarch, Pablo
@ 2017-10-11 14:45 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-11 14:45 UTC (permalink / raw)
To: 'Jan Blunck'; +Cc: 'dev@dpdk.org', Doherty, Declan
Hi Jan,
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, October 10, 2017 1:50 PM
> To: Jan Blunck <jblunck@infradead.org>
> Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> Subject: RE: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
>
>
>
> > -----Original Message-----
> > From: jblunck@gmail.com [mailto:jblunck@gmail.com] On Behalf Of Jan
> > Blunck
> > Sent: Tuesday, October 10, 2017 12:30 PM
> > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>
> > Subject: Re: [PATCH v3 3/4] cryptodev: rework dependency on vdev
> > header
> >
> > On Tue, Oct 10, 2017 at 10:47 AM, De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com> wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> > >> Sent: Friday, October 6, 2017 9:40 AM
> > >> To: dev@dpdk.org
> > >> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch,
> > >> Pablo <pablo.de.lara.guarch@intel.com>
> > >> Subject: [PATCH v3 3/4] cryptodev: rework dependency on vdev
> header
> > >>
> > >> The rte_cryptodev_vdev_pmd_init() is a helper for vdev-based drivers.
> > >> By moving the helper to the header we don't require rte_vdev.h at
> > >> build- time of the librte_cryptodev library. This is a preparation
> > >> to move the vdev bus into a standalone library.
> > >>
> > >> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> > >
> > > This looks good, but could you also remove the deprecation notice
> > > from
> > the previous release?
> > > Apart from that:
> > >
> >
> > I wondered about that too. The message said that it will be static
> > from
> > 17.11 on and I wonder if we should actually keep it into the notes for
> > this release.
>
> Well, actually this change should be added in release notes (under API
> changes, I think), and removed from deprecation.rst.
Are you going to send a new patchset soon, so it can make RC1?
Thanks!
Pablo
>
> Thanks,
> Pablo
^ permalink raw reply [flat|nested] 31+ messages in thread
* [dpdk-dev] [PATCH v3 4/4] cryptodev: move parameter parsing to its own header
2017-07-12 19:58 ` [dpdk-dev] [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
` (8 preceding siblings ...)
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 3/4] cryptodev: rework dependency on vdev header Jan Blunck
@ 2017-10-06 8:39 ` Jan Blunck
2017-10-10 8:48 ` De Lara Guarch, Pablo
9 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-10-06 8:39 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch
This moves the parameter parsing functions out of the
rte_cryptodev_vdev.h header to not require the rte_vdev.h header
at build time of the library.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
lib/librte_cryptodev/Makefile | 1 +
lib/librte_cryptodev/rte_cryptodev_pmd.c | 2 +-
lib/librte_cryptodev/rte_cryptodev_vdev.h | 42 +----------
lib/librte_cryptodev/rte_cryptodev_vdev_params.h | 89 ++++++++++++++++++++++++
4 files changed, 92 insertions(+), 42 deletions(-)
create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev_params.h
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index 6ac331bc9..59d9a4e2e 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -49,6 +49,7 @@ SYMLINK-y-include += rte_crypto_sym.h
SYMLINK-y-include += rte_cryptodev.h
SYMLINK-y-include += rte_cryptodev_pmd.h
SYMLINK-y-include += rte_cryptodev_vdev.h
+SYMLINK-y-include += rte_cryptodev_vdev_params.h
SYMLINK-y-include += rte_cryptodev_pci.h
# versioning export map
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index eaeddf74b..d6eaa2a90 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -32,7 +32,7 @@
#include <rte_malloc.h>
-#include "rte_cryptodev_vdev.h"
+#include "rte_cryptodev_vdev_params.h"
#include "rte_cryptodev_pci.h"
#include "rte_cryptodev_pmd.h"
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index c6bafd01b..94df46cab 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -37,32 +37,7 @@
#include <inttypes.h>
#include "rte_cryptodev_pmd.h"
-
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
-
-#define RTE_CRYPTODEV_VDEV_NAME ("name")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
-#define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
-
-static const char * const cryptodev_vdev_valid_params[] = {
- RTE_CRYPTODEV_VDEV_NAME,
- RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
- RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
- RTE_CRYPTODEV_VDEV_SOCKET_ID
-};
-
-/**
- * @internal
- * Initialisation parameters for virtual crypto devices
- */
-struct rte_crypto_vdev_init_params {
- unsigned int max_nb_queue_pairs;
- unsigned int max_nb_sessions;
- uint8_t socket_id;
- char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-};
+#include "rte_cryptodev_vdev_params.h"
/**
* @internal
@@ -107,19 +82,4 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
return cryptodev;
}
-/**
- * @internal
- * Parse virtual device initialisation parameters input arguments
- *
- * @params params Initialisation parameters with defaults set.
- * @params input_args Command line arguments
- *
- * @return
- * 0 on successful parse
- * <0 on failure to parse
- */
-int
-rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
- const char *input_args);
-
#endif /* _RTE_CRYPTODEV_VDEV_H_ */
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev_params.h b/lib/librte_cryptodev/rte_cryptodev_vdev_params.h
new file mode 100644
index 000000000..66ba0d482
--- /dev/null
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev_params.h
@@ -0,0 +1,89 @@
+/*-
+ * BSD LICENSE
+ *
+ * Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of the copyright holder nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_CRYPTODEV_VDEV_PARAMS_H_
+#define _RTE_CRYPTODEV_VDEV_PARAMS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <inttypes.h>
+
+#include "rte_cryptodev.h"
+
+#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS 8
+#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS 2048
+
+#define RTE_CRYPTODEV_VDEV_NAME ("name")
+#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
+#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
+#define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
+
+static const char * const cryptodev_vdev_valid_params[] = {
+ RTE_CRYPTODEV_VDEV_NAME,
+ RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
+ RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
+ RTE_CRYPTODEV_VDEV_SOCKET_ID
+};
+
+/**
+ * @internal
+ * Initialisation parameters for virtual crypto devices
+ */
+struct rte_crypto_vdev_init_params {
+ unsigned int max_nb_queue_pairs;
+ unsigned int max_nb_sessions;
+ uint8_t socket_id;
+ char name[RTE_CRYPTODEV_NAME_MAX_LEN];
+};
+
+/**
+ * @internal
+ * Parse virtual device initialisation parameters input arguments
+ *
+ * @params params Initialisation parameters with defaults set.
+ * @params input_args Command line arguments
+ *
+ * @return
+ * 0 on successful parse
+ * <0 on failure to parse
+ */
+int
+rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
+ const char *input_args);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_CRYPTODEV_VDEV_PARAMS_H_ */
--
2.13.2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [dpdk-dev] [PATCH v3 4/4] cryptodev: move parameter parsing to its own header
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
@ 2017-10-10 8:48 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-10 8:48 UTC (permalink / raw)
To: Jan Blunck, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: Jan Blunck [mailto:jblunck@gmail.com] On Behalf Of Jan Blunck
> Sent: Friday, October 6, 2017 9:40 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v3 4/4] cryptodev: move parameter parsing to its own
> header
>
> This moves the parameter parsing functions out of the
> rte_cryptodev_vdev.h header to not require the rte_vdev.h header at build
> time of the library.
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread