get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138132,
    "url": "http://patches.dpdk.org/api/patches/138132/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240308181137.69855-4-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240308181137.69855-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240308181137.69855-4-stephen@networkplumber.org",
    "date": "2024-03-08T18:10:26",
    "name": "[v3,3/3] testpmd: replace EAL logtype TESTPMD_LOG",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5368fb5fd6a0b417ec9584ceab8702d672ffdc48",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240308181137.69855-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31443,
            "url": "http://patches.dpdk.org/api/series/31443/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31443",
            "date": "2024-03-08T18:10:23",
            "name": "replace use of EAL logtype in applications",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/31443/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138132/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/138132/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 19B0643C27;\n\tFri,  8 Mar 2024 19:12:08 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0D4FD42FF3;\n\tFri,  8 Mar 2024 19:11:54 +0100 (CET)",
            "from mail-pf1-f171.google.com (mail-pf1-f171.google.com\n [209.85.210.171])\n by mails.dpdk.org (Postfix) with ESMTP id 0974342FA7\n for <dev@dpdk.org>; Fri,  8 Mar 2024 19:11:51 +0100 (CET)",
            "by mail-pf1-f171.google.com with SMTP id\n d2e1a72fcca58-6d9f94b9186so2232988b3a.0\n for <dev@dpdk.org>; Fri, 08 Mar 2024 10:11:50 -0800 (PST)",
            "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n fn17-20020a056a002fd100b006e2301e702fsm14376020pfb.125.2024.03.08.10.11.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 Mar 2024 10:11:49 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709921510;\n x=1710526310; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=hIVJamTW7xfgVF58Q7co4lJ3iGXFp9BbTu7AvhTsXRU=;\n b=OduOnq3flGv6c+24Tib+Xhf70E8+jmW2PVAKEcFXit7nJ+Q18ZET3iRe/FfWMnDvNi\n tG8U4R9bHzX1LRoqnqFzAi58N0GAKJ6y3sdCorCG8ZCOfs5XyTKXnh1n9SIFEXhp795O\n 1eBAY0a0P8LyxybtdweM9MxIRSKgeU38bIc8z2XrwUuzXoP0tqRO6GupwBvezUMm8gUg\n MqrjrcYZ+Gfx7ksYO0uhv6pzFPjgDWLWNSjgDoRVem99xW9BLpgl8QI3QYh5/vP4NbM5\n jG+6APwCKU0uUfNmWDfkCXBisi+Ele4ICDLyyYCaRXlqLKkZlDGyGs/9RSmrrgK9gOxb\n 2ahA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709921510; x=1710526310;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=hIVJamTW7xfgVF58Q7co4lJ3iGXFp9BbTu7AvhTsXRU=;\n b=k8lLK4jTcVOzC191VCXqYIwl/2bDv8qihuzsmtR0vsJ91FujIZaC/pVchsh6ewts5z\n a3Qbanz8otHMIPVfSePYoS2/DB1RY30/0o81civwl/+FmxCiaq2TqEShuIB++icNOZ2b\n Xj0t9FeKbP0nABEZdCJxT0aFiD1oxebMEDDw1bL4FQn/epQutTQEAi45J/novTmVKgmI\n R77VluPaSv5Blzz5iDTFF3zRuWJpqzz333UJOKNu3fomXvNKKFYwo2Ut5Rnop/sjWmcm\n W2b5AibVnorn4+sJSFONxuBmSMkYaKDvXGB3E2+avttiG3pnBiaBny4bE7vWxiSQ5/UF\n 66Xg==",
        "X-Gm-Message-State": "AOJu0Yyl7GdyTmDkc9PP7tWdmVfWLhjv1FRJKP9VUlKAQY9cKsGe6NEq\n RHz6LAFrqdB2Nw0oiFZ3Tw/pCMQFaOOhM2ccVUEmmv1i4OoDPFrqxXIwBs/4+PBDIDYGzyo45IN\n RJDY=",
        "X-Google-Smtp-Source": "\n AGHT+IGuNbgpefWxk7dZS2ewLHwVvTFEQPdhz4N49fKSTBNN6WXRZ4u1VSFIqJ+vz5Q01EJh5lnQTA==",
        "X-Received": "by 2002:a05:6a20:6704:b0:1a1:3cb:e1f0 with SMTP id\n q4-20020a056a20670400b001a103cbe1f0mr10814406pzh.52.1709921510121;\n Fri, 08 Mar 2024 10:11:50 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Huisong Li <lihuisong@huawei.com>, Aman Singh <aman.deep.singh@intel.com>,\n Yuying Zhang <yuying.zhang@intel.com>",
        "Subject": "[PATCH v3 3/3] testpmd: replace EAL logtype TESTPMD_LOG",
        "Date": "Fri,  8 Mar 2024 10:10:26 -0800",
        "Message-ID": "<20240308181137.69855-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240308181137.69855-1-stephen@networkplumber.org>",
        "References": "<20231211172437.61958-1-stephen@networkplumber.org>\n <20240308181137.69855-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Testpmd is misusing EAL logtype for some errors.\nSince the code directly has a macro for logging, use that.\n\nAlso, replace fprintf(stderr, ...) with TESTPMD_LOG where\nappropriate.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Huisong Li <lihuisong@huawei.com>\n\nfix testpmd\n---\n app/test-pmd/testpmd.c | 221 +++++++++++++++++++----------------------\n 1 file changed, 104 insertions(+), 117 deletions(-)",
    "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 9e4e99e53b9a..fd349b85ebe0 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -615,8 +615,8 @@ change_bonding_member_port_status(portid_t bond_pid, bool is_stop)\n \tnum_members = rte_eth_bond_members_get(bond_pid, member_pids,\n \t\t\t\t\t\tRTE_MAX_ETHPORTS);\n \tif (num_members < 0) {\n-\t\tfprintf(stderr, \"Failed to get member list for port = %u\\n\",\n-\t\t\tbond_pid);\n+\t\tTESTPMD_LOG(ERR, \"Failed to get member list for port = %u\\n\",\n+\t\t\t    bond_pid);\n \t\treturn num_members;\n \t}\n \n@@ -1289,8 +1289,8 @@ check_socket_id(const unsigned int socket_id)\n \n \tif (new_socket_id(socket_id)) {\n \t\tif (!warning_once && numa_support)\n-\t\t\tfprintf(stderr,\n-\t\t\t\t\"Warning: NUMA should be configured manually by using --port-numa-config and --ring-numa-config parameters along with --numa.\\n\");\n+\t\t\tTESTPMD_LOG(WARNING,\n+\t\t\t\t    \"NUMA should be configured manually by using --port-numa-config and --ring-numa-config parameters along with --numa.\\n\");\n \t\twarning_once = 1;\n \t\treturn -1;\n \t}\n@@ -1337,9 +1337,9 @@ check_nb_rxq(queueid_t rxq)\n \n \tallowed_max_rxq = get_allowed_max_nb_rxq(&pid);\n \tif (rxq > allowed_max_rxq) {\n-\t\tfprintf(stderr,\n-\t\t\t\"Fail: input rxq (%u) can't be greater than max_rx_queues (%u) of port %u\\n\",\n-\t\t\trxq, allowed_max_rxq, pid);\n+\t\tTESTPMD_LOG(ERR,\n+\t\t\t    \"Fail: input rxq (%u) can't be greater than max_rx_queues (%u) of port %u\\n\",\n+\t\t\t    rxq, allowed_max_rxq, pid);\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -1385,7 +1385,7 @@ check_nb_txq(queueid_t txq)\n \n \tallowed_max_txq = get_allowed_max_nb_txq(&pid);\n \tif (txq > allowed_max_txq) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input txq (%u) can't be greater than max_tx_queues (%u) of port %u\\n\",\n \t\t\ttxq, allowed_max_txq, pid);\n \t\treturn -1;\n@@ -1458,7 +1458,7 @@ check_nb_rxd(queueid_t rxd)\n \n \tallowed_max_rxd = get_allowed_max_nb_rxd(&pid);\n \tif (rxd > allowed_max_rxd) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input rxd (%u) can't be greater than max_rxds (%u) of port %u\\n\",\n \t\t\trxd, allowed_max_rxd, pid);\n \t\treturn -1;\n@@ -1466,7 +1466,7 @@ check_nb_rxd(queueid_t rxd)\n \n \tallowed_min_rxd = get_allowed_min_nb_rxd(&pid);\n \tif (rxd < allowed_min_rxd) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input rxd (%u) can't be less than min_rxds (%u) of port %u\\n\",\n \t\t\trxd, allowed_min_rxd, pid);\n \t\treturn -1;\n@@ -1539,7 +1539,7 @@ check_nb_txd(queueid_t txd)\n \n \tallowed_max_txd = get_allowed_max_nb_txd(&pid);\n \tif (txd > allowed_max_txd) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input txd (%u) can't be greater than max_txds (%u) of port %u\\n\",\n \t\t\ttxd, allowed_max_txd, pid);\n \t\treturn -1;\n@@ -1547,7 +1547,7 @@ check_nb_txd(queueid_t txd)\n \n \tallowed_min_txd = get_allowed_min_nb_txd(&pid);\n \tif (txd < allowed_min_txd) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input txd (%u) can't be less than min_txds (%u) of port %u\\n\",\n \t\t\ttxd, allowed_min_txd, pid);\n \t\treturn -1;\n@@ -1595,7 +1595,7 @@ check_nb_hairpinq(queueid_t hairpinq)\n \n \tallowed_max_hairpinq = get_allowed_max_nb_hairpinq(&pid);\n \tif (hairpinq > allowed_max_hairpinq) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: input hairpin (%u) can't be greater than max_hairpin_queues (%u) of port %u\\n\",\n \t\t\thairpinq, allowed_max_hairpinq, pid);\n \t\treturn -1;\n@@ -1841,13 +1841,13 @@ init_fwd_streams(void)\n \tRTE_ETH_FOREACH_DEV(pid) {\n \t\tport = &ports[pid];\n \t\tif (nb_rxq > port->dev_info.max_rx_queues) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Fail: nb_rxq(%d) is greater than max_rx_queues(%d)\\n\",\n \t\t\t\tnb_rxq, port->dev_info.max_rx_queues);\n \t\t\treturn -1;\n \t\t}\n \t\tif (nb_txq > port->dev_info.max_tx_queues) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Fail: nb_txq(%d) is greater than max_tx_queues(%d)\\n\",\n \t\t\t\tnb_txq, port->dev_info.max_tx_queues);\n \t\t\treturn -1;\n@@ -1876,7 +1876,7 @@ init_fwd_streams(void)\n \n \tq = RTE_MAX(nb_rxq, nb_txq);\n \tif (q == 0) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Fail: Cannot allocate fwd streams as number of queues is 0\\n\");\n \t\treturn -1;\n \t}\n@@ -2083,7 +2083,7 @@ fwd_stats_display(void)\n \n \t\tret = rte_eth_stats_get(pt_id, &stats);\n \t\tif (ret != 0) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"%s: Error: failed to get stats (port %u): %d\",\n \t\t\t\t__func__, pt_id, ret);\n \t\t\tcontinue;\n@@ -2190,7 +2190,7 @@ fwd_stats_reset(void)\n \t\tpt_id = fwd_ports_ids[i];\n \t\tret = rte_eth_stats_get(pt_id, &ports[pt_id].stats);\n \t\tif (ret != 0)\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"%s: Error: failed to clear stats (port %u):%d\",\n \t\t\t\t__func__, pt_id, ret);\n \t}\n@@ -2395,7 +2395,7 @@ launch_packet_forwarding(lcore_function_t *pkt_fwd_on_lcore)\n \t\t\tdiag = rte_eal_remote_launch(pkt_fwd_on_lcore,\n \t\t\t\t\t\t     fwd_lcores[i], lc_id);\n \t\t\tif (diag != 0)\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"launch lcore %u failed - diag=%d\\n\",\n \t\t\t\t\tlc_id, diag);\n \t\t}\n@@ -2518,11 +2518,11 @@ start_packet_forwarding(int with_tx_first)\n \t\t\tcur_fwd_eng->fwd_mode_name);\n \n \tif (all_ports_started() == 0) {\n-\t\tfprintf(stderr, \"Not all ports were started\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Not all ports were started\\n\");\n \t\treturn;\n \t}\n \tif (test_done == 0) {\n-\t\tfprintf(stderr, \"Packet forwarding already started\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Packet forwarding already started\\n\");\n \t\treturn;\n \t}\n \n@@ -2542,7 +2542,7 @@ start_packet_forwarding(int with_tx_first)\n \tif (port_fwd_begin != NULL) {\n \t\tfor (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {\n \t\t\tif (port_fwd_begin(fwd_ports_ids[i])) {\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Packet forwarding is not ready\\n\");\n \t\t\t\treturn;\n \t\t\t}\n@@ -2554,7 +2554,7 @@ start_packet_forwarding(int with_tx_first)\n \t\tif (port_fwd_begin != NULL) {\n \t\t\tfor (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {\n \t\t\t\tif (port_fwd_begin(fwd_ports_ids[i])) {\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Packet forwarding is not ready\\n\");\n \t\t\t\t\treturn;\n \t\t\t\t}\n@@ -2594,7 +2594,7 @@ stop_packet_forwarding(void)\n \tint i;\n \n \tif (test_done) {\n-\t\tfprintf(stderr, \"Packet forwarding not started\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Packet forwarding not started\\n\");\n \t\treturn;\n \t}\n \tprintf(\"Telling cores to stop...\");\n@@ -2620,14 +2620,14 @@ void\n dev_set_link_up(portid_t pid)\n {\n \tif (rte_eth_dev_set_link_up(pid) < 0)\n-\t\tfprintf(stderr, \"\\nSet link up fail.\\n\");\n+\t\tTESTPMD_LOG(ERR, \"\\nSet link up fail.\\n\");\n }\n \n void\n dev_set_link_down(portid_t pid)\n {\n \tif (rte_eth_dev_set_link_down(pid) < 0)\n-\t\tfprintf(stderr, \"\\nSet link down fail.\\n\");\n+\t\tTESTPMD_LOG(ERR, \"\\nSet link down fail.\\n\");\n }\n \n static int\n@@ -2767,9 +2767,9 @@ setup_hairpin_queues(portid_t pi, portid_t p_pi, uint16_t cnt_pi)\n \t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\telse\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Port %d can not be set back to stopped\\n\", pi);\n-\t\tfprintf(stderr, \"Fail to configure port %d hairpin queues\\n\",\n+\t\tTESTPMD_LOG(ERR, \"Fail to configure port %d hairpin queues\\n\",\n \t\t\tpi);\n \t\t/* try to reconfigure queues next time */\n \t\tport->need_reconfig_queues = 1;\n@@ -2793,9 +2793,9 @@ setup_hairpin_queues(portid_t pi, portid_t p_pi, uint16_t cnt_pi)\n \t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\telse\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Port %d can not be set back to stopped\\n\", pi);\n-\t\tfprintf(stderr, \"Fail to configure port %d hairpin queues\\n\",\n+\t\tTESTPMD_LOG(ERR, \"Fail to configure port %d hairpin queues\\n\",\n \t\t\tpi);\n \t\t/* try to reconfigure queues next time */\n \t\tport->need_reconfig_queues = 1;\n@@ -2855,7 +2855,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\tstruct rte_eth_dev_info dev_info;\n \n \t\tif (mbuf_data_size_n <= 1) {\n-\t\t\tfprintf(stderr, \"Invalid number of mempools %u\\n\",\n+\t\t\tTESTPMD_LOG(ERR, \"Invalid number of mempools %u\\n\",\n \t\t\t\tmbuf_data_size_n);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -2863,7 +2863,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\tif (ret != 0)\n \t\t\treturn ret;\n \t\tif (dev_info.max_rx_mempools == 0) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Port %u doesn't support requested multi-rx-mempool configuration.\\n\",\n \t\t\t\tport_id);\n \t\t\treturn -ENOTSUP;\n@@ -2975,7 +2975,7 @@ fill_xstats_display_info_for_port(portid_t pi)\n \t\trc = rte_eth_xstats_get_id_by_name(pi, xstat_name,\n \t\t\t\t\t\t   ids_supp + stat_supp);\n \t\tif (rc != 0) {\n-\t\t\tfprintf(stderr, \"No xstat '%s' on port %u - skip it %u\\n\",\n+\t\t\tTESTPMD_LOG(ERR, \"No xstat '%s' on port %u - skip it %u\\n\",\n \t\t\t\txstat_name, pi, stat);\n \t\t\tcontinue;\n \t\t}\n@@ -3014,7 +3014,7 @@ update_bonding_port_dev_conf(portid_t bond_pid)\n \n \tret = eth_dev_info_get_print_err(bond_pid, &port->dev_info);\n \tif (ret != 0) {\n-\t\tfprintf(stderr, \"Failed to get dev info for port = %u\\n\",\n+\t\tTESTPMD_LOG(ERR, \"Failed to get dev info for port = %u\\n\",\n \t\t\tbond_pid);\n \t\treturn;\n \t}\n@@ -3059,7 +3059,7 @@ start_port(portid_t pid)\n \t\t\tcontinue;\n \n \t\tif (port_is_bonding_member(pi)) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from bonding device.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n@@ -3072,7 +3072,7 @@ start_port(portid_t pid)\n \t\t\tport->port_status = RTE_PORT_HANDLING;\n \t\t\tall_ports_already_started = false;\n \t\t} else {\n-\t\t\tfprintf(stderr, \"Port %d is now not stopped\\n\", pi);\n+\t\t\tTESTPMD_LOG(ERR, \"Port %d is now not stopped\\n\", pi);\n \t\t\tcontinue;\n \t\t}\n \n@@ -3085,7 +3085,7 @@ start_port(portid_t pid)\n \t\t\tif (flow_isolate_all) {\n \t\t\t\tint ret = port_flow_isolate(pi, 1);\n \t\t\t\tif (ret) {\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Failed to apply isolated mode on port %d\\n\",\n \t\t\t\t\t\tpi);\n \t\t\t\t\treturn -1;\n@@ -3096,7 +3096,7 @@ start_port(portid_t pid)\n \t\t\t\t\tport->socket_id);\n \t\t\tif (nb_hairpinq > 0 &&\n \t\t\t    rte_eth_dev_hairpin_capability_get(pi, &cap)) {\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Port %d doesn't support hairpin queues\\n\",\n \t\t\t\t\tpi);\n \t\t\t\treturn -1;\n@@ -3115,10 +3115,10 @@ start_port(portid_t pid)\n \t\t\t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\t\t\telse\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Port %d can not be set back to stopped\\n\",\n \t\t\t\t\t\tpi);\n-\t\t\t\tfprintf(stderr, \"Fail to configure port %d\\n\",\n+\t\t\t\tTESTPMD_LOG(ERR, \"Fail to configure port %d\\n\",\n \t\t\t\t\tpi);\n \t\t\t\t/* try to reconfigure port next time */\n \t\t\t\tport->need_reconfig = 1;\n@@ -3127,7 +3127,7 @@ start_port(portid_t pid)\n \t\t\t/* get device configuration*/\n \t\t\tif (0 !=\n \t\t\t\teth_dev_conf_get_print_err(pi, &dev_conf)) {\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"port %d can not get device configuration\\n\",\n \t\t\t\t\tpi);\n \t\t\t\treturn -1;\n@@ -3186,10 +3186,10 @@ start_port(portid_t pid)\n \t\t\t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\t\t\telse\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Port %d can not be set back to stopped\\n\",\n \t\t\t\t\t\tpi);\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Fail to configure port %d tx queues\\n\",\n \t\t\t\t\tpi);\n \t\t\t\t/* try to reconfigure queues next time */\n@@ -3204,7 +3204,7 @@ start_port(portid_t pid)\n \t\t\t\t\t\tmbuf_pool_find\n \t\t\t\t\t\t\t(rxring_numa[pi], 0);\n \t\t\t\t\tif (mp == NULL) {\n-\t\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\t\"Failed to setup RX queue: No mempool allocation on the socket %d\\n\",\n \t\t\t\t\t\t\trxring_numa[pi]);\n \t\t\t\t\t\treturn -1;\n@@ -3220,7 +3220,7 @@ start_port(portid_t pid)\n \t\t\t\t\t\tmbuf_pool_find\n \t\t\t\t\t\t\t(port->socket_id, 0);\n \t\t\t\t\tif (mp == NULL) {\n-\t\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\t\"Failed to setup RX queue: No mempool allocation on the socket %d\\n\",\n \t\t\t\t\t\t\tport->socket_id);\n \t\t\t\t\t\treturn -1;\n@@ -3238,10 +3238,10 @@ start_port(portid_t pid)\n \t\t\t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\t\t\telse\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Port %d can not be set back to stopped\\n\",\n \t\t\t\t\t\tpi);\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Fail to configure port %d rx queues\\n\",\n \t\t\t\t\tpi);\n \t\t\t\t/* try to reconfigure queues next time */\n@@ -3257,7 +3257,7 @@ start_port(portid_t pid)\n \t\t\tdiag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN,\n \t\t\t\t\tNULL, 0);\n \t\t\tif (diag < 0)\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Port %d: Failed to disable Ptype parsing\\n\",\n \t\t\t\t\tpi);\n \t\t}\n@@ -3268,14 +3268,14 @@ start_port(portid_t pid)\n \t\t/* start port */\n \t\tdiag = eth_dev_start_mp(pi);\n \t\tif (diag < 0) {\n-\t\t\tfprintf(stderr, \"Fail to start port %d: %s\\n\",\n+\t\t\tTESTPMD_LOG(ERR, \"Fail to start port %d: %s\\n\",\n \t\t\t\tpi, rte_strerror(-diag));\n \n \t\t\t/* Fail to setup rx queue, return */\n \t\t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\t\telse\n-\t\t\t\tfprintf(stderr,\n+\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\"Port %d can not be set back to stopped\\n\",\n \t\t\t\t\tpi);\n \t\t\tcontinue;\n@@ -3284,7 +3284,7 @@ start_port(portid_t pid)\n \t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\tport->port_status = RTE_PORT_STARTED;\n \t\telse\n-\t\t\tfprintf(stderr, \"Port %d can not be set into started\\n\",\n+\t\t\tTESTPMD_LOG(ERR, \"Port %d can not be set into started\\n\",\n \t\t\t\tpi);\n \n \t\tif (eth_macaddr_get_print_err(pi, &port->eth_addr) == 0)\n@@ -3301,7 +3301,7 @@ start_port(portid_t pid)\n \tif (at_least_one_port_successfully_started && !no_link_check)\n \t\tcheck_all_ports_link_status(RTE_PORT_ALL);\n \telse if (at_least_one_port_exist & all_ports_already_started)\n-\t\tfprintf(stderr, \"Please stop the ports first\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Please stop the ports first\\n\");\n \n \tif (hairpin_mode & 0xf) {\n \t\tuint16_t i;\n@@ -3320,7 +3320,7 @@ start_port(portid_t pid)\n \t\t\t\t\tcontinue;\n \t\t\t\tdiag = rte_eth_hairpin_bind(pi, peer_pl[j]);\n \t\t\t\tif (diag < 0) {\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Error during binding hairpin Tx port %u to %u: %s\\n\",\n \t\t\t\t\t\tpi, peer_pl[j],\n \t\t\t\t\t\trte_strerror(-diag));\n@@ -3337,7 +3337,7 @@ start_port(portid_t pid)\n \t\t\t\t\tcontinue;\n \t\t\t\tdiag = rte_eth_hairpin_bind(peer_pl[j], pi);\n \t\t\t\tif (diag < 0) {\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Error during binding hairpin Tx port %u to %u: %s\\n\",\n \t\t\t\t\t\tpeer_pl[j], pi,\n \t\t\t\t\t\trte_strerror(-diag));\n@@ -3373,14 +3373,14 @@ stop_port(portid_t pid)\n \t\t\tcontinue;\n \n \t\tif (port_is_forwarding(pi) != 0 && test_done == 0) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from forwarding configuration.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (port_is_bonding_member(pi)) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from bonding device.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n@@ -3413,8 +3413,8 @@ stop_port(portid_t pid)\n \n \t\tret = eth_dev_stop_mp(pi);\n \t\tif (ret != 0) {\n-\t\t\tRTE_LOG(ERR, EAL, \"rte_eth_dev_stop failed for port %u\\n\",\n-\t\t\t\tpi);\n+\t\t\tTESTPMD_LOG(ERR,\n+\t\t\t\t    \"rte_eth_dev_stop failed for port %u\\n\", pi);\n \t\t\t/* Allow to retry stopping the port. */\n \t\t\tport->port_status = RTE_PORT_STARTED;\n \t\t\tcontinue;\n@@ -3423,8 +3423,7 @@ stop_port(portid_t pid)\n \t\tif (port->port_status == RTE_PORT_HANDLING)\n \t\t\tport->port_status = RTE_PORT_STOPPED;\n \t\telse\n-\t\t\tfprintf(stderr, \"Port %d can not be set into stopped\\n\",\n-\t\t\t\tpi);\n+\t\t\tTESTPMD_LOG(ERR, \"Port %d can not be set into stopped\\n\", pi);\n \t\tneed_check_link_status = 1;\n \t}\n \tif (need_check_link_status && !no_link_check)\n@@ -3478,7 +3477,7 @@ clear_bonding_member_device(portid_t *member_pids, uint16_t num_members)\n \t\tmember_pid = member_pids[i];\n \t\tif (port_is_started(member_pid) == 1) {\n \t\t\tif (rte_eth_dev_stop(member_pid) != 0)\n-\t\t\t\tfprintf(stderr, \"rte_eth_dev_stop failed for port %u\\n\",\n+\t\t\t\tTESTPMD_LOG(ERR, \"rte_eth_dev_stop failed for port %u\\n\",\n \t\t\t\t\tmember_pid);\n \n \t\t\tport = &ports[member_pid];\n@@ -3511,14 +3510,14 @@ close_port(portid_t pid)\n \t\t\tcontinue;\n \n \t\tif (port_is_forwarding(pi) != 0 && test_done == 0) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from forwarding configuration.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (port_is_bonding_member(pi)) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from bonding device.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n@@ -3526,7 +3525,7 @@ close_port(portid_t pid)\n \n \t\tport = &ports[pi];\n \t\tif (port->port_status == RTE_PORT_CLOSED) {\n-\t\t\tfprintf(stderr, \"Port %d is already closed\\n\", pi);\n+\t\t\tTESTPMD_LOG(ERR, \"Port %d is already closed\\n\", pi);\n \t\t\tcontinue;\n \t\t}\n \n@@ -3566,7 +3565,7 @@ reset_port(portid_t pid)\n \n \tif ((pid == (portid_t)RTE_PORT_ALL && !all_ports_stopped()) ||\n \t\t(pid != (portid_t)RTE_PORT_ALL && !port_is_stopped(pid))) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Can not reset port(s), please stop port(s) first.\\n\");\n \t\treturn;\n \t}\n@@ -3578,14 +3577,14 @@ reset_port(portid_t pid)\n \t\t\tcontinue;\n \n \t\tif (port_is_forwarding(pi) != 0 && test_done == 0) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from forwarding configuration.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (port_is_bonding_member(pi)) {\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Please remove port %d from bonding device.\\n\",\n \t\t\t\tpi);\n \t\t\tcontinue;\n@@ -3598,7 +3597,7 @@ reset_port(portid_t pid)\n \t\t\t\tport->need_reconfig = 1;\n \t\t\t\tport->need_reconfig_queues = 1;\n \t\t\t} else {\n-\t\t\t\tfprintf(stderr, \"Failed to reset port %d. diag=%d\\n\",\n+\t\t\t\tTESTPMD_LOG(ERR, \"Failed to reset port %d. diag=%d\\n\",\n \t\t\t\t\tpi, diag);\n \t\t\t}\n \t\t}\n@@ -3616,7 +3615,7 @@ attach_port(char *identifier)\n \tprintf(\"Attaching a new port...\\n\");\n \n \tif (identifier == NULL) {\n-\t\tfprintf(stderr, \"Invalid parameters are specified\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Invalid parameters are specified\\n\");\n \t\treturn;\n \t}\n \n@@ -3657,7 +3656,7 @@ setup_attached_port(portid_t pi)\n \treconfig(pi, socket_id);\n \tret = rte_eth_promiscuous_enable(pi);\n \tif (ret != 0)\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Error during enabling promiscuous mode for port %u: %s - ignore\\n\",\n \t\t\tpi, rte_strerror(-ret));\n \n@@ -3677,7 +3676,7 @@ detach_device(struct rte_device *dev)\n \tportid_t sibling;\n \n \tif (dev == NULL) {\n-\t\tfprintf(stderr, \"Device already removed\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Device already removed\\n\");\n \t\treturn;\n \t}\n \n@@ -3686,7 +3685,7 @@ detach_device(struct rte_device *dev)\n \tRTE_ETH_FOREACH_DEV_OF(sibling, dev) {\n \t\tif (ports[sibling].port_status != RTE_PORT_CLOSED) {\n \t\t\tif (ports[sibling].port_status != RTE_PORT_STOPPED) {\n-\t\t\t\tfprintf(stderr, \"Port %u not stopped\\n\",\n+\t\t\t\tTESTPMD_LOG(ERR, \"Port %u not stopped\\n\",\n \t\t\t\t\tsibling);\n \t\t\t\treturn;\n \t\t\t}\n@@ -3717,10 +3716,10 @@ detach_port_device(portid_t port_id)\n \n \tif (ports[port_id].port_status != RTE_PORT_CLOSED) {\n \t\tif (ports[port_id].port_status != RTE_PORT_STOPPED) {\n-\t\t\tfprintf(stderr, \"Port not stopped\\n\");\n+\t\t\tTESTPMD_LOG(ERR, \"Port not stopped\\n\");\n \t\t\treturn;\n \t\t}\n-\t\tfprintf(stderr, \"Port was not closed\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Port was not closed\\n\");\n \t}\n \n \tret = eth_dev_info_get_print_err(port_id, &dev_info);\n@@ -3744,14 +3743,14 @@ detach_devargs(char *identifier)\n \n \tmemset(&da, 0, sizeof(da));\n \tif (rte_devargs_parsef(&da, \"%s\", identifier)) {\n-\t\tfprintf(stderr, \"cannot parse identifier\\n\");\n+\t\tTESTPMD_LOG(ERR, \"cannot parse identifier\\n\");\n \t\treturn;\n \t}\n \n \tRTE_ETH_FOREACH_MATCHING_DEV(port_id, identifier, &iterator) {\n \t\tif (ports[port_id].port_status != RTE_PORT_CLOSED) {\n \t\t\tif (ports[port_id].port_status != RTE_PORT_STOPPED) {\n-\t\t\t\tfprintf(stderr, \"Port %u not stopped\\n\",\n+\t\t\t\tTESTPMD_LOG(ERR, \"Port %u not stopped\\n\",\n \t\t\t\t\tport_id);\n \t\t\t\trte_eth_iterator_cleanup(&iterator);\n \t\t\t\trte_devargs_reset(&da);\n@@ -3812,23 +3811,20 @@ pmd_test_exit(void)\n \tif (hot_plug) {\n \t\tret = rte_dev_event_monitor_stop();\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail to stop device event monitor.\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to stop device event monitor.\");\n \t\t\treturn;\n \t\t}\n \n \t\tret = rte_dev_event_callback_unregister(NULL,\n \t\t\tdev_event_callback, NULL);\n \t\tif (ret < 0) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail to unregister device event callback.\\n\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to unregister device event callback.\\n\");\n \t\t\treturn;\n \t\t}\n \n \t\tret = rte_dev_hotplug_handle_disable();\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail to disable hotplug handling.\\n\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to disable hotplug handling.\\n\");\n \t\t\treturn;\n \t\t}\n \t}\n@@ -3871,7 +3867,7 @@ check_all_ports_link_status(uint32_t port_mask)\n \t\t\tif (ret < 0) {\n \t\t\t\tall_ports_up = 0;\n \t\t\t\tif (print_flag == 1)\n-\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\t\t\"Port %u link get failed: %s\\n\",\n \t\t\t\t\t\tportid, rte_strerror(-ret));\n \t\t\t\tcontinue;\n@@ -3950,10 +3946,9 @@ eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,\n \tRTE_SET_USED(ret_param);\n \n \tif (type >= RTE_ETH_EVENT_MAX) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"\\nPort %\" PRIu16 \": %s called upon invalid event %d\\n\",\n \t\t\tport_id, __func__, type);\n-\t\tfflush(stderr);\n \t} else if (event_print_mask & (UINT32_C(1) << type)) {\n \t\tprintf(\"\\nPort %\" PRIu16 \": %s event\\n\", port_id,\n \t\t\teth_event_desc[type]);\n@@ -3970,7 +3965,7 @@ eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,\n \t\t\tbreak;\n \t\tif (rte_eal_alarm_set(100000,\n \t\t\t\trmv_port_callback, (void *)(intptr_t)port_id))\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Could not set up deferred device removal\\n\");\n \t\tbreak;\n \tcase RTE_ETH_EVENT_DESTROY:\n@@ -4054,20 +4049,13 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,\n \tuint16_t port_id;\n \tint ret;\n \n-\tif (type >= RTE_DEV_EVENT_MAX) {\n-\t\tfprintf(stderr, \"%s called upon invalid event %d\\n\",\n-\t\t\t__func__, type);\n-\t\tfflush(stderr);\n-\t}\n-\n \tswitch (type) {\n \tcase RTE_DEV_EVENT_REMOVE:\n-\t\tRTE_LOG(DEBUG, EAL, \"The device: %s has been removed!\\n\",\n-\t\t\tdevice_name);\n+\t\tTESTPMD_LOG(INFO, \"The device: %s has been removed!\\n\", device_name);\n \t\tret = rte_eth_dev_get_port_by_name(device_name, &port_id);\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL, \"can not get port by device %s!\\n\",\n-\t\t\t\tdevice_name);\n+\t\t\tTESTPMD_LOG(ERR,\n+\t\t\t\t    \"Can not get port for device %s!\\n\", device_name);\n \t\t\treturn;\n \t\t}\n \t\t/*\n@@ -4081,17 +4069,20 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,\n \t\t */\n \t\tif (rte_eal_alarm_set(100000,\n \t\t\t\trmv_port_callback, (void *)(intptr_t)port_id))\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"Could not set up deferred device removal\\n\");\n+\t\t\tTESTPMD_LOG(ERR, \"Could not set up deferred device removal\\n\");\n \t\tbreak;\n+\n \tcase RTE_DEV_EVENT_ADD:\n-\t\tRTE_LOG(ERR, EAL, \"The device: %s has been added!\\n\",\n-\t\t\tdevice_name);\n+\t\tTESTPMD_LOG(INFO, \"The device: %s has been added!\\n\", device_name);\n \t\t/* TODO: After finish kernel driver binding,\n \t\t * begin to attach port.\n \t\t */\n \t\tbreak;\n+\n \tdefault:\n+\t\tif (type >= RTE_DEV_EVENT_MAX)\n+\t\t\tTESTPMD_LOG(ERR, \"%s called upon invalid event %d\\n\",\n+\t\t\t\t    __func__, type);\n \t\tbreak;\n \t}\n }\n@@ -4189,7 +4180,7 @@ update_mtu_from_frame_size(portid_t portid, uint32_t max_rx_pktlen)\n \t\treturn 0;\n \n \tif (eth_dev_set_mtu_mp(portid, new_mtu) != 0) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Failed to set MTU to %u for port %u\\n\",\n \t\t\tnew_mtu, portid);\n \t\treturn -1;\n@@ -4425,7 +4416,7 @@ init_port_dcb_config(portid_t pid,\n \t */\n \tif (dcb_mode == DCB_VT_ENABLED &&\n \t    rte_port->dev_info.vmdq_pool_base > 0) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"VMDQ_DCB multi-queue mode is nonsensical for port %d.\\n\",\n \t\t\tpid);\n \t\treturn -1;\n@@ -4613,17 +4604,17 @@ main(int argc, char** argv)\n \t\t\t\t\"interactive mode.\\n\");\n \n \tif (tx_first && lsc_interrupt) {\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Warning: lsc_interrupt needs to be off when using tx_first. Disabling.\\n\");\n \t\tlsc_interrupt = 0;\n \t}\n \n \tif (!nb_rxq && !nb_txq)\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Warning: Either rx or tx queues should be non-zero\\n\");\n \n \tif (nb_rxq > 1 && nb_rxq > nb_txq)\n-\t\tfprintf(stderr,\n+\t\tTESTPMD_LOG(ERR,\n \t\t\t\"Warning: nb_rxq=%d enables RSS configuration, but nb_txq=%d will prevent to fully test it.\\n\",\n \t\t\tnb_rxq, nb_txq);\n \n@@ -4632,23 +4623,19 @@ main(int argc, char** argv)\n \tif (hot_plug) {\n \t\tret = rte_dev_hotplug_handle_enable();\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail to enable hotplug handling.\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to enable hotplug handling.\");\n \t\t\treturn -1;\n \t\t}\n \n \t\tret = rte_dev_event_monitor_start();\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail to start device event monitoring.\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to start device event monitoring.\");\n \t\t\treturn -1;\n \t\t}\n \n-\t\tret = rte_dev_event_callback_register(NULL,\n-\t\t\tdev_event_callback, NULL);\n+\t\tret = rte_dev_event_callback_register(NULL, dev_event_callback, NULL);\n \t\tif (ret) {\n-\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\"fail  to register device event callback\\n\");\n+\t\t\tTESTPMD_LOG(ERR, \"fail to register device event callback\\n\");\n \t\t\treturn -1;\n \t\t}\n \t}\n@@ -4658,14 +4645,14 @@ main(int argc, char** argv)\n \t\t\trte_eal_cleanup();\n \t\t\trte_exit(EXIT_FAILURE, \"Start ports failed\\n\");\n \t\t}\n-\t\tfprintf(stderr, \"Start ports failed\\n\");\n+\t\tTESTPMD_LOG(ERR, \"Start ports failed\\n\");\n \t}\n \n \t/* set all ports to promiscuous mode by default */\n \tRTE_ETH_FOREACH_DEV(port_id) {\n \t\tret = rte_eth_promiscuous_enable(port_id);\n \t\tif (ret != 0)\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Error during enabling promiscuous mode for port %u: %s - ignore\\n\",\n \t\t\t\tport_id, rte_strerror(-ret));\n \t}\n@@ -4679,10 +4666,10 @@ main(int argc, char** argv)\n \tif (latencystats_enabled != 0) {\n \t\tint ret = rte_latencystats_init(1, NULL);\n \t\tif (ret)\n-\t\t\tfprintf(stderr,\n+\t\t\tTESTPMD_LOG(ERR,\n \t\t\t\t\"Warning: latencystats init() returned error %d\\n\",\n \t\t\t\tret);\n-\t\tfprintf(stderr, \"Latencystats running on lcore %d\\n\",\n+\t\tTESTPMD_LOG(ERR, \"Latencystats running on lcore %d\\n\",\n \t\t\tlatencystats_lcore_id);\n \t}\n #endif\n",
    "prefixes": [
        "v3",
        "3/3"
    ]
}