From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3496F28EE for ; Mon, 22 May 2017 15:54:43 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 06:54:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,377,1491289200"; d="scan'208";a="1172710047" Received: from gklab-246-025.igk.intel.com (HELO Sent) ([10.217.246.25]) by fmsmga002.fm.intel.com with SMTP; 22 May 2017 06:54:39 -0700 Received: by Sent (sSMTP sendmail emulation); Mon, 22 May 2017 15:54:34 +0200 From: Slawomir Mrozowicz To: declan.doherty@intel.com Cc: dev@dpdk.org, Slawomir Mrozowicz Date: Mon, 22 May 2017 15:54:30 +0200 Message-Id: <20170522135430.25668-1-slawomirx.mrozowicz@intel.com> X-Mailer: git-send-email 2.9.4 Subject: [dpdk-dev] [PATCH] cryptodev: remove crypto device driver name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 May 2017 13:54:45 -0000 Remove crypto device driver name string definitions from librte_cryptodev, which avoid to library changes every time a new crypto driver was added. The driver name is predefined internaly in the each PMD. The applications could use the crypto device driver names based on options with the driver name string provided in command line. Signed-off-by: Slawomir Mrozowicz --- doc/guides/rel_notes/release_17_08.rst | 2 ++ drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 3 +++ drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 3 +++ drivers/crypto/armv8/rte_armv8_pmd_private.h | 3 +++ drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 3 +++ drivers/crypto/kasumi/rte_kasumi_pmd_private.h | 3 +++ drivers/crypto/null/null_crypto_pmd_private.h | 3 +++ drivers/crypto/openssl/rte_openssl_pmd_private.h | 2 ++ drivers/crypto/qat/qat_crypto.h | 3 +++ drivers/crypto/scheduler/scheduler_pmd_private.h | 3 +++ drivers/crypto/snow3g/rte_snow3g_pmd_private.h | 3 +++ drivers/crypto/zuc/rte_zuc_pmd_private.h | 3 +++ lib/librte_cryptodev/rte_cryptodev.h | 23 ---------------------- test/test/test_cryptodev.h | 12 +++++++++++ 14 files changed, 46 insertions(+), 23 deletions(-) diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst index 347828d..542076f 100644 --- a/doc/guides/rel_notes/release_17_08.rst +++ b/doc/guides/rel_notes/release_17_08.rst @@ -123,6 +123,8 @@ API Changes * Changes device type identification to be based on a unique driver id uint8_t type replacing the previous device type enumeration. +* Moved crypto device driver names definitions to the particular PMDs. + These names are not public anymore. ABI Changes ----------- diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h index 0496b44..8c43eae 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h @@ -35,6 +35,9 @@ #include "aesni_gcm_ops.h" +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +/**< AES-NI GCM PMD device name */ + #define GCM_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), \ diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h index 0d82699..5b61a6c 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h @@ -35,6 +35,9 @@ #include "aesni_mb_ops.h" +#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb +/**< AES-NI Multi buffer PMD device name */ + #define MB_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), \ diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h index b75107f..864e7ad 100644 --- a/drivers/crypto/armv8/rte_armv8_pmd_private.h +++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h @@ -33,6 +33,9 @@ #ifndef _RTE_ARMV8_PMD_PRIVATE_H_ #define _RTE_ARMV8_PMD_PRIVATE_H_ +#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8 +/**< ARMv8 Crypto PMD device name */ + #define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index f5c6169..84d18e2 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -34,6 +34,9 @@ #ifndef _RTE_DPAA2_SEC_PMD_PRIVATE_H_ #define _RTE_DPAA2_SEC_PMD_PRIVATE_H_ +#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec_pmd +/**< Open SSL Crypto PMD device name */ + #define MAX_QUEUES 64 #define MAX_DESC_SIZE 64 /** private data structure for each DPAA2_SEC device */ diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h index fb586ca..cd018ae 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h @@ -35,6 +35,9 @@ #include +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +/**< KASUMI PMD device name */ + #define KASUMI_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), \ diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h index acebc97..4d1c3c9 100644 --- a/drivers/crypto/null/null_crypto_pmd_private.h +++ b/drivers/crypto/null/null_crypto_pmd_private.h @@ -35,6 +35,9 @@ #include "rte_config.h" +#define CRYPTODEV_NAME_NULL_PMD crypto_null +/**< Null crypto PMD device name */ + #define NULL_CRYPTO_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_NULL_PMD), \ diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h index 4d820c5..67ae55e 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h @@ -36,6 +36,8 @@ #include #include +#define CRYPTODEV_NAME_OPENSSL_PMD crypto_openssl +/**< Open SSL Crypto PMD device name */ #define OPENSSL_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h index efcf607..ed27e3b 100644 --- a/drivers/crypto/qat/qat_crypto.h +++ b/drivers/crypto/qat/qat_crypto.h @@ -39,6 +39,9 @@ #include "qat_crypto_capabilities.h" +#define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat +/**< Intel QAT Symmetric Crypto PMD device name */ + /* * This macro rounds up a number to a be a multiple of * the alignment when the alignment is a power of 2 diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h index 615a207..c41bfb0 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_private.h +++ b/drivers/crypto/scheduler/scheduler_pmd_private.h @@ -36,6 +36,9 @@ #include "rte_cryptodev_scheduler.h" +#define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler +/**< Scheduler Crypto PMD device name */ + #define PER_SLAVE_BUFF_SIZE (256) #define CS_LOG_ERR(fmt, args...) \ diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h index 03973b9..30cf3f1 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h @@ -35,6 +35,9 @@ #include +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +/**< SNOW 3G PMD device name */ + #define SNOW3G_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), \ diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h index 030f120..92bcfc0 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd_private.h +++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h @@ -35,6 +35,9 @@ #include +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +/**< KASUMI PMD device name */ + #define ZUC_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \ RTE_STR(CRYPTODEV_NAME_ZUC_PMD), \ diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index eaa7d90..27a3a07 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -50,29 +50,6 @@ extern "C" { #include "rte_dev.h" #include -#define CRYPTODEV_NAME_NULL_PMD crypto_null -/**< Null crypto PMD device name */ -#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb -/**< AES-NI Multi buffer PMD device name */ -#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm -/**< AES-NI GCM PMD device name */ -#define CRYPTODEV_NAME_OPENSSL_PMD crypto_openssl -/**< Open SSL Crypto PMD device name */ -#define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat -/**< Intel QAT Symmetric Crypto PMD device name */ -#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g -/**< SNOW 3G PMD device name */ -#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi -/**< KASUMI PMD device name */ -#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc -/**< KASUMI PMD device name */ -#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8 -/**< ARMv8 Crypto PMD device name */ -#define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler -/**< Scheduler Crypto PMD device name */ -#define CRYPTODEV_NAME_DPAA2_SEC_PMD cryptodev_dpaa2_sec_pmd -/**< NXP DPAA2 - SEC PMD device name */ - extern const char **rte_cyptodev_names; /* Logging Macros */ diff --git a/test/test/test_cryptodev.h b/test/test/test_cryptodev.h index 67354a9..8d803fe 100644 --- a/test/test/test_cryptodev.h +++ b/test/test/test_cryptodev.h @@ -71,6 +71,18 @@ #define TRUNCATED_DIGEST_BYTE_LENGTH_SHA384 (24) #define TRUNCATED_DIGEST_BYTE_LENGTH_SHA512 (32) +#define CRYPTODEV_NAME_NULL_PMD crypto_null +#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +#define CRYPTODEV_NAME_OPENSSL_PMD crypto_openssl +#define CRYPTODEV_NAME_QAT_SYM_PMD crypto_qat +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8 +#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec_pmd +#define CRYPTODEV_NAME_SCHEDULER_PMD crypto_scheduler + /** * Write (spread) data from buffer to mbuf data * -- 2.5.0