From: Jan Blunck <jblunck@infradead.org>
To: dev@dpdk.org
Cc: declan.doherty@intel.com
Subject: [dpdk-dev] [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h
Date: Wed, 12 Jul 2017 03:59:40 -0400 [thread overview]
Message-ID: <20170712075940.58559-3-jblunck@infradead.org> (raw)
In-Reply-To: <20170712075940.58559-1-jblunck@infradead.org>
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
next prev parent reply other threads:[~2017-07-12 7:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 7:59 [dpdk-dev] [PATCH 0/2] cryptodev vdev changes for -rc2 Jan Blunck
2017-07-12 7:59 ` [dpdk-dev] [PATCH 1/2] cryptodev: remove obsolete include Jan Blunck
2017-07-12 12:35 ` De Lara Guarch, Pablo
2017-07-12 7:59 ` Jan Blunck [this message]
2017-07-12 12:39 ` [dpdk-dev] [PATCH 2/2] cryptodev: rework cryptodev PMD init to not require rte_vdev.h De Lara Guarch, Pablo
2017-07-12 13:07 ` De Lara Guarch, Pablo
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 ` [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
2017-10-05 14:52 ` Jan Blunck
2017-10-05 15:19 ` 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
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
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
2017-10-06 8:39 ` [dpdk-dev] [PATCH v3 1/4] cryptodev: remove obsolete include Jan Blunck
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
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
2017-10-10 12:49 ` De Lara Guarch, Pablo
2017-10-11 14:45 ` 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
2017-10-10 8:48 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170712075940.58559-3-jblunck@infradead.org \
--to=jblunck@infradead.org \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).