Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134338/?format=api
https://patches.dpdk.org/api/patches/134338/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231114123552.398072-18-huangdengdui@huawei.com/", "project": { "id": 1, "url": "https://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": "<20231114123552.398072-18-huangdengdui@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231114123552.398072-18-huangdengdui@huawei.com", "date": "2023-11-14T12:35:27", "name": "[v3,17/42] common/mlx5: use rte strerror", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "cf006d7b66f575bd558204e83cea70ebe7fd7e09", "submitter": { "id": 3066, "url": "https://patches.dpdk.org/api/people/3066/?format=api", "name": "huangdengdui", "email": "huangdengdui@huawei.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231114123552.398072-18-huangdengdui@huawei.com/mbox/", "series": [ { "id": 30293, "url": "https://patches.dpdk.org/api/series/30293/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30293", "date": "2023-11-14T12:35:13", "name": "replace strerror", "version": 3, "mbox": "https://patches.dpdk.org/series/30293/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/134338/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/134338/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 D644A43329;\n\tTue, 14 Nov 2023 13:37:42 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5C34C406B8;\n\tTue, 14 Nov 2023 13:36:16 +0100 (CET)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id CBF4B402B0\n for <dev@dpdk.org>; Tue, 14 Nov 2023 13:35:56 +0100 (CET)", "from dggpeml500011.china.huawei.com (unknown [172.30.72.57])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SV5Kd28ydz1P890;\n Tue, 14 Nov 2023 20:32:37 +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 20:35:55 +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 v3 17/42] common/mlx5: use rte strerror", "Date": "Tue, 14 Nov 2023 20:35:27 +0800", "Message-ID": "<20231114123552.398072-18-huangdengdui@huawei.com>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20231114123552.398072-1-huangdengdui@huawei.com>", "References": "<20231114082539.1858594-44-huangdengdui@huawei.com>\n <20231114123552.398072-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": "dggems706-chm.china.huawei.com (10.3.19.183) 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 drivers/common/mlx5/linux/mlx5_nl.c | 12 ++++++------\n drivers/common/mlx5/mlx5_common.c | 6 +++---\n drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-\n 3 files changed, 10 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c\nindex 28a1f56dba..1de867089f 100644\n--- a/drivers/common/mlx5/linux/mlx5_nl.c\n+++ b/drivers/common/mlx5/linux/mlx5_nl.c\n@@ -547,7 +547,7 @@ mlx5_nl_mac_addr_list(int nlsk_fd, unsigned int iface_idx,\n \treturn 0;\n error:\n \tDRV_LOG(DEBUG, \"Interface %u cannot retrieve MAC address list %s\",\n-\t\tiface_idx, strerror(rte_errno));\n+\t\tiface_idx, rte_strerror(rte_errno));\n \treturn -rte_errno;\n }\n \n@@ -617,7 +617,7 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,\n \t\tDRV_LOG(DEBUG,\n \t\t\t\"Interface %u cannot %s MAC address %s %s\",\n \t\t\tiface_idx,\n-\t\t\tadd ? \"add\" : \"remove\", m, strerror(rte_errno));\n+\t\t\tadd ? \"add\" : \"remove\", m, rte_strerror(rte_errno));\n \t}\n #endif\n \treturn -rte_errno;\n@@ -704,7 +704,7 @@ mlx5_nl_vf_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,\n \t\tRTE_ETHER_ADDR_PRT_FMT \" : %s\",\n \t\tvf_index,\n \t\tRTE_ETHER_ADDR_BYTES(mac),\n-\t\tstrerror(rte_errno));\n+\t\trte_strerror(rte_errno));\n \treturn -rte_errno;\n }\n \n@@ -929,7 +929,7 @@ mlx5_nl_promisc(int nlsk_fd, unsigned int iface_idx, int enable)\n \t\tDRV_LOG(DEBUG,\n \t\t\t\"Interface %u cannot %s promisc mode: Netlink error %s\",\n \t\t\tiface_idx, enable ? \"enable\" : \"disable\",\n-\t\t\tstrerror(rte_errno));\n+\t\t\trte_strerror(rte_errno));\n \treturn ret;\n }\n \n@@ -956,7 +956,7 @@ mlx5_nl_allmulti(int nlsk_fd, unsigned int iface_idx, int enable)\n \t\tDRV_LOG(DEBUG,\n \t\t\t\"Interface %u cannot %s allmulti : Netlink error %s\",\n \t\t\tiface_idx, enable ? \"enable\" : \"disable\",\n-\t\t\tstrerror(rte_errno));\n+\t\t\trte_strerror(rte_errno));\n \treturn ret;\n }\n \n@@ -1934,7 +1934,7 @@ mlx5_nl_read_events(int nlsk_fd, mlx5_nl_event_cb *cb, void *cb_arg)\n \t\t\tif (errno == EINTR)\n \t\t\t\tcontinue;\n \t\t\tDRV_LOG(DEBUG, \"Failed to receive netlink message: %s\",\n-\t\t\t\tstrerror(errno));\n+\t\t\t\trte_strerror(errno));\n \t\t\trte_errno = errno;\n \t\t\treturn -rte_errno;\n \t\t}\ndiff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c\nindex ca8543e36e..7aafd0083d 100644\n--- a/drivers/common/mlx5/mlx5_common.c\n+++ b/drivers/common/mlx5/mlx5_common.c\n@@ -762,7 +762,7 @@ mlx5_common_dev_create(struct rte_device *eal_dev, uint32_t classes,\n \tret = mlx5_common_config_get(mkvlist, &cdev->config);\n \tif (ret < 0) {\n \t\tDRV_LOG(ERR, \"Failed to process device arguments: %s\",\n-\t\t\tstrerror(rte_errno));\n+\t\t\trte_strerror(rte_errno));\n \t\trte_free(cdev);\n \t\treturn NULL;\n \t}\n@@ -837,7 +837,7 @@ mlx5_common_probe_again_args_validate(struct mlx5_common_device *cdev,\n \tret = mlx5_common_config_get(mkvlist, config);\n \tif (ret) {\n \t\tDRV_LOG(ERR, \"Failed to process device configure: %s\",\n-\t\t\tstrerror(rte_errno));\n+\t\t\trte_strerror(rte_errno));\n \t\tmlx5_free(config);\n \t\treturn ret;\n \t}\n@@ -1011,7 +1011,7 @@ mlx5_common_dev_probe(struct rte_device *eal_dev)\n \t\tif (ret) {\n \t\t\tDRV_LOG(ERR,\n \t\t\t\t\"Probe again parameters aren't compatible : %s\",\n-\t\t\t\tstrerror(rte_errno));\n+\t\t\t\trte_strerror(rte_errno));\n \t\t\tgoto class_err;\n \t\t}\n \t}\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 4d8818924a..b33b5d3044 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -640,7 +640,7 @@ mlx5_devx_cmd_match_sample_info_query(void *ctx, uint32_t sample_field_id,\n \trc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out));\n \tif (rc) {\n \t\tDRV_LOG(ERR, \"Failed to query match sample info using DevX: %s\",\n-\t\t\tstrerror(rc));\n+\t\t\trte_strerror(rc));\n \t\trte_errno = rc;\n \t\treturn -rc;\n \t}\n", "prefixes": [ "v3", "17/42" ] }{ "id": 134338, "url": "