get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134288,
    "url": "http://patchwork.dpdk.org/api/patches/134288/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231114112407.3496460-3-huangdengdui@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20231114112407.3496460-3-huangdengdui@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114112407.3496460-3-huangdengdui@huawei.com",
    "date": "2023-11-14T11:23:26",
    "name": "[v2,02/43] eal: use rte strerror",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ec7822e1f87e85fd538d5f31a77c696c7a5d340",
    "submitter": {
        "id": 3066,
        "url": "http://patchwork.dpdk.org/api/people/3066/?format=api",
        "name": "huangdengdui",
        "email": "huangdengdui@huawei.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231114112407.3496460-3-huangdengdui@huawei.com/mbox/",
    "series": [
        {
            "id": 30292,
            "url": "http://patchwork.dpdk.org/api/series/30292/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30292",
            "date": "2023-11-14T11:23:25",
            "name": "replace strerror",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/30292/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134288/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/134288/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 C58D343329;\n\tTue, 14 Nov 2023 12:25:05 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5222740A79;\n\tTue, 14 Nov 2023 12:24:22 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 4A19D4027D\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:24:10 +0100 (CET)",
            "from dggpeml500011.china.huawei.com (unknown [172.30.72.56])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SV3kn2FlfzmX9b;\n Tue, 14 Nov 2023 19:20:49 +0800 (CST)",
            "from localhost.huawei.com (10.50.165.33) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Tue, 14 Nov 2023 19:24:08 +0800"
        ],
        "From": "Dengdui Huang <huangdengdui@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@amd.com>, <stephen@networkplumber.org>,\n <lihuisong@huawei.com>, <fengchengwen@huawei.com>, <liuyonglong@huawei.com>",
        "Subject": "[PATCH v2 02/43] eal: use rte strerror",
        "Date": "Tue, 14 Nov 2023 19:23:26 +0800",
        "Message-ID": "<20231114112407.3496460-3-huangdengdui@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20231114112407.3496460-1-huangdengdui@huawei.com>",
        "References": "<20231114082539.1858594-44-huangdengdui@huawei.com>\n <20231114112407.3496460-1-huangdengdui@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.165.33]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n dggpeml500011.china.huawei.com (7.185.36.84)",
        "X-CFilter-Loop": "Reflected",
        "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": "The function strerror() is insecure in a multi-thread environment.\nThis patch uses rte_strerror() to replace it.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n lib/eal/common/eal_common_fbarray.c     |  2 +-\n lib/eal/common/eal_common_options.c     |  7 ++--\n lib/eal/common/eal_common_proc.c        | 12 +++----\n lib/eal/common/eal_common_trace_utils.c |  6 ++--\n lib/eal/freebsd/eal.c                   |  4 +--\n lib/eal/freebsd/eal_interrupts.c        |  8 ++---\n lib/eal/freebsd/eal_memory.c            |  2 +-\n lib/eal/freebsd/eal_timer.c             |  6 ++--\n lib/eal/linux/eal.c                     | 10 +++---\n lib/eal/linux/eal_dev.c                 |  2 +-\n lib/eal/linux/eal_hugepage_info.c       |  5 +--\n lib/eal/linux/eal_interrupts.c          | 18 +++++-----\n lib/eal/linux/eal_memalloc.c            | 47 +++++++++++++------------\n lib/eal/linux/eal_memory.c              | 43 +++++++++++-----------\n lib/eal/linux/eal_timer.c               |  2 +-\n lib/eal/linux/eal_vfio.c                | 40 ++++++++++-----------\n lib/eal/unix/eal_filesystem.c           |  5 +--\n lib/eal/unix/eal_unix_memory.c          |  6 ++--\n lib/eal/unix/rte_thread.c               |  6 ++--\n 19 files changed, 118 insertions(+), 113 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c\nindex 2055bfa57d..a2936bbd91 100644\n--- a/lib/eal/common/eal_common_fbarray.c\n+++ b/lib/eal/common/eal_common_fbarray.c\n@@ -1027,7 +1027,7 @@ rte_fbarray_destroy(struct rte_fbarray *arr)\n \t\teal_get_fbarray_path(path, sizeof(path), arr->name);\n \t\tif (unlink(path)) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"Cannot unlink fbarray: %s\\n\",\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\t\trte_errno = errno;\n \t\t\t/*\n \t\t\t * we're still holding an exclusive lock, so drop it to\ndiff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex a6d21f1cba..8a09fe2719 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -44,6 +44,7 @@\n #ifndef RTE_EXEC_ENV_WINDOWS\n #include \"eal_trace.h\"\n #endif\n+#include <rte_errno.h>\n \n #define BITS_PER_HEX 4\n #define LCORE_OPT_LST 1\n@@ -391,7 +392,7 @@ eal_plugindir_init(const char *path)\n \td = opendir(path);\n \tif (d == NULL) {\n \t\tRTE_LOG(ERR, EAL, \"failed to open directory %s: %s\\n\",\n-\t\t\tpath, strerror(errno));\n+\t\t\tpath, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -443,7 +444,7 @@ verify_perms(const char *dirpath)\n \t/* call stat to check for permissions and ensure not world writable */\n \tif (stat(dirpath, &st) != 0) {\n \t\tRTE_LOG(ERR, EAL, \"Error with stat on %s, %s\\n\",\n-\t\t\t\tdirpath, strerror(errno));\n+\t\t\t\tdirpath, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \tif (st.st_mode & S_IWOTH) {\n@@ -471,7 +472,7 @@ eal_dlopen(const char *pathname)\n \t}\n \tif (realp == NULL) {\n \t\tRTE_LOG(ERR, EAL, \"Error with realpath for %s, %s\\n\",\n-\t\t\t\tpathname, strerror(errno));\n+\t\t\t\tpathname, rte_strerror(errno));\n \t\tgoto out;\n \t}\n \tif (strnlen(realp, PATH_MAX) == PATH_MAX) {\ndiff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c\nindex 728815c4a9..2e39180d40 100644\n--- a/lib/eal/common/eal_common_proc.c\n+++ b/lib/eal/common/eal_common_proc.c\n@@ -291,7 +291,7 @@ read_msg(int fd, struct mp_msg_internal *m, struct sockaddr_un *s)\n \t\tif (errno == EINTR)\n \t\t\tgoto retry;\n \n-\t\tRTE_LOG(ERR, EAL, \"recvmsg failed, %s\\n\", strerror(errno));\n+\t\tRTE_LOG(ERR, EAL, \"recvmsg failed, %s\\n\", rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -583,7 +583,7 @@ open_socket_fd(void)\n \n \tif (bind(mp_fd, (struct sockaddr *)&un, sizeof(un)) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"failed to bind %s: %s\\n\",\n-\t\t\tun.sun_path, strerror(errno));\n+\t\t\tun.sun_path, rte_strerror(errno));\n \t\tclose(mp_fd);\n \t\treturn -1;\n \t}\n@@ -631,13 +631,13 @@ rte_mp_channel_init(void)\n \tdir_fd = open(mp_dir_path, O_RDONLY);\n \tif (dir_fd < 0) {\n \t\tRTE_LOG(ERR, EAL, \"failed to open %s: %s\\n\",\n-\t\t\tmp_dir_path, strerror(errno));\n+\t\t\tmp_dir_path, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n \tif (flock(dir_fd, LOCK_EX)) {\n \t\tRTE_LOG(ERR, EAL, \"failed to lock %s: %s\\n\",\n-\t\t\tmp_dir_path, strerror(errno));\n+\t\t\tmp_dir_path, rte_strerror(errno));\n \t\tclose(dir_fd);\n \t\treturn -1;\n \t}\n@@ -650,7 +650,7 @@ rte_mp_channel_init(void)\n \tif (rte_thread_create_internal_control(&mp_handle_tid, \"mp-msg\",\n \t\t\tmp_handle, NULL) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"failed to create mp thread: %s\\n\",\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\tclose(dir_fd);\n \t\tclose(rte_atomic_exchange_explicit(&mp_fd, -1, rte_memory_order_relaxed));\n \t\treturn -1;\n@@ -733,7 +733,7 @@ send_msg(const char *dst_path, struct rte_mp_msg *msg, int type)\n \t\t\treturn 0;\n \t\t}\n \t\tRTE_LOG(ERR, EAL, \"failed to send to (%s) due to %s\\n\",\n-\t\t\tdst_path, strerror(errno));\n+\t\t\tdst_path, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/eal/common/eal_common_trace_utils.c b/lib/eal/common/eal_common_trace_utils.c\nindex 8561a0e198..b74adf6589 100644\n--- a/lib/eal/common/eal_common_trace_utils.c\n+++ b/lib/eal/common/eal_common_trace_utils.c\n@@ -244,7 +244,7 @@ eal_trace_dir_args_save(char const *val)\n \tint rc;\n \n \tif (asprintf(&dir_path, \"%s/\", val) == -1) {\n-\t\ttrace_err(\"failed to copy directory: %s\", strerror(errno));\n+\t\ttrace_err(\"failed to copy directory: %s\", rte_strerror(errno));\n \t\treturn -ENOMEM;\n \t}\n \n@@ -328,7 +328,7 @@ trace_mkdir(void)\n \t/* Create the path if it t exist, no \"mkdir -p\" available here */\n \trc = mkdir(trace->dir, 0700);\n \tif (rc < 0 && errno != EEXIST) {\n-\t\ttrace_err(\"mkdir %s failed [%s]\", trace->dir, strerror(errno));\n+\t\ttrace_err(\"mkdir %s failed [%s]\", trace->dir, rte_strerror(errno));\n \t\trte_errno = errno;\n \t\treturn -rte_errno;\n \t}\n@@ -343,7 +343,7 @@ trace_mkdir(void)\n \n \trc = mkdir(trace->dir, 0700);\n \tif (rc < 0) {\n-\t\ttrace_err(\"mkdir %s failed [%s]\", trace->dir, strerror(errno));\n+\t\ttrace_err(\"mkdir %s failed [%s]\", trace->dir, rte_strerror(errno));\n \t\trte_errno = errno;\n \t\treturn -rte_errno;\n \t}\ndiff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c\nindex 568e06e9ed..a82f3ab8d0 100644\n--- a/lib/eal/freebsd/eal.c\n+++ b/lib/eal/freebsd/eal.c\n@@ -203,7 +203,7 @@ rte_eal_config_attach(void)\n \t\tclose(mem_cfg_fd);\n \t\tmem_cfg_fd = -1;\n \t\tRTE_LOG(ERR, EAL, \"Cannot mmap memory for rte_config! error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -250,7 +250,7 @@ rte_eal_config_reattach(void)\n \t\t\treturn -1;\n \t\t}\n \t\tRTE_LOG(ERR, EAL, \"Cannot mmap memory for rte_config! error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/eal/freebsd/eal_interrupts.c b/lib/eal/freebsd/eal_interrupts.c\nindex 2b31dfb099..0672e88e4e 100644\n--- a/lib/eal/freebsd/eal_interrupts.c\n+++ b/lib/eal/freebsd/eal_interrupts.c\n@@ -186,7 +186,7 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,\n \t\t\telse\n \t\t\t\tRTE_LOG(ERR, EAL, \"Error adding fd %d kevent, %s\\n\",\n \t\t\t\t\trte_intr_fd_get(src->intr_handle),\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\tret = -errno;\n \t\t\tgoto fail;\n \t\t}\n@@ -323,7 +323,7 @@ rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle,\n \t\tif (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"Error removing fd %d kevent, %s\\n\",\n \t\t\t\trte_intr_fd_get(src->intr_handle),\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\t\t/* removing non-existent even is an expected condition\n \t\t\t * in some circumstances (e.g. oneshot events).\n \t\t\t */\n@@ -516,7 +516,7 @@ eal_intr_process_interrupts(struct kevent *events, int nfds)\n \t\t\t\tRTE_LOG(ERR, EAL, \"Error reading from file \"\n \t\t\t\t\t\"descriptor %d: %s\\n\",\n \t\t\t\t\tevent_fd,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\t} else if (bytes_read == 0)\n \t\t\t\tRTE_LOG(ERR, EAL, \"Read nothing from file \"\n \t\t\t\t\t\"descriptor %d\\n\", event_fd);\n@@ -567,7 +567,7 @@ eal_intr_process_interrupts(struct kevent *events, int nfds)\n \t\t\t\tif (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) {\n \t\t\t\t\tRTE_LOG(ERR, EAL, \"Error removing fd %d kevent, %s\\n\",\n \t\t\t\t\t\trte_intr_fd_get(src->intr_handle),\n-\t\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\t\trte_strerror(errno));\n \t\t\t\t\t/* removing non-existent even is an expected\n \t\t\t\t\t * condition in some circumstances\n \t\t\t\t\t * (e.g. oneshot events).\ndiff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c\nindex 5c6165c580..35e11970c6 100644\n--- a/lib/eal/freebsd/eal_memory.c\n+++ b/lib/eal/freebsd/eal_memory.c\n@@ -85,7 +85,7 @@ rte_eal_hugepage_init(void)\n \t\t\t\tMAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n \t\tif (addr == MAP_FAILED) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s: mmap() failed: %s\\n\", __func__,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \ndiff --git a/lib/eal/freebsd/eal_timer.c b/lib/eal/freebsd/eal_timer.c\nindex beff755a47..7125e4e0e8 100644\n--- a/lib/eal/freebsd/eal_timer.c\n+++ b/lib/eal/freebsd/eal_timer.c\n@@ -36,20 +36,20 @@ get_tsc_freq(void)\n \ttmp = 0;\n \n \tif (sysctlbyname(\"kern.timecounter.smp_tsc\", &tmp, &sz, NULL, 0))\n-\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", strerror(errno));\n+\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", rte_strerror(errno));\n \telse if (tmp != 1)\n \t\tRTE_LOG(WARNING, EAL, \"TSC is not safe to use in SMP mode\\n\");\n \n \ttmp = 0;\n \n \tif (sysctlbyname(\"kern.timecounter.invariant_tsc\", &tmp, &sz, NULL, 0))\n-\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", strerror(errno));\n+\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", rte_strerror(errno));\n \telse if (tmp != 1)\n \t\tRTE_LOG(WARNING, EAL, \"TSC is not invariant\\n\");\n \n \tsz = sizeof(tsc_hz);\n \tif (sysctlbyname(\"machdep.tsc_freq\", &tsc_hz, &sz, NULL, 0)) {\n-\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", strerror(errno));\n+\t\tRTE_LOG(WARNING, EAL, \"%s\\n\", rte_strerror(errno));\n \t\treturn 0;\n \t}\n \ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 57da058cec..0da0a000ac 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -160,7 +160,7 @@ eal_clean_runtime_dir(void)\n \t\tclosedir(dir);\n \n \tRTE_LOG(ERR, EAL, \"Error while clearing runtime dir: %s\\n\",\n-\t\tstrerror(errno));\n+\t\trte_strerror(errno));\n \n \treturn -1;\n }\n@@ -288,7 +288,7 @@ rte_eal_config_attach(void)\n \t\tclose(mem_cfg_fd);\n \t\tmem_cfg_fd = -1;\n \t\tRTE_LOG(ERR, EAL, \"Cannot mmap memory for rte_config! error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -335,7 +335,7 @@ rte_eal_config_reattach(void)\n \t\t\treturn -1;\n \t\t}\n \t\tRTE_LOG(ERR, EAL, \"Cannot mmap memory for rte_config! error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -1421,7 +1421,7 @@ rte_eal_check_module(const char *module_name)\n \t/* Check if there is sysfs mounted */\n \tif (stat(\"/sys/module\", &st) != 0) {\n \t\tRTE_LOG(DEBUG, EAL, \"sysfs is not mounted! error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -1434,7 +1434,7 @@ rte_eal_check_module(const char *module_name)\n \n \tif (stat(sysfs_mod_name, &st) != 0) {\n \t\tRTE_LOG(DEBUG, EAL, \"Module %s not found! error %i (%s)\\n\",\n-\t\t        sysfs_mod_name, errno, strerror(errno));\n+\t\t\tsysfs_mod_name, errno, rte_strerror(errno));\n \t\treturn 0;\n \t}\n \ndiff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c\nindex ac76f6174d..ede68f32cf 100644\n--- a/lib/eal/linux/eal_dev.c\n+++ b/lib/eal/linux/eal_dev.c\n@@ -73,7 +73,7 @@ static void sigbus_handler(int signum, siginfo_t *info,\n \tif (ret == -1) {\n \t\trte_exit(EXIT_FAILURE,\n \t\t\t \"Failed to handle SIGBUS for hot-unplug, \"\n-\t\t\t \"(rte_errno: %s)!\", strerror(rte_errno));\n+\t\t\t \"(rte_errno: %s)!\", rte_strerror(rte_errno));\n \t} else if (ret == 1) {\n \t\tif (sigbus_action_old.sa_flags == SA_SIGINFO\n \t\t    && sigbus_action_old.sa_sigaction) {\ndiff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c\nindex 581d9dfc91..6286ab3efb 100644\n--- a/lib/eal/linux/eal_hugepage_info.c\n+++ b/lib/eal/linux/eal_hugepage_info.c\n@@ -23,6 +23,7 @@\n #include <rte_log.h>\n #include <rte_common.h>\n #include \"rte_string_fns.h\"\n+#include <rte_errno.h>\n \n #include \"eal_private.h\"\n #include \"eal_internal_cfg.h\"\n@@ -378,7 +379,7 @@ walk_hugedir(const char *hugedir, walk_hugedir_t *cb, void *user_data)\n \t\tclosedir(dir);\n \n \tRTE_LOG(ERR, EAL, \"Error while walking hugepage dir: %s\\n\",\n-\t\tstrerror(errno));\n+\t\trte_strerror(errno));\n \n \treturn -1;\n }\n@@ -404,7 +405,7 @@ inspect_hugedir_cb(const struct walk_hugedir_data *whd)\n \n \tif (fstat(whd->file_fd, &st) < 0)\n \t\tRTE_LOG(DEBUG, EAL, \"%s(): stat(\\\"%s\\\") failed: %s\",\n-\t\t\t\t__func__, whd->file_name, strerror(errno));\n+\t\t\t\t__func__, whd->file_name, rte_strerror(errno));\n \telse\n \t\t(*total_size) += st.st_size;\n }\ndiff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c\nindex d4919dff45..660e64dd41 100644\n--- a/lib/eal/linux/eal_interrupts.c\n+++ b/lib/eal/linux/eal_interrupts.c\n@@ -460,7 +460,7 @@ uio_intr_disable(const struct rte_intr_handle *intr_handle)\n \tif (rte_intr_fd_get(intr_handle) < 0 ||\n \t    write(rte_intr_fd_get(intr_handle), &value, sizeof(value)) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Error disabling interrupts for fd %d (%s)\\n\",\n-\t\t\trte_intr_fd_get(intr_handle), strerror(errno));\n+\t\t\trte_intr_fd_get(intr_handle), rte_strerror(errno));\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -474,7 +474,7 @@ uio_intr_enable(const struct rte_intr_handle *intr_handle)\n \tif (rte_intr_fd_get(intr_handle) < 0 ||\n \t    write(rte_intr_fd_get(intr_handle), &value, sizeof(value)) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Error enabling interrupts for fd %d (%s)\\n\",\n-\t\t\trte_intr_fd_get(intr_handle), strerror(errno));\n+\t\t\trte_intr_fd_get(intr_handle), rte_strerror(errno));\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -975,7 +975,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)\n \t\t\t\tRTE_LOG(ERR, EAL, \"Error reading from file \"\n \t\t\t\t\t\"descriptor %d: %s\\n\",\n \t\t\t\t\tevents[n].data.fd,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\t\t/*\n \t\t\t\t * The device is unplugged or buggy, remove\n \t\t\t\t * it as an interrupt source and return to\n@@ -1130,7 +1130,7 @@ eal_intr_thread_main(__rte_unused void *arg)\n \t\tif (epoll_ctl(pfd, EPOLL_CTL_ADD, intr_pipe.readfd,\n \t\t\t\t\t\t&pipe_event) < 0) {\n \t\t\trte_panic(\"Error adding fd to %d epoll_ctl, %s\\n\",\n-\t\t\t\t\tintr_pipe.readfd, strerror(errno));\n+\t\t\t\t\tintr_pipe.readfd, rte_strerror(errno));\n \t\t}\n \t\tnumfds++;\n \n@@ -1153,7 +1153,7 @@ eal_intr_thread_main(__rte_unused void *arg)\n \t\t\t\t\trte_intr_fd_get(src->intr_handle), &ev) < 0) {\n \t\t\t\trte_panic(\"Error adding fd %d epoll_ctl, %s\\n\",\n \t\t\t\t\trte_intr_fd_get(src->intr_handle),\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\t}\n \t\t\telse\n \t\t\t\tnumfds++;\n@@ -1244,7 +1244,7 @@ eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle)\n \t\t\t\tcontinue;\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\"Error reading from fd %d: %s\\n\",\n-\t\t\t\tfd, strerror(errno));\n+\t\t\t\tfd, rte_strerror(errno));\n \t\t} else if (nbytes == 0)\n \t\t\tRTE_LOG(ERR, EAL, \"Read nothing from fd %d\\n\", fd);\n \t\treturn;\n@@ -1343,7 +1343,7 @@ eal_epoll_wait(int epfd, struct rte_epoll_event *events,\n \t\t\t}\n \t\t\t/* epoll_wait fail */\n \t\t\tRTE_LOG(ERR, EAL, \"epoll_wait returns with fail %s\\n\",\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\t\trc = -1;\n \t\t\tbreak;\n \t\t} else {\n@@ -1412,7 +1412,7 @@ rte_epoll_ctl(int epfd, int op, int fd,\n \tev.events = event->epdata.event;\n \tif (epoll_ctl(epfd, op, fd, &ev) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Error op %d fd %d epoll_ctl, %s\\n\",\n-\t\t\top, fd, strerror(errno));\n+\t\t\top, fd, rte_strerror(errno));\n \t\tif (op == EPOLL_CTL_ADD)\n \t\t\t/* rollback status when CTL_ADD fail */\n \t\t\trte_atomic_store_explicit(&event->status, RTE_EPOLL_INVALID,\n@@ -1525,7 +1525,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)\n \t\t\tif (fd < 0) {\n \t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"can't setup eventfd, error %i (%s)\\n\",\n-\t\t\t\t\terrno, strerror(errno));\n+\t\t\t\t\terrno, rte_strerror(errno));\n \t\t\t\treturn -errno;\n \t\t\t}\n \ndiff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c\nindex 9853ec78a2..53a7e5dd3b 100644\n--- a/lib/eal/linux/eal_memalloc.c\n+++ b/lib/eal/linux/eal_memalloc.c\n@@ -31,6 +31,7 @@\n #include <rte_log.h>\n #include <rte_eal.h>\n #include <rte_memory.h>\n+#include <rte_errno.h>\n \n #include \"eal_filesystem.h\"\n #include \"eal_internal_cfg.h\"\n@@ -161,7 +162,7 @@ prepare_numa(int *oldpolicy, struct bitmask *oldmask, int socket_id)\n \t\t\t  oldmask->size + 1, 0, 0) < 0) {\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Failed to get current mempolicy: %s. \"\n-\t\t\t\"Assuming MPOL_DEFAULT.\\n\", strerror(errno));\n+\t\t\t\"Assuming MPOL_DEFAULT.\\n\", rte_strerror(errno));\n \t\t*oldpolicy = MPOL_DEFAULT;\n \t}\n \tRTE_LOG(DEBUG, EAL,\n@@ -180,7 +181,7 @@ restore_numa(int *oldpolicy, struct bitmask *oldmask)\n \t} else if (set_mempolicy(*oldpolicy, oldmask->maskp,\n \t\t\t\t oldmask->size + 1) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Failed to restore mempolicy: %s\\n\",\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\tnuma_set_localalloc();\n \t}\n \tnuma_free_cpumask(oldmask);\n@@ -224,7 +225,7 @@ static int lock(int fd, int type)\n \t\treturn 0;\n \t} else if (ret) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): error calling flock(): %s\\n\",\n-\t\t\t__func__, strerror(errno));\n+\t\t\t__func__, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \t/* lock was successful */\n@@ -252,7 +253,7 @@ get_seg_memfd(struct hugepage_info *hi __rte_unused,\n \t\t\tfd = memfd_create(segname, flags);\n \t\t\tif (fd < 0) {\n \t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): memfd create failed: %s\\n\",\n-\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t\t__func__, rte_strerror(errno));\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tfd_list[list_idx].memseg_list_fd = fd;\n@@ -266,7 +267,7 @@ get_seg_memfd(struct hugepage_info *hi __rte_unused,\n \t\t\tfd = memfd_create(segname, flags);\n \t\t\tif (fd < 0) {\n \t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): memfd create failed: %s\\n\",\n-\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t\t__func__, rte_strerror(errno));\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tfd_list[list_idx].fds[seg_idx] = fd;\n@@ -317,7 +318,7 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,\n \tret = stat(path, &st);\n \tif (ret < 0 && errno != ENOENT) {\n \t\tRTE_LOG(DEBUG, EAL, \"%s(): stat() for '%s' failed: %s\\n\",\n-\t\t\t__func__, path, strerror(errno));\n+\t\t\t__func__, path, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \tif (!internal_conf->hugepage_file.unlink_existing && ret == 0 &&\n@@ -343,7 +344,7 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,\n \t\t/* coverity[toctou] */\n \t\tif (unlink(path) < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): could not remove '%s': %s\\n\",\n-\t\t\t\t__func__, path, strerror(errno));\n+\t\t\t\t__func__, path, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t}\n@@ -352,13 +353,13 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,\n \tfd = open(path, O_CREAT | O_RDWR, 0600);\n \tif (fd < 0) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): open '%s' failed: %s\\n\",\n-\t\t\t__func__, path, strerror(errno));\n+\t\t\t__func__, path, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \t/* take out a read lock */\n \tif (lock(fd, LOCK_SH) < 0) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): lock '%s' failed: %s\\n\",\n-\t\t\t__func__, path, strerror(errno));\n+\t\t\t__func__, path, rte_strerror(errno));\n \t\tclose(fd);\n \t\treturn -1;\n \t}\n@@ -380,7 +381,7 @@ resize_hugefile_in_memory(int fd, uint64_t fa_offset,\n \tif (ret < 0) {\n \t\tRTE_LOG(DEBUG, EAL, \"%s(): fallocate() failed: %s\\n\",\n \t\t\t\t__func__,\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -415,7 +416,7 @@ resize_hugefile_in_filesystem(int fd, uint64_t fa_offset, uint64_t page_sz,\n \t\t\tif (new_size > cur_size &&\n \t\t\t\t\tftruncate(fd, new_size) < 0) {\n \t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): ftruncate() failed: %s\\n\",\n-\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t\t__func__, rte_strerror(errno));\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t} else {\n@@ -451,7 +452,7 @@ resize_hugefile_in_filesystem(int fd, uint64_t fa_offset, uint64_t page_sz,\n \t\t\t\t} else {\n \t\t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): fallocate() failed: %s\\n\",\n \t\t\t\t\t\t__func__,\n-\t\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\t\trte_strerror(errno));\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n \t\t\t} else {\n@@ -484,7 +485,7 @@ close_hugefile(int fd, char *path, int list_idx)\n \t\t\trte_eal_process_type() == RTE_PROC_PRIMARY &&\n \t\t\tunlink(path))\n \t\tRTE_LOG(ERR, EAL, \"%s(): unlinking '%s' failed: %s\\n\",\n-\t\t\t__func__, path, strerror(errno));\n+\t\t\t__func__, path, rte_strerror(errno));\n \n \tclose(fd);\n \tfd_list[list_idx].memseg_list_fd = -1;\n@@ -585,14 +586,14 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \t\t\tmap_offset = 0;\n \t\t\tif (ftruncate(fd, alloc_sz) < 0) {\n \t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): ftruncate() failed: %s\\n\",\n-\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t\t__func__, rte_strerror(errno));\n \t\t\t\tgoto resized;\n \t\t\t}\n \t\t\tif (internal_conf->hugepage_file.unlink_before_mapping &&\n \t\t\t\t\t!internal_conf->in_memory) {\n \t\t\t\tif (unlink(path)) {\n \t\t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): unlink() failed: %s\\n\",\n-\t\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t\t\t__func__, rte_strerror(errno));\n \t\t\t\t\tgoto resized;\n \t\t\t\t}\n \t\t\t}\n@@ -611,7 +612,7 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \n \tif (va == MAP_FAILED) {\n \t\tRTE_LOG(DEBUG, EAL, \"%s(): mmap() failed: %s\\n\", __func__,\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\t/* mmap failed, but the previous region might have been\n \t\t * unmapped anyway. try to remap it\n \t\t */\n@@ -662,7 +663,7 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \t\t\t\t\tMPOL_F_NODE | MPOL_F_ADDR);\n \t\tif (ret < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): get_mempolicy: %s\\n\",\n-\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t__func__, rte_strerror(errno));\n \t\t\tgoto mapped;\n \t\t} else if (cur_socket_id != socket_id) {\n \t\t\tRTE_LOG(DEBUG, EAL,\n@@ -874,13 +875,13 @@ alloc_seg_walk(const struct rte_memseg_list *msl, void *arg)\n \t\tdir_fd = open(wa->hi->hugedir, O_RDONLY);\n \t\tif (dir_fd < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s(): Cannot open '%s': %s\\n\",\n-\t\t\t\t__func__, wa->hi->hugedir, strerror(errno));\n+\t\t\t\t__func__, wa->hi->hugedir, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t\t/* blocking writelock */\n \t\tif (flock(dir_fd, LOCK_EX)) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s(): Cannot lock '%s': %s\\n\",\n-\t\t\t\t__func__, wa->hi->hugedir, strerror(errno));\n+\t\t\t\t__func__, wa->hi->hugedir, rte_strerror(errno));\n \t\t\tclose(dir_fd);\n \t\t\treturn -1;\n \t\t}\n@@ -981,13 +982,13 @@ free_seg_walk(const struct rte_memseg_list *msl, void *arg)\n \t\tdir_fd = open(wa->hi->hugedir, O_RDONLY);\n \t\tif (dir_fd < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s(): Cannot open '%s': %s\\n\",\n-\t\t\t\t__func__, wa->hi->hugedir, strerror(errno));\n+\t\t\t\t__func__, wa->hi->hugedir, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t\t/* blocking writelock */\n \t\tif (flock(dir_fd, LOCK_EX)) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s(): Cannot lock '%s': %s\\n\",\n-\t\t\t\t__func__, wa->hi->hugedir, strerror(errno));\n+\t\t\t\t__func__, wa->hi->hugedir, rte_strerror(errno));\n \t\t\tclose(dir_fd);\n \t\t\treturn -1;\n \t\t}\n@@ -1345,13 +1346,13 @@ sync_existing(struct rte_memseg_list *primary_msl,\n \tdir_fd = open(hi->hugedir, O_RDONLY);\n \tif (dir_fd < 0) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): Cannot open '%s': %s\\n\", __func__,\n-\t\t\thi->hugedir, strerror(errno));\n+\t\t\thi->hugedir, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \t/* blocking writelock */\n \tif (flock(dir_fd, LOCK_EX)) {\n \t\tRTE_LOG(ERR, EAL, \"%s(): Cannot lock '%s': %s\\n\", __func__,\n-\t\t\thi->hugedir, strerror(errno));\n+\t\t\thi->hugedir, rte_strerror(errno));\n \t\tclose(dir_fd);\n \t\treturn -1;\n \t}\ndiff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c\nindex 9b6f08fba8..db92d1a602 100644\n--- a/lib/eal/linux/eal_memory.c\n+++ b/lib/eal/linux/eal_memory.c\n@@ -105,7 +105,7 @@ rte_mem_virt2phy(const void *virtaddr)\n \tfd = open(\"/proc/self/pagemap\", O_RDONLY);\n \tif (fd < 0) {\n \t\tRTE_LOG(INFO, EAL, \"%s(): cannot open /proc/self/pagemap: %s\\n\",\n-\t\t\t__func__, strerror(errno));\n+\t\t\t__func__, rte_strerror(errno));\n \t\treturn RTE_BAD_IOVA;\n \t}\n \n@@ -113,7 +113,7 @@ rte_mem_virt2phy(const void *virtaddr)\n \toffset = sizeof(uint64_t) * virt_pfn;\n \tif (lseek(fd, offset, SEEK_SET) == (off_t) -1) {\n \t\tRTE_LOG(INFO, EAL, \"%s(): seek error in /proc/self/pagemap: %s\\n\",\n-\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t__func__, rte_strerror(errno));\n \t\tclose(fd);\n \t\treturn RTE_BAD_IOVA;\n \t}\n@@ -122,7 +122,7 @@ rte_mem_virt2phy(const void *virtaddr)\n \tclose(fd);\n \tif (retval < 0) {\n \t\tRTE_LOG(INFO, EAL, \"%s(): cannot read /proc/self/pagemap: %s\\n\",\n-\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t__func__, rte_strerror(errno));\n \t\treturn RTE_BAD_IOVA;\n \t} else if (retval != PFN_MASK_SIZE) {\n \t\tRTE_LOG(INFO, EAL, \"%s(): read %d bytes from /proc/self/pagemap \"\n@@ -237,7 +237,7 @@ static int huge_wrap_sigsetjmp(void)\n /* Callback for numa library. */\n void numa_error(char *where)\n {\n-\tRTE_LOG(ERR, EAL, \"%s failed: %s\\n\", where, strerror(errno));\n+\tRTE_LOG(ERR, EAL, \"%s failed: %s\\n\", where, rte_strerror(errno));\n }\n #endif\n \n@@ -278,7 +278,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,\n \t\t\t\t  oldmask->size + 1, 0, 0) < 0) {\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\"Failed to get current mempolicy: %s. \"\n-\t\t\t\t\"Assuming MPOL_DEFAULT.\\n\", strerror(errno));\n+\t\t\t\t\"Assuming MPOL_DEFAULT.\\n\", rte_strerror(errno));\n \t\t\toldpolicy = MPOL_DEFAULT;\n \t\t}\n \t\tfor (i = 0; i < RTE_MAX_NUMA_NODES; i++)\n@@ -333,7 +333,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,\n \t\tfd = open(hf->filepath, O_CREAT | O_RDWR, 0600);\n \t\tif (fd < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): open failed: %s\\n\", __func__,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\tgoto out;\n \t\t}\n \n@@ -346,7 +346,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,\n \t\t\t\tMAP_SHARED | MAP_POPULATE, fd, 0);\n \t\tif (virtaddr == MAP_FAILED) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): mmap failed: %s\\n\", __func__,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\tclose(fd);\n \t\t\tgoto out;\n \t\t}\n@@ -379,7 +379,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,\n \t\t/* set shared lock on the file. */\n \t\tif (flock(fd, LOCK_SH) < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): Locking file failed:%s \\n\",\n-\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t__func__, rte_strerror(errno));\n \t\t\tclose(fd);\n \t\t\tgoto out;\n \t\t}\n@@ -397,7 +397,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi,\n \t\t} else if (set_mempolicy(oldpolicy, oldmask->maskp,\n \t\t\t\t\t oldmask->size + 1) < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"Failed to restore mempolicy: %s\\n\",\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\t\tnuma_set_localalloc();\n \t\t}\n \t}\n@@ -590,7 +590,7 @@ unlink_hugepage_files(struct hugepage_file *hugepg_tbl,\n \n \t\tif (hp->orig_va != NULL && unlink(hp->filepath)) {\n \t\t\tRTE_LOG(WARNING, EAL, \"%s(): Removing %s failed: %s\\n\",\n-\t\t\t\t__func__, hp->filepath, strerror(errno));\n+\t\t\t\t__func__, hp->filepath, rte_strerror(errno));\n \t\t}\n \t}\n \treturn 0;\n@@ -640,7 +640,8 @@ unmap_unneeded_hugepages(struct hugepage_file *hugepg_tbl,\n \t\t\t\t\t\thp->orig_va = NULL;\n \t\t\t\t\t\tif (unlink(hp->filepath) == -1) {\n \t\t\t\t\t\t\tRTE_LOG(ERR, EAL, \"%s(): Removing %s failed: %s\\n\",\n-\t\t\t\t\t\t\t\t\t__func__, hp->filepath, strerror(errno));\n+\t\t\t\t\t\t\t\t__func__, hp->filepath,\n+\t\t\t\t\t\t\t\trte_strerror(errno));\n \t\t\t\t\t\t\treturn -1;\n \t\t\t\t\t\t}\n \t\t\t\t\t} else {\n@@ -736,13 +737,13 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)\n \t\tfd = open(hfile->filepath, O_RDWR);\n \t\tif (fd < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"Could not open '%s': %s\\n\",\n-\t\t\t\t\thfile->filepath, strerror(errno));\n+\t\t\t\t\thfile->filepath, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t\t/* set shared lock on the file. */\n \t\tif (flock(fd, LOCK_SH) < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"Could not lock '%s': %s\\n\",\n-\t\t\t\t\thfile->filepath, strerror(errno));\n+\t\t\t\t\thfile->filepath, rte_strerror(errno));\n \t\t\tclose(fd);\n \t\t\treturn -1;\n \t\t}\n@@ -756,7 +757,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)\n \t\t\t\tMAP_SHARED | MAP_POPULATE | MAP_FIXED, fd, 0);\n \t\tif (addr == MAP_FAILED) {\n \t\t\tRTE_LOG(ERR, EAL, \"Couldn't remap '%s': %s\\n\",\n-\t\t\t\t\thfile->filepath, strerror(errno));\n+\t\t\t\t\thfile->filepath, rte_strerror(errno));\n \t\t\tclose(fd);\n \t\t\treturn -1;\n \t\t}\n@@ -1178,13 +1179,13 @@ eal_legacy_hugepage_init(void)\n \t\tmemfd = memfd_create(\"nohuge\", 0);\n \t\tif (memfd < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"Cannot create memfd: %s\\n\",\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\tRTE_LOG(DEBUG, EAL, \"Falling back to anonymous map\\n\");\n \t\t} else {\n \t\t\t/* we got an fd - now resize it */\n \t\t\tif (ftruncate(memfd, internal_conf->memory) < 0) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Cannot resize memfd: %s\\n\",\n-\t\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\t\trte_strerror(errno));\n \t\t\t\tRTE_LOG(ERR, EAL, \"Falling back to anonymous map\\n\");\n \t\t\t\tclose(memfd);\n \t\t\t} else {\n@@ -1212,7 +1213,7 @@ eal_legacy_hugepage_init(void)\n \t\t\t\tflags | MAP_FIXED, fd, 0);\n \t\tif (addr == MAP_FAILED || addr != prealloc_addr) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s: mmap() failed: %s\\n\", __func__,\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t\tmunmap(prealloc_addr, mem_sz);\n \t\t\treturn -1;\n \t\t}\n@@ -1571,7 +1572,7 @@ eal_legacy_hugepage_attach(void)\n \t\tfd = open(hf->filepath, O_RDWR);\n \t\tif (fd < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"Could not open %s: %s\\n\",\n-\t\t\t\thf->filepath, strerror(errno));\n+\t\t\t\thf->filepath, rte_strerror(errno));\n \t\t\tgoto error;\n \t\t}\n \n@@ -1579,14 +1580,14 @@ eal_legacy_hugepage_attach(void)\n \t\t\t\tMAP_SHARED | MAP_FIXED, fd, 0);\n \t\tif (map_addr == MAP_FAILED) {\n \t\t\tRTE_LOG(ERR, EAL, \"Could not map %s: %s\\n\",\n-\t\t\t\thf->filepath, strerror(errno));\n+\t\t\t\thf->filepath, rte_strerror(errno));\n \t\t\tgoto fd_error;\n \t\t}\n \n \t\t/* set shared lock on the file. */\n \t\tif (flock(fd, LOCK_SH) < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"%s(): Locking file failed: %s\\n\",\n-\t\t\t\t__func__, strerror(errno));\n+\t\t\t\t__func__, rte_strerror(errno));\n \t\t\tgoto mmap_error;\n \t\t}\n \n@@ -1931,7 +1932,7 @@ rte_eal_memseg_init(void)\n \n \t\tif (setrlimit(RLIMIT_NOFILE, &lim) < 0) {\n \t\t\tRTE_LOG(DEBUG, EAL, \"Setting maximum number of open files failed: %s\\n\",\n-\t\t\t\t\tstrerror(errno));\n+\t\t\t\t\trte_strerror(errno));\n \t\t} else {\n \t\t\tRTE_LOG(DEBUG, EAL, \"Setting maximum number of open files to %\"\n \t\t\t\t\tPRIu64 \"\\n\",\ndiff --git a/lib/eal/linux/eal_timer.c b/lib/eal/linux/eal_timer.c\nindex 3a30284e3a..c80e87309c 100644\n--- a/lib/eal/linux/eal_timer.c\n+++ b/lib/eal/linux/eal_timer.c\n@@ -146,7 +146,7 @@ rte_eal_hpet_init(int make_default)\n \tfd = open(DEV_HPET, O_RDONLY);\n \tif (fd < 0) {\n \t\tRTE_LOG(ERR, EAL, \"ERROR: Cannot open \"DEV_HPET\": %s!\\n\",\n-\t\t\tstrerror(errno));\n+\t\t\trte_strerror(errno));\n \t\tinternal_conf->no_hpet = 1;\n \t\treturn -1;\n \t}\ndiff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c\nindex ad3c1654b2..c18d4ee8ab 100644\n--- a/lib/eal/linux/eal_vfio.c\n+++ b/lib/eal/linux/eal_vfio.c\n@@ -368,7 +368,7 @@ vfio_open_group_fd(int iommu_group_num)\n \t\t\t/* if file not found, it's not an error */\n \t\t\tif (errno != ENOENT) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Cannot open %s: %s\\n\",\n-\t\t\t\t\t\tfilename, strerror(errno));\n+\t\t\t\t\t\tfilename, rte_strerror(errno));\n \t\t\t\treturn -1;\n \t\t\t}\n \n@@ -381,7 +381,7 @@ vfio_open_group_fd(int iommu_group_num)\n \t\t\t\tif (errno != ENOENT) {\n \t\t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\t\"Cannot open %s: %s\\n\",\n-\t\t\t\t\t\tfilename, strerror(errno));\n+\t\t\t\t\t\tfilename, rte_strerror(errno));\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n \t\t\t\treturn -ENOENT;\n@@ -791,7 +791,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,\n \tret = ioctl(vfio_group_fd, VFIO_GROUP_GET_STATUS, &group_status);\n \tif (ret) {\n \t\tRTE_LOG(ERR, EAL, \"%s cannot get VFIO group status, \"\n-\t\t\t\"error %i (%s)\\n\", dev_addr, errno, strerror(errno));\n+\t\t\t\"error %i (%s)\\n\", dev_addr, errno, rte_strerror(errno));\n \t\tclose(vfio_group_fd);\n \t\trte_vfio_clear_group(vfio_group_fd);\n \t\treturn -1;\n@@ -819,7 +819,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\"%s cannot add VFIO group to container, error \"\n-\t\t\t\t\"%i (%s)\\n\", dev_addr, errno, strerror(errno));\n+\t\t\t\t\"%i (%s)\\n\", dev_addr, errno, rte_strerror(errno));\n \t\t\tclose(vfio_group_fd);\n \t\t\trte_vfio_clear_group(vfio_group_fd);\n \t\t\treturn -1;\n@@ -860,7 +860,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,\n \t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"%s DMA remapping failed, error \"\n \t\t\t\t\t\"%i (%s)\\n\",\n-\t\t\t\t\tdev_addr, errno, strerror(errno));\n+\t\t\t\t\tdev_addr, errno, rte_strerror(errno));\n \t\t\t\tclose(vfio_group_fd);\n \t\t\t\trte_vfio_clear_group(vfio_group_fd);\n \t\t\t\trte_mcfg_mem_read_unlock();\n@@ -978,7 +978,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,\n \tif (ret) {\n \t\tRTE_LOG(ERR, EAL, \"%s cannot get device info, \"\n \t\t\t\t\"error %i (%s)\\n\", dev_addr, errno,\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\tclose(*vfio_dev_fd);\n \t\tclose(vfio_group_fd);\n \t\trte_vfio_clear_group(vfio_group_fd);\n@@ -1216,7 +1216,7 @@ vfio_set_iommu_type(int vfio_container_fd)\n \t\t/* not an error, there may be more supported IOMMU types */\n \t\tRTE_LOG(DEBUG, EAL, \"Set IOMMU type %d (%s) failed, error \"\n \t\t\t\t\"%i (%s)\\n\", t->type_id, t->name, errno,\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t}\n \t/* if we didn't find a suitable IOMMU type, fail */\n \treturn NULL;\n@@ -1234,7 +1234,7 @@ vfio_has_supported_extensions(int vfio_container_fd)\n \t\t\t\tt->type_id);\n \t\tif (ret < 0) {\n \t\t\tRTE_LOG(ERR, EAL, \"Could not get IOMMU type, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\tclose(vfio_container_fd);\n \t\t\treturn -1;\n \t\t} else if (ret == 1) {\n@@ -1274,7 +1274,7 @@ rte_vfio_get_container_fd(void)\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"Cannot open VFIO container %s, error \"\n \t\t\t\t\t\"%i (%s)\\n\", VFIO_CONTAINER_PATH,\n-\t\t\t\t\terrno, strerror(errno));\n+\t\t\t\t\terrno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -1284,7 +1284,7 @@ rte_vfio_get_container_fd(void)\n \t\t\tif (ret < 0)\n \t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"Could not get VFIO API version, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\telse\n \t\t\t\tRTE_LOG(ERR, EAL, \"Unsupported VFIO API version!\\n\");\n \t\t\tclose(vfio_container_fd);\n@@ -1416,7 +1416,7 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\t\t} else {\n \t\t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\t\"Cannot set up DMA remapping, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t}\n@@ -1430,7 +1430,7 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\t\t\t&dma_unmap);\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL, \"Cannot clear DMA remapping, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t} else if (dma_unmap.size != len) {\n \t\t\tRTE_LOG(ERR, EAL, \"Unexpected size %\"PRIu64\n@@ -1479,7 +1479,7 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\"Cannot register vaddr for IOMMU, error \"\n-\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -1494,7 +1494,7 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\tret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map);\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL, \"Cannot map vaddr for IOMMU, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -1510,7 +1510,7 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\t\t\t&dma_unmap);\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL, \"Cannot unmap vaddr for IOMMU, error \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n@@ -1519,7 +1519,7 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n \t\tif (ret) {\n \t\t\tRTE_LOG(ERR, EAL,\n \t\t\t\t\"Cannot unregister vaddr for IOMMU, error \"\n-\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t}\n@@ -1704,7 +1704,7 @@ vfio_spapr_create_dma_window(int vfio_container_fd)\n \tret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_GET_INFO, &info);\n \tif (ret) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot get IOMMU info, error %i (%s)\\n\",\n-\t\t\terrno, strerror(errno));\n+\t\t\terrno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -1745,7 +1745,7 @@ vfio_spapr_create_dma_window(int vfio_container_fd)\n #endif /* VFIO_IOMMU_SPAPR_INFO_DDW */\n \tif (ret) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot create new DMA window, error \"\n-\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Consider using a larger hugepage size if supported by the system\\n\");\n \t\treturn -1;\n@@ -2006,7 +2006,7 @@ rte_vfio_noiommu_is_enabled(void)\n \tif (fd < 0) {\n \t\tif (errno != ENOENT) {\n \t\t\tRTE_LOG(ERR, EAL, \"Cannot open VFIO noiommu file \"\n-\t\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\t\treturn -1;\n \t\t}\n \t\t/*\n@@ -2020,7 +2020,7 @@ rte_vfio_noiommu_is_enabled(void)\n \tclose(fd);\n \tif (cnt != 1) {\n \t\tRTE_LOG(ERR, EAL, \"Unable to read from VFIO noiommu file \"\n-\t\t\t\t\"%i (%s)\\n\", errno, strerror(errno));\n+\t\t\t\t\"%i (%s)\\n\", errno, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/eal/unix/eal_filesystem.c b/lib/eal/unix/eal_filesystem.c\nindex afbab9368a..51b4d513f2 100644\n--- a/lib/eal/unix/eal_filesystem.c\n+++ b/lib/eal/unix/eal_filesystem.c\n@@ -13,6 +13,7 @@\n #include <unistd.h>\n \n #include <rte_log.h>\n+#include <rte_errno.h>\n \n #include \"eal_private.h\"\n #include \"eal_filesystem.h\"\n@@ -59,14 +60,14 @@ int eal_create_runtime_dir(void)\n \tret = mkdir(tmp, 0700);\n \tif (ret < 0 && errno != EEXIST) {\n \t\tRTE_LOG(ERR, EAL, \"Error creating '%s': %s\\n\",\n-\t\t\ttmp, strerror(errno));\n+\t\t\ttmp, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n \tret = mkdir(run_dir, 0700);\n \tif (ret < 0 && errno != EEXIST) {\n \t\tRTE_LOG(ERR, EAL, \"Error creating '%s': %s\\n\",\n-\t\t\trun_dir, strerror(errno));\n+\t\t\trun_dir, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/eal/unix/eal_unix_memory.c b/lib/eal/unix/eal_unix_memory.c\nindex 68ae93bd6e..d9652496df 100644\n--- a/lib/eal/unix/eal_unix_memory.c\n+++ b/lib/eal/unix/eal_unix_memory.c\n@@ -32,7 +32,7 @@ mem_map(void *requested_addr, size_t size, int prot, int flags,\n \t\tRTE_LOG(DEBUG, EAL,\n \t\t    \"Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%\"PRIx64\"): %s\\n\",\n \t\t    requested_addr, size, prot, flags, fd, offset,\n-\t\t    strerror(errno));\n+\t\t    rte_strerror(errno));\n \t\trte_errno = errno;\n \t\treturn NULL;\n \t}\n@@ -45,7 +45,7 @@ mem_unmap(void *virt, size_t size)\n \tint ret = munmap(virt, size);\n \tif (ret < 0) {\n \t\tRTE_LOG(DEBUG, EAL, \"Cannot munmap(%p, 0x%zx): %s\\n\",\n-\t\t\tvirt, size, strerror(errno));\n+\t\t\tvirt, size, rte_strerror(errno));\n \t\trte_errno = errno;\n \t}\n \treturn ret;\n@@ -84,7 +84,7 @@ eal_mem_set_dump(void *virt, size_t size, bool dump)\n \tint ret = madvise(virt, size, flags);\n \tif (ret) {\n \t\tRTE_LOG(DEBUG, EAL, \"madvise(%p, %#zx, %d) failed: %s\\n\",\n-\t\t\t\tvirt, size, flags, strerror(rte_errno));\n+\t\t\t\tvirt, size, flags, rte_strerror(rte_errno));\n \t\trte_errno = errno;\n \t}\n \treturn ret;\ndiff --git a/lib/eal/unix/rte_thread.c b/lib/eal/unix/rte_thread.c\nindex 36a21ab2f9..486fd72277 100644\n--- a/lib/eal/unix/rte_thread.c\n+++ b/lib/eal/unix/rte_thread.c\n@@ -302,7 +302,7 @@ rte_thread_key_create(rte_thread_key *key, void (*destructor)(void *))\n \terr = pthread_key_create(&((*key)->thread_index), destructor);\n \tif (err) {\n \t\tRTE_LOG(DEBUG, EAL, \"pthread_key_create failed: %s\\n\",\n-\t\t\tstrerror(err));\n+\t\t\trte_strerror(err));\n \t\tfree(*key);\n \t\trte_errno = ENOEXEC;\n \t\treturn -1;\n@@ -323,7 +323,7 @@ rte_thread_key_delete(rte_thread_key key)\n \terr = pthread_key_delete(key->thread_index);\n \tif (err) {\n \t\tRTE_LOG(DEBUG, EAL, \"pthread_key_delete failed: %s\\n\",\n-\t\t\tstrerror(err));\n+\t\t\trte_strerror(err));\n \t\tfree(key);\n \t\trte_errno = ENOEXEC;\n \t\treturn -1;\n@@ -345,7 +345,7 @@ rte_thread_value_set(rte_thread_key key, const void *value)\n \terr = pthread_setspecific(key->thread_index, value);\n \tif (err) {\n \t\tRTE_LOG(DEBUG, EAL, \"pthread_setspecific failed: %s\\n\",\n-\t\t\tstrerror(err));\n+\t\t\trte_strerror(err));\n \t\trte_errno = ENOEXEC;\n \t\treturn -1;\n \t}\n",
    "prefixes": [
        "v2",
        "02/43"
    ]
}