Show a patch.

GET /api/patches/45106/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 45106,
    "url": "http://patches.dpdk.org/api/patches/45106/",
    "web_url": "http://patches.dpdk.org/patch/45106/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<1537536294-16703-4-git-send-email-amo@semihalf.com>",
    "date": "2018-09-21T13:24:54",
    "name": "[v2,3/3] crypto/mvsam: add dynamic logging support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5c0c86c75805ac34204504cb8ac71b6b6bd7dda9",
    "submitter": {
        "id": 1112,
        "url": "http://patches.dpdk.org/api/people/1112/",
        "name": "Andrzej Ostruszka",
        "email": "amo@semihalf.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "akhil.goyal@nxp.com"
    },
    "mbox": "http://patches.dpdk.org/patch/45106/mbox/",
    "series": [
        {
            "id": 1440,
            "url": "http://patches.dpdk.org/api/series/1440/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1440",
            "date": "2018-09-21T13:24:51",
            "name": "crypto/mvsam: yet another round of features",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1440/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45106/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45106/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Gm-Message-State": "APzg51C59hXQneHTYSLRibKQtlkuitDoVTH7GXcYJzmceYzm5N1CyM7z\n\tSdsngre2vcPZIlICdshXQpYsAMU0534=",
        "X-Google-Smtp-Source": "ANB0VdaMB6i3NB0G3LeF3ccQBGEZcxL7vcbMUDVG5MRhb8iHl1qhcFs4s7OTlV//WNZBoewa4wQWKw==",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<1535372574-18950-1-git-send-email-tdu@semihalf.com>\n\t<1537536294-16703-1-git-send-email-amo@semihalf.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/3] crypto/mvsam: add dynamic logging support",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA380532C;\n\tFri, 21 Sep 2018 15:25:04 +0200 (CEST)",
            "from mail-lf1-f46.google.com (mail-lf1-f46.google.com\n\t[209.85.167.46]) by dpdk.org (Postfix) with ESMTP id 28D4F4CC3\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 15:25:01 +0200 (CEST)",
            "by mail-lf1-f46.google.com with SMTP id g24-v6so11428728lfb.11\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 06:25:01 -0700 (PDT)",
            "from amok.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.googlemail.com with ESMTPSA id\n\tv14-v6sm4868767lji.80.2018.09.21.06.24.58\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 21 Sep 2018 06:24:59 -0700 (PDT)"
        ],
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Mailer": "git-send-email 2.7.4",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=6FCrI51fp2KRdC+ZHqf1JIjssn0cwJRZlYySkUQ785s=;\n\tb=bx+9jAh9K9B0x9DqfNoegUCSe2uK1cyy0cp9aDOZHVVYvEqYbQfs9aST1FpqR9evXS\n\tVb0bGr+sYTJRnd+v2E5aNwW1yvW4/eX6NpylnvgGpoaKurItxnzsiq9qIF9+IHzejOuL\n\tiQjbA81eJmhJ9LngH33g2YuY1KhLlt8kgMLwgUaiEVWLON3WKuErK4I1Mn35OE7uvaiF\n\tcuaP3lsTqBp7LSP/VCNlBzsYVP1bALPpFuT51HsxzlKaaVqVHkcaQ0cdzOBsFi3lD3T+\n\to/ovsv+oGTuQaC7r2eFdFYnXBgAZ17kidvSduwUsoDmTjrbL07OrornmSWjCvMPAmdhj\n\toH9A==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=6FCrI51fp2KRdC+ZHqf1JIjssn0cwJRZlYySkUQ785s=;\n\tb=ulkUO3QwxuBLUVxNbq8CIaoMj2+J+Vckn4J8j6Vdxv2i9+QNa8LmCQxcifhjTVUIV3\n\tec9H51T5xvlTC5sDuN+tOnob87rY0Aj17DZJ6PCyVic2CMOr+EH14ZKU4Fs65fQ1zczN\n\tIBnvlN+fI2VcEx3spNsUXH3iXR94ipRk4/2FjghFB9fdirFS0Od4j8tZQGa9OBFV5uE7\n\tTrPZZa3+m7AWqiwm9ASyYWGfJO+4dkNMyq8jifYJrm/sHv4vi9TTRVAnMWkdSnZnNuUR\n\toU37NUI9xSG1IFl3x2hJRA5A+vG2lh+Qbew+TvsX8K5OrCpoUFN0k0SQCqGgGc1bEHTN\n\thGFg==",
        "Date": "Fri, 21 Sep 2018 15:24:54 +0200",
        "X-Received": "by 2002:a19:1853:: with SMTP id\n\to80-v6mr17337808lfi.10.1537536300368; \n\tFri, 21 Sep 2018 06:25:00 -0700 (PDT)",
        "To": "dev@dpdk.org",
        "From": "Andrzej Ostruszka <amo@semihalf.com>",
        "In-Reply-To": "<1537536294-16703-1-git-send-email-amo@semihalf.com>",
        "Cc": "mw@semihalf.com, nadavh@marvell.com, Tomasz Duszynski <tdu@semihalf.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<1537536294-16703-4-git-send-email-amo@semihalf.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "From: Tomasz Duszynski <tdu@semihalf.com>\n\nAdd dynamic logging support to mvsam crypto PMD.\n\nSigned-off-by: Tomasz Duszynski <tdu@semihalf.com>\n---\n config/common_base                          |  1 -\n drivers/crypto/mvsam/rte_mrvl_pmd.c         | 74 ++++++++++++++---------------\n drivers/crypto/mvsam/rte_mrvl_pmd_ops.c     | 10 ++--\n drivers/crypto/mvsam/rte_mrvl_pmd_private.h | 27 +++--------\n 4 files changed, 49 insertions(+), 63 deletions(-)",
    "diff": "diff --git a/config/common_base b/config/common_base\nindex 155c7d4..61c7f6d 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -559,7 +559,6 @@ CONFIG_RTE_LIBRTE_PMD_CCP=n\n # Compile PMD for Marvell Crypto device\n #\n CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO=n\n-CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO_DEBUG=n\n \n #\n # Compile generic security library\ndiff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c\nindex 35dd659..2afdd3b 100644\n--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c\n+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c\n@@ -210,7 +210,7 @@ mrvl_crypto_set_cipher_session_parameters(struct mrvl_crypto_session *sess,\n {\n \t/* Make sure we've got proper struct */\n \tif (cipher_xform->type != RTE_CRYPTO_SYM_XFORM_CIPHER) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Wrong xform struct provided!\");\n+\t\tMRVL_LOG(ERR, \"Wrong xform struct provided!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -218,7 +218,7 @@ mrvl_crypto_set_cipher_session_parameters(struct mrvl_crypto_session *sess,\n \tif ((cipher_xform->cipher.algo > RTE_DIM(cipher_map)) ||\n \t\t(cipher_map[cipher_xform->cipher.algo].supported\n \t\t\t!= ALGO_SUPPORTED)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Cipher algorithm not supported!\");\n+\t\tMRVL_LOG(ERR, \"Cipher algorithm not supported!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -238,7 +238,7 @@ mrvl_crypto_set_cipher_session_parameters(struct mrvl_crypto_session *sess,\n \t/* Get max key length. */\n \tif (cipher_xform->cipher.key.length >\n \t\tcipher_map[cipher_xform->cipher.algo].max_key_len) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Wrong key length!\");\n+\t\tMRVL_LOG(ERR, \"Wrong key length!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -261,14 +261,14 @@ mrvl_crypto_set_auth_session_parameters(struct mrvl_crypto_session *sess,\n {\n \t/* Make sure we've got proper struct */\n \tif (auth_xform->type != RTE_CRYPTO_SYM_XFORM_AUTH) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Wrong xform struct provided!\");\n+\t\tMRVL_LOG(ERR, \"Wrong xform struct provided!\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* See if map data is present and valid */\n \tif ((auth_xform->auth.algo > RTE_DIM(auth_map)) ||\n \t\t(auth_map[auth_xform->auth.algo].supported != ALGO_SUPPORTED)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Auth algorithm not supported!\");\n+\t\tMRVL_LOG(ERR, \"Auth algorithm not supported!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -300,7 +300,7 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,\n {\n \t/* Make sure we've got proper struct */\n \tif (aead_xform->type != RTE_CRYPTO_SYM_XFORM_AEAD) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Wrong xform struct provided!\");\n+\t\tMRVL_LOG(ERR, \"Wrong xform struct provided!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -308,7 +308,7 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,\n \tif ((aead_xform->aead.algo > RTE_DIM(aead_map)) ||\n \t\t(aead_map[aead_xform->aead.algo].supported\n \t\t\t!= ALGO_SUPPORTED)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"AEAD algorithm not supported!\");\n+\t\tMRVL_LOG(ERR, \"AEAD algorithm not supported!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -326,7 +326,7 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,\n \t/* Get max key length. */\n \tif (aead_xform->aead.key.length >\n \t\taead_map[aead_xform->aead.algo].max_key_len) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Wrong key length!\");\n+\t\tMRVL_LOG(ERR, \"Wrong key length!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -391,21 +391,21 @@ mrvl_crypto_set_session_parameters(struct mrvl_crypto_session *sess,\n \tif ((cipher_xform != NULL) &&\n \t\t(mrvl_crypto_set_cipher_session_parameters(\n \t\t\tsess, cipher_xform) < 0)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Invalid/unsupported cipher parameters\");\n+\t\tMRVL_LOG(ERR, \"Invalid/unsupported cipher parameters!\");\n \t\treturn -EINVAL;\n \t}\n \n \tif ((auth_xform != NULL) &&\n \t\t(mrvl_crypto_set_auth_session_parameters(\n \t\t\tsess, auth_xform) < 0)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Invalid/unsupported auth parameters\");\n+\t\tMRVL_LOG(ERR, \"Invalid/unsupported auth parameters!\");\n \t\treturn -EINVAL;\n \t}\n \n \tif ((aead_xform != NULL) &&\n \t\t(mrvl_crypto_set_aead_session_parameters(\n \t\t\tsess, aead_xform) < 0)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Invalid/unsupported aead parameters\");\n+\t\tMRVL_LOG(ERR, \"Invalid/unsupported aead parameters!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -443,8 +443,8 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \tint i;\n \n \tif (unlikely(op->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"MRVL CRYPTO PMD only supports session \"\n-\t\t\t\t\"oriented requests, op (%p) is sessionless.\",\n+\t\tMRVL_LOG(ERR, \"MRVL CRYPTO PMD only supports session \"\n+\t\t\t\t\"oriented requests, op (%p) is sessionless!\",\n \t\t\t\top);\n \t\treturn -EINVAL;\n \t}\n@@ -452,7 +452,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \tsess = (struct mrvl_crypto_session *)get_sym_session_private_data(\n \t\t\top->sym->session, cryptodev_driver_id);\n \tif (unlikely(sess == NULL)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Session was not created for this device\");\n+\t\tMRVL_LOG(ERR, \"Session was not created for this device!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -466,7 +466,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \t * - Segmented destination buffer is not supported\n \t */\n \tif ((segments_nb > 1) && (!op->sym->m_dst)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"op->sym->m_dst = NULL!\\n\");\n+\t\tMRVL_LOG(ERR, \"op->sym->m_dst = NULL!\");\n \t\treturn -1;\n \t}\n \t/* For non SG case:\n@@ -476,8 +476,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \tdst_mbuf = op->sym->m_dst ? op->sym->m_dst : op->sym->m_src;\n \n \tif (!rte_pktmbuf_is_contiguous(dst_mbuf)) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Segmented destination buffer \"\n-\t\t\t\t    \"not supported.\\n\");\n+\t\tMRVL_LOG(ERR, \"Segmented destination buffer not supported!\");\n \t\treturn -1;\n \t}\n \n@@ -486,7 +485,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \t\t/* Empty source. */\n \t\tif (rte_pktmbuf_data_len(src_mbuf) == 0) {\n \t\t\t/* EIP does not support 0 length buffers. */\n-\t\t\tMRVL_CRYPTO_LOG_ERR(\"Buffer length == 0 not supported!\");\n+\t\t\tMRVL_LOG(ERR, \"Buffer length == 0 not supported!\");\n \t\t\treturn -1;\n \t\t}\n \t\tsrc_bd[i].vaddr = rte_pktmbuf_mtod(src_mbuf, void *);\n@@ -502,7 +501,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,\n \t\t/* Make dst buffer fit at least source data. */\n \t\tif (rte_pktmbuf_append(dst_mbuf,\n \t\t\trte_pktmbuf_data_len(op->sym->m_src)) == NULL) {\n-\t\t\tMRVL_CRYPTO_LOG_ERR(\"Unable to set big enough dst buffer!\");\n+\t\t\tMRVL_LOG(ERR, \"Unable to set big enough dst buffer!\");\n \t\t\treturn -1;\n \t\t}\n \t}\n@@ -642,8 +641,7 @@ mrvl_crypto_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,\n \t\t\t\t\tsrc_bd[iter_ops].src_bd,\n \t\t\t\t\t&dst_bd[iter_ops],\n \t\t\t\t\tops[iter_ops]) < 0) {\n-\t\t\tMRVL_CRYPTO_LOG_ERR(\n-\t\t\t\t\"Error while parameters preparation!\");\n+\t\t\tMRVL_LOG(ERR, \"Error while preparing parameters!\");\n \t\t\tqp->stats.enqueue_err_count++;\n \t\t\tops[iter_ops]->status = RTE_CRYPTO_OP_STATUS_ERROR;\n \n@@ -721,12 +719,12 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,\n \t\t\tops[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n \t\t\tbreak;\n \t\tcase SAM_CIO_ERR_ICV:\n-\t\t\tMRVL_CRYPTO_LOG_DBG(\"CIO returned SAM_CIO_ERR_ICV.\");\n+\t\t\tMRVL_LOG(DEBUG, \"CIO returned SAM_CIO_ERR_ICV.\");\n \t\t\tops[i]->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;\n \t\t\tbreak;\n \t\tdefault:\n-\t\t\tMRVL_CRYPTO_LOG_DBG(\n-\t\t\t\t\"CIO returned Error: %d\", results[i].status);\n+\t\t\tMRVL_LOG(DEBUG,\n+\t\t\t\t\"CIO returned Error: %d.\", results[i].status);\n \t\t\tops[i]->status = RTE_CRYPTO_OP_STATUS_ERROR;\n \t\t\tbreak;\n \t\t}\n@@ -757,7 +755,7 @@ cryptodev_mrvl_crypto_create(const char *name,\n \tdev = rte_cryptodev_pmd_create(name, &vdev->device,\n \t\t\t&init_params->common);\n \tif (dev == NULL) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"failed to create cryptodev vdev\");\n+\t\tMRVL_LOG(ERR, \"Failed to create cryptodev vdev!\");\n \t\tgoto init_error;\n \t}\n \n@@ -793,8 +791,8 @@ cryptodev_mrvl_crypto_create(const char *name,\n \treturn 0;\n \n init_error:\n-\tMRVL_CRYPTO_LOG_ERR(\n-\t\t\"driver %s: %s failed\", init_params->common.name, __func__);\n+\tMRVL_LOG(ERR,\n+\t\t\"Driver %s: %s failed!\", init_params->common.name, __func__);\n \n \tcryptodev_mrvl_crypto_uninit(vdev);\n \treturn ret;\n@@ -809,7 +807,7 @@ parse_integer_arg(const char *key __rte_unused,\n \n \t*i = atoi(value);\n \tif (*i < 0) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Argument has to be positive.\\n\");\n+\t\tMRVL_LOG(ERR, \"Argument has to be positive!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -824,9 +822,8 @@ parse_name_arg(const char *key __rte_unused,\n \tstruct rte_cryptodev_pmd_init_params *params = extra_args;\n \n \tif (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Invalid name %s, should be less than \"\n-\t\t\t\t\"%u bytes.\\n\", value,\n-\t\t\t\tRTE_CRYPTODEV_NAME_MAX_LEN - 1);\n+\t\tMRVL_LOG(ERR, \"Invalid name %s, should be less than %u bytes!\",\n+\t\t\t value, RTE_CRYPTODEV_NAME_MAX_LEN - 1);\n \t\treturn -EINVAL;\n \t}\n \n@@ -918,9 +915,8 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)\n \n \tret = mrvl_pmd_parse_input_args(&init_params, args);\n \tif (ret) {\n-\t\tRTE_LOG(ERR, PMD,\n-\t\t\t\"Failed to parse initialisation arguments[%s]\\n\",\n-\t\t\targs);\n+\t\tMRVL_LOG(ERR, \"Failed to parse initialisation arguments[%s]!\",\n+\t\t\t args);\n \t\treturn -EINVAL;\n \t}\n \n@@ -942,9 +938,8 @@ cryptodev_mrvl_crypto_uninit(struct rte_vdev_device *vdev)\n \tif (name == NULL)\n \t\treturn -EINVAL;\n \n-\tRTE_LOG(INFO, PMD,\n-\t\t\"Closing Marvell crypto device %s on numa socket %u\\n\",\n-\t\tname, rte_socket_id());\n+\tMRVL_LOG(INFO, \"Closing Marvell crypto device %s on numa socket %u.\",\n+\t\t name, rte_socket_id());\n \n \tsam_deinit();\n \trte_mvep_deinit(MVEP_MOD_T_SAM);\n@@ -974,3 +969,8 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,\n \t\"socket_id=<int>\");\n RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,\n \t\tcryptodev_driver_id);\n+\n+RTE_INIT(crypto_mrvl_init_log)\n+{\n+\tmrvl_logtype_driver = rte_log_register(\"pmd.crypto.mvsam\");\n+}\ndiff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c\nindex c045562..ba6eef3 100644\n--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c\n+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c\n@@ -551,7 +551,7 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,\n \t\t */\n \t\tint num = sam_get_num_inst();\n \t\tif (num == 0) {\n-\t\t\tMRVL_CRYPTO_LOG_ERR(\"No crypto engines detected.\\n\");\n+\t\t\tMRVL_LOG(ERR, \"No crypto engines detected!\");\n \t\t\treturn -1;\n \t\t}\n \n@@ -635,7 +635,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,\n \tint ret;\n \n \tif (sess == NULL) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Invalid session struct.\");\n+\t\tMRVL_LOG(ERR, \"Invalid session struct!\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -646,7 +646,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,\n \n \tret = mrvl_crypto_set_session_parameters(sess_private_data, xform);\n \tif (ret != 0) {\n-\t\tMRVL_CRYPTO_LOG_ERR(\"Failed to configure session parameters.\");\n+\t\tMRVL_LOG(ERR, \"Failed to configure session parameters!\");\n \n \t\t/* Return session to mempool */\n \t\trte_mempool_put(mp, sess_private_data);\n@@ -658,7 +658,7 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,\n \tmrvl_sess = (struct mrvl_crypto_session *)sess_private_data;\n \tif (sam_session_create(&mrvl_sess->sam_sess_params,\n \t\t\t\t&mrvl_sess->sam_sess) < 0) {\n-\t\tMRVL_CRYPTO_LOG_DBG(\"Failed to create session!\");\n+\t\tMRVL_LOG(DEBUG, \"Failed to create session!\");\n \t\treturn -EIO;\n \t}\n \n@@ -686,7 +686,7 @@ mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,\n \n \t\tif (mrvl_sess->sam_sess &&\n \t\t    sam_session_destroy(mrvl_sess->sam_sess) < 0) {\n-\t\t\tMRVL_CRYPTO_LOG_INFO(\"Error while destroying session!\");\n+\t\t\tMRVL_LOG(ERR, \"Error while destroying session!\");\n \t\t}\n \n \t\tmemset(sess, 0, sizeof(struct mrvl_crypto_session));\ndiff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h\nindex 0689fc3..6f8cf56 100644\n--- a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h\n+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h\n@@ -12,26 +12,13 @@\n #define CRYPTODEV_NAME_MRVL_PMD crypto_mvsam\n /**< Marvell PMD device name */\n \n-#define MRVL_CRYPTO_LOG_ERR(fmt, args...) \\\n-\tRTE_LOG(ERR, CRYPTODEV, \"[%s] %s() line %u: \" fmt \"\\n\",  \\\n-\t\t\tRTE_STR(CRYPTODEV_NAME_MRVL_PMD), \\\n-\t\t\t__func__, __LINE__, ## args)\n-\n-#ifdef RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG\n-#define MRVL_CRYPTO_LOG_INFO(fmt, args...) \\\n-\tRTE_LOG(INFO, CRYPTODEV, \"[%s] %s() line %u: \" fmt \"\\n\", \\\n-\t\t\tRTE_STR(CRYPTODEV_NAME_MRVL_PMD), \\\n-\t\t\t__func__, __LINE__, ## args)\n-\n-#define MRVL_CRYPTO_LOG_DBG(fmt, args...) \\\n-\tRTE_LOG(DEBUG, CRYPTODEV, \"[%s] %s() line %u: \" fmt \"\\n\", \\\n-\t\t\tRTE_STR(CRYPTODEV_NAME_MRVL_PMD), \\\n-\t\t\t__func__, __LINE__, ## args)\n-\n-#else\n-#define MRVL_CRYPTO_LOG_INFO(fmt, args...)\n-#define MRVL_CRYPTO_LOG_DBG(fmt, args...)\n-#endif\n+/** MRVL PMD LOGTYPE DRIVER */\n+int mrvl_logtype_driver;\n+\n+#define MRVL_LOG(level, fmt, ...) \\\n+\trte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \\\n+\t\t\t\"%s() line %u: \" fmt \"\\n\", __func__, __LINE__, \\\n+\t\t\t\t\t## __VA_ARGS__)\n \n /**\n  * Handy bits->bytes conversion macro.\n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}