@@ -13,8 +13,6 @@
#include "aesni_gcm_pmd_private.h"
-int aesni_gcm_logtype_driver;
-
static uint8_t cryptodev_driver_id;
/* setup session handlers */
@@ -889,8 +887,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
cryptodev_driver_id);
-
-RTE_INIT(aesni_gcm_init_log)
-{
- aesni_gcm_logtype_driver = rte_log_register("pmd.crypto.aesni_gcm");
-}
+RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
@@ -15,8 +15,6 @@
#include "aesni_mb_pmd_private.h"
-int aesni_mb_logtype_driver;
-
#define AES_CCM_DIGEST_MIN_LEN 4
#define AES_CCM_DIGEST_MAX_LEN 16
#define HMAC_MAX_BLOCK_SIZE 128
@@ -1744,8 +1742,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
cryptodev_aesni_mb_pmd_drv.driver,
cryptodev_driver_id);
-
-RTE_INIT(aesni_mb_init_log)
-{
- aesni_mb_logtype_driver = rte_log_register("pmd.crypto.aesni_mb");
-}
+RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
@@ -35,7 +35,6 @@
#endif
#define CRYPTODEV_NAME_CAAM_JR_PMD crypto_caam_jr
static uint8_t cryptodev_driver_id;
-int caam_jr_logtype;
/* Lists the states possible for the SEC user space driver. */
enum sec_driver_state_e {
@@ -2477,9 +2476,4 @@ RTE_INIT(caam_jr_init)
sec_job_rings_init();
}
-RTE_INIT(caam_jr_init_log)
-{
- caam_jr_logtype = rte_log_register("pmd.crypto.caam");
- if (caam_jr_logtype >= 0)
- rte_log_set_level(caam_jr_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(caam_jr_logtype, pmd.crypto.caam, NOTICE);
@@ -58,8 +58,6 @@
static uint8_t cryptodev_driver_id;
-int dpaa2_logtype_sec;
-
#ifdef RTE_LIBRTE_SECURITY
static inline int
build_proto_compound_sg_fd(dpaa2_sec_session *sess,
@@ -3918,11 +3916,4 @@ static struct cryptodev_driver dpaa2_sec_crypto_drv;
RTE_PMD_REGISTER_DPAA2(CRYPTODEV_NAME_DPAA2_SEC_PMD, rte_dpaa2_sec_driver);
RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa2_sec_crypto_drv,
rte_dpaa2_sec_driver.driver, cryptodev_driver_id);
-
-RTE_INIT(dpaa2_sec_init_log)
-{
- /* Bus level logs */
- dpaa2_logtype_sec = rte_log_register("pmd.crypto.dpaa2");
- if (dpaa2_logtype_sec >= 0)
- rte_log_set_level(dpaa2_logtype_sec, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa2_logtype_sec, pmd.crypto.dpaa2, NOTICE);
@@ -43,8 +43,6 @@
#include <dpaa_sec_log.h>
#include <dpaax_iova_table.h>
-int dpaa_logtype_sec;
-
static uint8_t cryptodev_driver_id;
static __thread struct rte_crypto_op **dpaa_sec_ops;
@@ -3520,10 +3518,4 @@ static struct cryptodev_driver dpaa_sec_crypto_drv;
RTE_PMD_REGISTER_DPAA(CRYPTODEV_NAME_DPAA_SEC_PMD, rte_dpaa_sec_driver);
RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver.driver,
cryptodev_driver_id);
-
-RTE_INIT(dpaa_sec_init_log)
-{
- dpaa_logtype_sec = rte_log_register("pmd.crypto.dpaa");
- if (dpaa_logtype_sec >= 0)
- rte_log_set_level(dpaa_logtype_sec, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa_logtype_sec, pmd.crypto.dpaa, NOTICE);
@@ -17,7 +17,6 @@
#define KASUMI_MAX_BURST 4
#define BYTE_LEN 8
-int kasumi_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
@@ -639,7 +638,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
-RTE_INIT(kasumi_init_log)
-{
- kasumi_logtype_driver = rte_log_register("pmd.crypto.kasumi");
-}
+RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
@@ -19,7 +19,6 @@
#define MRVL_PMD_MAX_NB_SESS_ARG ("max_nb_sessions")
#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS 2048
-int mrvl_logtype_driver;
static uint8_t cryptodev_driver_id;
struct mrvl_pmd_init_params {
@@ -1020,8 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
cryptodev_driver_id);
-
-RTE_INIT(crypto_mrvl_init_log)
-{
- mrvl_logtype_driver = rte_log_register("pmd.crypto.mvsam");
-}
+RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
@@ -4,11 +4,4 @@
#include <rte_log.h>
-int nitrox_logtype;
-
-RTE_INIT(nitrox_init_log)
-{
- nitrox_logtype = rte_log_register("pmd.crypto.nitrox");
- if (nitrox_logtype >= 0)
- rte_log_set_level(nitrox_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
@@ -10,7 +10,6 @@
#include "null_crypto_pmd_private.h"
static uint8_t cryptodev_driver_id;
-int null_logtype_driver;
/** verify and set session parameters */
int
@@ -249,8 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
cryptodev_driver_id);
-
-RTE_INIT(null_init_log)
-{
- null_logtype_driver = rte_log_register("pmd.crypto.null");
-}
+RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
@@ -15,7 +15,6 @@
#include "cpt_pmd_logs.h"
uint8_t otx_cryptodev_driver_id;
-int otx_cpt_logtype;
static struct rte_pci_id pci_id_cpt_table[] = {
{
@@ -112,11 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
otx_cryptodev_driver_id);
-
-RTE_INIT(otx_cpt_init_log)
-{
- /* Bus level logs */
- otx_cpt_logtype = rte_log_register("pmd.crypto.octeontx");
- if (otx_cpt_logtype >= 0)
- rte_log_set_level(otx_cpt_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
@@ -22,8 +22,6 @@
#include "cpt_common.h"
#include "cpt_pmd_logs.h"
-int otx2_cpt_logtype;
-
uint8_t otx2_cryptodev_driver_id;
static struct rte_pci_id pci_id_cpt_table[] = {
@@ -146,17 +144,9 @@ static struct rte_pci_driver otx2_cryptodev_pmd = {
static struct cryptodev_driver otx2_cryptodev_drv;
-RTE_INIT(otx2_cpt_init_log);
RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX2_PMD, otx2_cryptodev_pmd);
RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
otx2_cryptodev_driver_id);
-
-RTE_INIT(otx2_cpt_init_log)
-{
- /* Bus level logs */
- otx2_cpt_logtype = rte_log_register("pmd.crypto.octeontx2");
- if (otx2_cpt_logtype >= 0)
- rte_log_set_level(otx2_cpt_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
@@ -18,7 +18,6 @@
#define DES_BLOCK_SIZE 8
-int openssl_logtype_driver;
static uint8_t cryptodev_driver_id;
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
@@ -2279,8 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-
-RTE_INIT(openssl_init_log)
-{
- openssl_logtype_driver = rte_log_register("pmd.crypto.openssl");
-}
+RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
@@ -10,8 +10,6 @@
#include "rte_cryptodev_scheduler.h"
#include "scheduler_pmd_private.h"
-int scheduler_logtype_driver;
-
/** update the scheduler pmd's capability with attaching device's
* capability.
* For each device to be attached, the scheduler's capability should be
@@ -578,7 +576,5 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
return (*sched_ctx->ops.option_get)(dev, option_type, option);
}
-RTE_INIT(scheduler_init_log)
-{
- scheduler_logtype_driver = rte_log_register("pmd.crypto.scheduler");
-}
+
+RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
@@ -16,7 +16,6 @@
#define SNOW3G_MAX_BURST 8
#define BYTE_LEN 8
-int snow3g_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
@@ -653,8 +652,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-
-RTE_INIT(snow3g_init_log)
-{
- snow3g_logtype_driver = rte_log_register("pmd.crypto.snow3g");
-}
+RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
@@ -17,12 +17,6 @@
#include "virtio_crypto_algs.h"
#include "virtio_crypto_capabilities.h"
-int virtio_crypto_logtype_init;
-int virtio_crypto_logtype_session;
-int virtio_crypto_logtype_rx;
-int virtio_crypto_logtype_tx;
-int virtio_crypto_logtype_driver;
-
static int virtio_crypto_dev_configure(struct rte_cryptodev *dev,
struct rte_cryptodev_config *config);
static int virtio_crypto_dev_start(struct rte_cryptodev *dev);
@@ -1489,29 +1483,10 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
rte_virtio_crypto_driver.driver,
cryptodev_virtio_driver_id);
-
-RTE_INIT(virtio_crypto_init_log)
-{
- virtio_crypto_logtype_init = rte_log_register("pmd.crypto.virtio.init");
- if (virtio_crypto_logtype_init >= 0)
- rte_log_set_level(virtio_crypto_logtype_init, RTE_LOG_NOTICE);
-
- virtio_crypto_logtype_session =
- rte_log_register("pmd.crypto.virtio.session");
- if (virtio_crypto_logtype_session >= 0)
- rte_log_set_level(virtio_crypto_logtype_session,
- RTE_LOG_NOTICE);
-
- virtio_crypto_logtype_rx = rte_log_register("pmd.crypto.virtio.rx");
- if (virtio_crypto_logtype_rx >= 0)
- rte_log_set_level(virtio_crypto_logtype_rx, RTE_LOG_NOTICE);
-
- virtio_crypto_logtype_tx = rte_log_register("pmd.crypto.virtio.tx");
- if (virtio_crypto_logtype_tx >= 0)
- rte_log_set_level(virtio_crypto_logtype_tx, RTE_LOG_NOTICE);
-
- virtio_crypto_logtype_driver =
- rte_log_register("pmd.crypto.virtio.driver");
- if (virtio_crypto_logtype_driver >= 0)
- rte_log_set_level(virtio_crypto_logtype_driver, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
+ NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
+ NOTICE);
@@ -14,7 +14,6 @@
#define ZUC_MAX_BURST 16
#define BYTE_LEN 8
-int zuc_logtype_driver;
static uint8_t cryptodev_driver_id;
/** Get xform chain order. */
@@ -580,8 +579,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
cryptodev_driver_id);
-
-RTE_INIT(zuc_init_log)
-{
- zuc_logtype_driver = rte_log_register("pmd.crypto.zuc");
-}
+RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);