get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134287,
    "url": "http://patches.dpdk.org/api/patches/134287/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114112407.3496460-8-huangdengdui@huawei.com/",
    "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": "<20231114112407.3496460-8-huangdengdui@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114112407.3496460-8-huangdengdui@huawei.com",
    "date": "2023-11-14T11:23:31",
    "name": "[v2,07/43] power: use rte strerror",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9ca1ec6f8d4b7fc83bc8a494662ed29424336608",
    "submitter": {
        "id": 3066,
        "url": "http://patches.dpdk.org/api/people/3066/?format=api",
        "name": "huangdengdui",
        "email": "huangdengdui@huawei.com"
    },
    "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/20231114112407.3496460-8-huangdengdui@huawei.com/mbox/",
    "series": [
        {
            "id": 30292,
            "url": "http://patches.dpdk.org/api/series/30292/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30292",
            "date": "2023-11-14T11:23:25",
            "name": "replace strerror",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30292/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134287/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134287/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 B421843329;\n\tTue, 14 Nov 2023 12:24:57 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CB86640A67;\n\tTue, 14 Nov 2023 12:24:20 +0100 (CET)",
            "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id 73755402C3\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:24:10 +0100 (CET)",
            "from dggpeml500011.china.huawei.com (unknown [172.30.72.55])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SV3jL1ffczMmpH;\n Tue, 14 Nov 2023 19:19:34 +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:09 +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 07/43] power: use rte strerror",
        "Date": "Tue, 14 Nov 2023 19:23:31 +0800",
        "Message-ID": "<20231114112407.3496460-8-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/power/guest_channel.c        | 7 ++++---\n lib/power/power_kvm_vm.c         | 3 ++-\n lib/power/power_pstate_cpufreq.c | 7 ++++---\n lib/power/rte_power_pmd_mgmt.c   | 2 +-\n 4 files changed, 11 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c\nindex 7b2ae0b650..1484b384df 100644\n--- a/lib/power/guest_channel.c\n+++ b/lib/power/guest_channel.c\n@@ -14,6 +14,7 @@\n \n #include <rte_log.h>\n #include <rte_power.h>\n+#include <rte_errno.h>\n \n #include \"guest_channel.h\"\n \n@@ -75,7 +76,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)\n \tfd = open(fd_path, O_RDWR);\n \tif (fd < 0) {\n \t\tRTE_LOG(ERR, GUEST_CHANNEL, \"Unable to connect to '%s' with error \"\n-\t\t\t\t\"%s\\n\", fd_path, strerror(errno));\n+\t\t\t\t\"%s\\n\", fd_path, rte_strerror(errno));\n \t\treturn -1;\n \t}\n \n@@ -104,7 +105,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)\n \tif (ret != 0) {\n \t\tRTE_LOG(ERR, GUEST_CHANNEL,\n \t\t\t\t\"Error on channel '%s' communications test: %s\\n\",\n-\t\t\t\tfd_path, ret > 0 ? strerror(ret) :\n+\t\t\t\tfd_path, ret > 0 ? rte_strerror(ret) :\n \t\t\t\t\"channel not connected\");\n \t\tgoto error;\n \t}\n@@ -184,7 +185,7 @@ int power_guest_channel_read_msg(void *pkt,\n \t\treturn -1;\n \t} else if (ret < 0) {\n \t\tRTE_LOG(ERR, GUEST_CHANNEL, \"Error occurred during poll function: %s\\n\",\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\treturn -1;\n \t}\n \ndiff --git a/lib/power/power_kvm_vm.c b/lib/power/power_kvm_vm.c\nindex 6a8109d449..bb9c9b95fe 100644\n--- a/lib/power/power_kvm_vm.c\n+++ b/lib/power/power_kvm_vm.c\n@@ -5,6 +5,7 @@\n #include <string.h>\n \n #include <rte_log.h>\n+#include <rte_errno.h>\n \n #include \"rte_power_guest_channel.h\"\n #include \"guest_channel.h\"\n@@ -82,7 +83,7 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction)\n \tif (ret == 0)\n \t\treturn 1;\n \tRTE_LOG(DEBUG, POWER, \"Error sending message: %s\\n\",\n-\t\t\tret > 0 ? strerror(ret) : \"channel not connected\");\n+\t\t\tret > 0 ? rte_strerror(ret) : \"channel not connected\");\n \treturn -1;\n }\n \ndiff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c\nindex 5ca5f60bcd..eeb0f3831b 100644\n--- a/lib/power/power_pstate_cpufreq.c\n+++ b/lib/power/power_pstate_cpufreq.c\n@@ -13,6 +13,7 @@\n \n #include <rte_memcpy.h>\n #include <rte_stdatomic.h>\n+#include <rte_errno.h>\n \n #include \"rte_power_pmd_mgmt.h\"\n #include \"power_pstate_cpufreq.h\"\n@@ -83,7 +84,7 @@ power_read_turbo_pct(uint64_t *outVal)\n \n \tif (fd < 0) {\n \t\tRTE_LOG(ERR, POWER, \"Error opening '%s': %s\\n\", POWER_SYSFILE_TURBO_PCT,\n-\t\t\t\t strerror(errno));\n+\t\t\t\t rte_strerror(errno));\n \t\treturn fd;\n \t}\n \n@@ -91,7 +92,7 @@ power_read_turbo_pct(uint64_t *outVal)\n \n \tif (ret < 0) {\n \t\tRTE_LOG(ERR, POWER, \"Error reading '%s': %s\\n\", POWER_SYSFILE_TURBO_PCT,\n-\t\t\t\t strerror(errno));\n+\t\t\t\t rte_strerror(errno));\n \t\tgoto out;\n \t}\n \n@@ -99,7 +100,7 @@ power_read_turbo_pct(uint64_t *outVal)\n \t*outVal = (uint64_t) strtol(val, &endptr, 10);\n \tif (errno != 0 || (*endptr != 0 && *endptr != '\\n')) {\n \t\tRTE_LOG(ERR, POWER, \"Error converting str to digits, read from %s: %s\\n\",\n-\t\t\t\t POWER_SYSFILE_TURBO_PCT, strerror(errno));\n+\t\t\t\t POWER_SYSFILE_TURBO_PCT, rte_strerror(errno));\n \t\tret = -1;\n \t\tgoto out;\n \t}\ndiff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c\nindex 38f8384085..a61a5c8f98 100644\n--- a/lib/power/rte_power_pmd_mgmt.c\n+++ b/lib/power/rte_power_pmd_mgmt.c\n@@ -574,7 +574,7 @@ rte_power_ethdev_pmgmt_queue_enable(unsigned int lcore_id, uint16_t port_id,\n \tret = queue_list_add(lcore_cfg, &qdata);\n \tif (ret < 0) {\n \t\tRTE_LOG(DEBUG, POWER, \"Failed to add queue to list: %s\\n\",\n-\t\t\t\tstrerror(-ret));\n+\t\t\t\trte_strerror(-ret));\n \t\tgoto end;\n \t}\n \t/* new queue is always added last */\n",
    "prefixes": [
        "v2",
        "07/43"
    ]
}