All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] cryptodev vdev changes for -rc2
@ 2017-07-12  7:59 Jan Blunck
  2017-07-12  7:59 ` [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Jan Blunck @ 2017-07-12  7:59 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty

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.

Jan Blunck (2):
  cryptodev: remove obsolete include
  cryptodev: rework cryptodev PMD init to not require rte_vdev.h

 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       | 4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     | 4 ++--
 drivers/crypto/armv8/rte_armv8_pmd.c           | 4 ++--
 drivers/crypto/kasumi/rte_kasumi_pmd.c         | 4 ++--
 drivers/crypto/null/null_crypto_pmd.c          | 4 ++--
 drivers/crypto/openssl/rte_openssl_pmd.c       | 4 ++--
 drivers/crypto/scheduler/scheduler_pmd.c       | 4 ++--
 drivers/crypto/snow3g/rte_snow3g_pmd.c         | 4 ++--
 drivers/crypto/zuc/rte_zuc_pmd.c               | 4 ++--
 lib/librte_cryptodev/rte_cryptodev.h           | 1 -
 lib/librte_cryptodev/rte_cryptodev_pmd.c       | 6 +++---
 lib/librte_cryptodev/rte_cryptodev_vdev.h      | 7 +++----
 lib/librte_cryptodev/rte_cryptodev_version.map | 2 +-
 13 files changed, 25 insertions(+), 27 deletions(-)

-- 
2.13.2

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH 1/2] cryptodev: remove obsolete include
  2017-07-12  7:59 [PATCH 0/2] cryptodev vdev changes for -rc2 Jan Blunck
@ 2017-07-12  7:59 ` Jan Blunck
  2017-07-12 12:35   ` De Lara Guarch, Pablo
  2017-07-12  7:59 ` [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h Jan Blunck
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
  2 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-07-12  7:59 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 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 ca7cbdd8d..989db0f36 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 related	[flat|nested] 31+ messages in thread

* [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h
  2017-07-12  7:59 [PATCH 0/2] cryptodev vdev changes for -rc2 Jan Blunck
  2017-07-12  7:59 ` [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
@ 2017-07-12  7:59 ` Jan Blunck
  2017-07-12 12:39   ` De Lara Guarch, Pablo
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
  2 siblings, 1 reply; 31+ messages in thread
From: Jan Blunck @ 2017-07-12  7:59 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty

This reworks the library code so that it doesn't require to include
rte_vdev.h. This is a preparation to move the vdev bus into a standalone
library.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       | 4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     | 4 ++--
 drivers/crypto/armv8/rte_armv8_pmd.c           | 4 ++--
 drivers/crypto/kasumi/rte_kasumi_pmd.c         | 4 ++--
 drivers/crypto/null/null_crypto_pmd.c          | 4 ++--
 drivers/crypto/openssl/rte_openssl_pmd.c       | 4 ++--
 drivers/crypto/scheduler/scheduler_pmd.c       | 4 ++--
 drivers/crypto/snow3g/rte_snow3g_pmd.c         | 4 ++--
 drivers/crypto/zuc/rte_zuc_pmd.c               | 4 ++--
 lib/librte_cryptodev/rte_cryptodev_pmd.c       | 6 +++---
 lib/librte_cryptodev/rte_cryptodev_vdev.h      | 7 +++----
 lib/librte_cryptodev/rte_cryptodev_version.map | 2 +-
 12 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 91c3801c2..6848a4d20 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -529,9 +529,9 @@ aesni_gcm_create(const char *name,
 	else
 		vector_mode = RTE_AESNI_GCM_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct aesni_gcm_private), init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		GCM_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 3aaa070e2..e952569b5 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -712,9 +712,9 @@ cryptodev_aesni_mb_create(const char *name,
 	else
 		vector_mode = RTE_AESNI_MB_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct aesni_mb_private), init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		MB_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 2e0701867..e2fc56275 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -820,10 +820,10 @@ cryptodev_armv8_crypto_create(const char *name,
 		snprintf(init_params->name, sizeof(init_params->name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 				sizeof(struct armv8_crypto_private),
 				init_params->socket_id,
-				vdev);
+				&vdev->device);
 	if (dev == NULL) {
 		ARMV8_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index cff40fb55..360cdb5a8 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -592,9 +592,9 @@ cryptodev_kasumi_create(const char *name,
 	else
 		cpu_flags |= RTE_CRYPTODEV_FF_CPU_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct kasumi_private), init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		KASUMI_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 7f7dee642..471774cf2 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -198,10 +198,10 @@ cryptodev_null_create(const char *name,
 		snprintf(init_params->name, sizeof(init_params->name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct null_crypto_private),
 			init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		NULL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index d943d72bb..1a57e7538 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1406,10 +1406,10 @@ cryptodev_openssl_create(const char *name,
 		snprintf(init_params->name, sizeof(init_params->name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct openssl_private),
 			init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		OPENSSL_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 0f57fbefd..8a38a8d08 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -112,10 +112,10 @@ cryptodev_scheduler_create(const char *name,
 				sizeof(init_params->def_p.name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->def_p.name,
+	dev = rte_cryptodev_pmd_init(init_params->def_p.name,
 			sizeof(struct scheduler_ctx),
 			init_params->def_p.socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		CS_LOG_ERR("driver %s: failed to create cryptodev vdev",
 			name);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 107e1b424..1f9ced950 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -575,9 +575,9 @@ cryptodev_snow3g_create(const char *name,
 		snprintf(init_params->name, sizeof(init_params->name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct snow3g_private), init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		SNOW3G_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 664c58ff6..2a8cc21d4 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -479,9 +479,9 @@ cryptodev_zuc_create(const char *name,
 		snprintf(init_params->name, sizeof(init_params->name),
 				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
+	dev = rte_cryptodev_pmd_init(init_params->name,
 			sizeof(struct zuc_private), init_params->socket_id,
-			vdev);
+			&vdev->device);
 	if (dev == NULL) {
 		ZUC_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faadcf..49f2e8fc5 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -76,8 +76,8 @@ rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
 }
 
 struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev)
+rte_cryptodev_pmd_init(const char *name, size_t dev_private_size,
+		int socket_id, struct rte_device *dev)
 {
 	struct rte_cryptodev *cryptodev;
 
@@ -99,7 +99,7 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
 					" data");
 	}
 
-	cryptodev->device = &vdev->device;
+	cryptodev->device = dev;
 
 	/* initialise user call-back tail queue */
 	TAILQ_INIT(&(cryptodev->link_intr_cbs));
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index 94ab9d33d..a877eed74 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -33,7 +33,6 @@
 #ifndef _RTE_CRYPTODEV_VDEV_H_
 #define _RTE_CRYPTODEV_VDEV_H_
 
-#include <rte_vdev.h>
 #include <inttypes.h>
 
 #include "rte_cryptodev.h"
@@ -72,15 +71,15 @@ struct rte_crypto_vdev_init_params {
  * @param	name			PMD type name
  * @param	dev_private_size	Size of crypto PMDs private data
  * @param	socket_id		Socket to allocate resources on.
- * @param	vdev			Pointer to virtual device structure.
+ * @param	dev			Pointer to device structure.
  *
  * @return
  *   - Cryptodev pointer if device is successfully created.
  *   - NULL if device cannot be created.
  */
 struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev);
+rte_cryptodev_pmd_init(const char *name, size_t dev_private_size,
+		int socket_id, struct rte_device *dev);
 
 /**
  * @internal
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e9ba88ac5..28ab3cf48 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -74,7 +74,7 @@ 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_cryptodev_pmd_init;
 	rte_crypto_aead_algorithm_strings;
 	rte_crypto_aead_operation_strings;
 
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [PATCH 1/2] cryptodev: remove obsolete include
  2017-07-12  7:59 ` [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
@ 2017-07-12 12:35   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-12 12:35 UTC (permalink / raw)
  To: Jan Blunck, dev; +Cc: Doherty, Declan



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jan Blunck
> Sent: Wednesday, July 12, 2017 9:00 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: [dpdk-dev] [PATCH 1/2] cryptodev: remove obsolete include
> 
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> ---
>  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 ca7cbdd8d..989db0f36 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

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h
  2017-07-12  7:59 ` [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h Jan Blunck
@ 2017-07-12 12:39   ` De Lara Guarch, Pablo
  2017-07-12 13:07     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-12 12:39 UTC (permalink / raw)
  To: Jan Blunck, dev; +Cc: Doherty, Declan



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jan Blunck
> Sent: Wednesday, July 12, 2017 9:00 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] cryptodev: rework cryptodev PMD init to
> not require rte_vdev.h
> 
> This reworks the library code so that it doesn't require to include
> rte_vdev.h. This is a preparation to move the vdev bus into a standalone
> library.
> 
> Signed-off-by: Jan Blunck <jblunck@infradead.org>

...

> diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h
> b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> index 94ab9d33d..a877eed74 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> @@ -33,7 +33,6 @@
>  #ifndef _RTE_CRYPTODEV_VDEV_H_
>  #define _RTE_CRYPTODEV_VDEV_H_
> 
> -#include <rte_vdev.h>
>  #include <inttypes.h>
> 
>  #include "rte_cryptodev.h"
> @@ -72,15 +71,15 @@ struct rte_crypto_vdev_init_params {
>   * @param	name			PMD type name
>   * @param	dev_private_size	Size of crypto PMDs private data
>   * @param	socket_id		Socket to allocate resources on.
> - * @param	vdev			Pointer to virtual device structure.
> + * @param	dev			Pointer to device structure.
>   *
>   * @return
>   *   - Cryptodev pointer if device is successfully created.
>   *   - NULL if device cannot be created.
>   */
>  struct rte_cryptodev *
> -rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
> -		int socket_id, struct rte_vdev_device *vdev);
> +rte_cryptodev_pmd_init(const char *name, size_t dev_private_size,
> +		int socket_id, struct rte_device *dev);

Hi Jan,

Even though now this function does not require the rte_vdev_device structure,
I would still call it rte_cryptodev_vdev_pmd_init, as it is used for virtual crypto
devices and not physical ones.

The rest look ok to me.

Thanks,
Pablo

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h
  2017-07-12 12:39   ` De Lara Guarch, Pablo
@ 2017-07-12 13:07     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 31+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-12 13:07 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, July 12, 2017 1:40 PM
> To: Jan Blunck <jblunck@infradead.org>; dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 2/2] cryptodev: rework cryptodev PMD init
> to not require rte_vdev.h
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jan Blunck
> > Sent: Wednesday, July 12, 2017 9:00 AM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan <declan.doherty@intel.com>
> > Subject: [dpdk-dev] [PATCH 2/2] cryptodev: rework cryptodev PMD init
> > to not require rte_vdev.h
> >
> > This reworks the library code so that it doesn't require to include
> > rte_vdev.h. This is a preparation to move the vdev bus into a
> > standalone library.
> >
> > Signed-off-by: Jan Blunck <jblunck@infradead.org>
> 
> ...
> 
> > diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h
> > b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> > index 94ab9d33d..a877eed74 100644
> > --- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
> > +++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> > @@ -33,7 +33,6 @@
> >  #ifndef _RTE_CRYPTODEV_VDEV_H_
> >  #define _RTE_CRYPTODEV_VDEV_H_
> >
> > -#include <rte_vdev.h>
> >  #include <inttypes.h>
> >
> >  #include "rte_cryptodev.h"
> > @@ -72,15 +71,15 @@ struct rte_crypto_vdev_init_params {
> >   * @param	name			PMD type name
> >   * @param	dev_private_size	Size of crypto PMDs private data
> >   * @param	socket_id		Socket to allocate resources on.
> > - * @param	vdev			Pointer to virtual device structure.
> > + * @param	dev			Pointer to device structure.
> >   *
> >   * @return
> >   *   - Cryptodev pointer if device is successfully created.
> >   *   - NULL if device cannot be created.
> >   */
> >  struct rte_cryptodev *
> > -rte_cryptodev_vdev_pmd_init(const char *name, size_t
> dev_private_size,
> > -		int socket_id, struct rte_vdev_device *vdev);
> > +rte_cryptodev_pmd_init(const char *name, size_t dev_private_size,
> > +		int socket_id, struct rte_device *dev);
> 
> Hi Jan,
> 
> Even though now this function does not require the rte_vdev_device
> structure, I would still call it rte_cryptodev_vdev_pmd_init, as it is used for
> virtual crypto devices and not physical ones.
> 
> The rest look ok to me.

Just another note. Check-git-log.sh complains about the title:

Wrong headline format:
        cryptodev: rework cryptodev PMD init to not require rte_vdev.h
Headline too long:
        cryptodev: rework cryptodev PMD init to not require rte_vdev.h

So this needs some rework (e.g. no need to use cryptodev word again).

Thanks,
Pablo
> 
> Thanks,
> Pablo

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH v2 0/4] cryptodev vdev changes for -rc2
  2017-07-12  7:59 [PATCH 0/2] cryptodev vdev changes for -rc2 Jan Blunck
  2017-07-12  7:59 ` [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
  2017-07-12  7:59 ` [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h Jan Blunck
@ 2017-07-12 19:58 ` Jan Blunck
  2017-07-12 19:58   ` [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
                     ` (9 more replies)
  2 siblings, 10 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 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

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [PATCH v2 1/4] cryptodev: remove obsolete include
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
@ 2017-07-12 19:58   ` Jan Blunck
  2017-07-12 19:58   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v2 2/4] cryptodev: move initialization
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
  2017-07-12 19:58   ` [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
@ 2017-07-12 19:58   ` Jan Blunck
  2017-07-12 19:58   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
  2017-07-12 19:58   ` [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
  2017-07-12 19:58   ` [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   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v2 4/4] cryptodev: move parameter parsing to its own header
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (2 preceding siblings ...)
  2017-07-12 19:58   ` [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   ` [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 related	[flat|nested] 31+ messages in thread

* Re: [PATCH v2 3/4] cryptodev: rework PMD init to not require rte_vdev.h
  2017-07-12 19:58   ` [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: [PATCH v2 0/4] cryptodev vdev changes for -rc2
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (3 preceding siblings ...)
  2017-07-12 19:58   ` [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   ` [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: [PATCH v2 0/4] cryptodev vdev changes for -rc2
  2017-07-19 13:31   ` [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: [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

* Re: [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: [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: [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

* [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (4 preceding siblings ...)
  2017-07-19 13:31   ` [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   ` [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

* [PATCH v3 1/4] cryptodev: remove obsolete include
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (5 preceding siblings ...)
  2017-10-06  8:39   ` [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   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v3 2/4] cryptodev: move initialization
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (6 preceding siblings ...)
  2017-10-06  8:39   ` [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   ` [PATCH v3 3/4] cryptodev: rework dependency on vdev header Jan Blunck
  2017-10-06  8:39   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v3 3/4] cryptodev: rework dependency on vdev header
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (7 preceding siblings ...)
  2017-10-06  8:39   ` [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   ` [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 related	[flat|nested] 31+ messages in thread

* [PATCH v3 4/4] cryptodev: move parameter parsing to its own header
  2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
                     ` (8 preceding siblings ...)
  2017-10-06  8:39   ` [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 related	[flat|nested] 31+ messages in thread

* Re: [PATCH v3 2/4] cryptodev: move initialization
  2017-10-06  8:39   ` [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

* Re: [PATCH v3 3/4] cryptodev: rework dependency on vdev header
  2017-10-06  8:39   ` [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: [PATCH v3 4/4] cryptodev: move parameter parsing to its own header
  2017-10-06  8:39   ` [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

* Re: [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: [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: [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

* Re: [PATCH v3 0/4] cryptodev vdev changes for 17.11-rc1
  2017-10-06  8:39   ` [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: [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

end of thread, other threads:[~2017-10-25 16:05 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  7:59 [PATCH 0/2] cryptodev vdev changes for -rc2 Jan Blunck
2017-07-12  7:59 ` [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
2017-07-12 12:35   ` De Lara Guarch, Pablo
2017-07-12  7:59 ` [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h Jan Blunck
2017-07-12 12:39   ` De Lara Guarch, Pablo
2017-07-12 13:07     ` De Lara Guarch, Pablo
2017-07-12 19:58 ` [PATCH v2 0/4] cryptodev vdev changes for -rc2 Jan Blunck
2017-07-12 19:58   ` [PATCH v2 1/4] cryptodev: remove obsolete include Jan Blunck
2017-07-12 19:58   ` [PATCH v2 2/4] cryptodev: move initialization Jan Blunck
2017-07-12 19:58   ` [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
2017-10-05 14:52         ` Jan Blunck
2017-10-05 15:19           ` De Lara Guarch, Pablo
2017-07-12 19:58   ` [PATCH v2 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
2017-07-19 13:31   ` [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
2017-10-06  8:39   ` [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
2017-10-06  8:39   ` [PATCH v3 1/4] cryptodev: remove obsolete include Jan Blunck
2017-10-06  8:39   ` [PATCH v3 2/4] cryptodev: move initialization Jan Blunck
2017-10-10  8:45     ` De Lara Guarch, Pablo
2017-10-06  8:39   ` [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
2017-10-10 12:49         ` De Lara Guarch, Pablo
2017-10-11 14:45           ` De Lara Guarch, Pablo
2017-10-06  8:39   ` [PATCH v3 4/4] cryptodev: move parameter parsing to its own header Jan Blunck
2017-10-10  8:48     ` De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.