From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4277A046B for ; Mon, 19 Aug 2019 13:43:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4072E1BECF; Mon, 19 Aug 2019 13:42:35 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D58B31BEBC for ; Mon, 19 Aug 2019 13:42:33 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D0B4301662E; Mon, 19 Aug 2019 11:42:33 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-32.brq.redhat.com [10.40.204.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B630100195F; Mon, 19 Aug 2019 11:42:29 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Declan Doherty , Gagandeep Singh , Hemant Agrawal , Akhil Goyal , Pablo de Lara , Tomasz Duszynski , Michael Shamis , Liron Himi , Anoob Joseph , Fan Zhang , Jay Zhou Date: Mon, 19 Aug 2019 13:41:55 +0200 Message-Id: <1566214919-32250-8-git-send-email-david.marchand@redhat.com> In-Reply-To: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> References: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 19 Aug 2019 11:42:33 +0000 (UTC) Subject: [dpdk-dev] [PATCH 07/11] drivers/crypto: use new logtype wrapper 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Make use of the newly introduced wrapper. Signed-off-by: David Marchand --- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 7 ++--- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 6 ++-- drivers/crypto/caam_jr/caam_jr.c | 8 ++--- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 9 ++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++--- drivers/crypto/kasumi/rte_kasumi_pmd.c | 6 ++-- drivers/crypto/mvsam/rte_mrvl_pmd.c | 6 ++-- drivers/crypto/null/null_crypto_pmd.c | 6 ++-- drivers/crypto/octeontx/otx_cryptodev.c | 9 ++---- drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++-- drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 6 ++-- drivers/crypto/snow3g/rte_snow3g_pmd.c | 6 ++-- drivers/crypto/virtio/virtio_cryptodev.c | 35 +++++++--------------- drivers/crypto/zuc/rte_zuc_pmd.c | 6 ++-- 14 files changed, 36 insertions(+), 88 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 1006a5c..0d855d2 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -663,8 +663,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD, 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index b495a96..1cf9d5d 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -1380,7 +1380,5 @@ 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index 77c0303..4824e13 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -2500,9 +2500,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CAAM_JR_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(caam_jr_crypto_drv, cryptodev_caam_jr_drv.driver, cryptodev_driver_id); -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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 26458e5..3cb7b08 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3454,10 +3454,5 @@ 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 122c80a..3071258 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2765,9 +2765,5 @@ 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 3abdb01..1f30561 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -625,7 +625,5 @@ 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index ef2e5ed..4349efd 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -1021,7 +1021,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD, 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index d5e3064..d70cd02 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -248,7 +248,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c index fc64a5f..fd44763 100644 --- a/drivers/crypto/octeontx/otx_cryptodev.c +++ b/drivers/crypto/octeontx/otx_cryptodev.c @@ -121,10 +121,5 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table); 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_cryptodev_logtype = rte_log_register("pmd.crypto.octeontx"); - if (otx_cryptodev_logtype >= 0) - rte_log_set_level(otx_cryptodev_logtype, RTE_LOG_NOTICE); -} +RTE_LOG_REGISTER(otx_cryptodev_logtype, "pmd.crypto.octeontx", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 2f55528..372dfb5 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -2198,7 +2198,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD, 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c index 1fef88f..57e7401 100644 --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c @@ -578,7 +578,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", + RTE_LOG_NOTICE, RTE_LOGTYPE_CRYPTODEV); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 68d7176..fea2dfe 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -636,7 +636,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, 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_drivern "pmd.crypto.snow3g", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index f16bdfe..6e2a5ac 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1490,28 +1490,13 @@ 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); +RTE_LOG_REGISTER(virtio_crypto_logtype_session, "pmd.crypto.virtio.session", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); +RTE_LOG_REGISTER(virtio_crypto_logtype_rx, "pmd.crypto.virtio.rx", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); +RTE_LOG_REGISTER(virtio_crypto_logtype_tx, "pmd.crypto.virtio.tx", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); +RTE_LOG_REGISTER(virtio_crypto_logtype_driver, "pmd.crypto.virtio.driver", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 637994d..e6a9cb7 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -544,7 +544,5 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD, 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", + RTE_LOG_NOTICE, RTE_LOGTYPE_PMD); -- 1.8.3.1