Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92243/?format=api
http://patches.dpdk.org/api/patches/92243/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1619516192-40499-1-git-send-email-humin29@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": "<1619516192-40499-1-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1619516192-40499-1-git-send-email-humin29@huawei.com", "date": "2021-04-27T09:36:32", "name": "lib: fix socket id type", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "4870c929700696c6bf1019af618e9318c1f50024", "submitter": { "id": 1944, "url": "http://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@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/1619516192-40499-1-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 16696, "url": "http://patches.dpdk.org/api/series/16696/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16696", "date": "2021-04-27T09:36:32", "name": "lib: fix socket id type", "version": 1, "mbox": "http://patches.dpdk.org/series/16696/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/92243/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/92243/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 6C9B8A0548;\n\tTue, 27 Apr 2021 11:36:32 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E18A74067E;\n\tTue, 27 Apr 2021 11:36:31 +0200 (CEST)", "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by mails.dpdk.org (Postfix) with ESMTP id AE79F40150\n for <dev@dpdk.org>; Tue, 27 Apr 2021 11:36:30 +0200 (CEST)", "from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FTxQS4WmWzPsFY;\n Tue, 27 Apr 2021 17:33:20 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id\n 14.3.498.0; Tue, 27 Apr 2021 17:36:22 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>, <byron.marohn@intel.com>,\n <yipeng1.wang@intel.com>, <ndabilpuram@marvell.com>,\n <pbhagavatula@marvell.com>", "Date": "Tue, 27 Apr 2021 17:36:32 +0800", "Message-ID": "<1619516192-40499-1-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH] lib: fix socket id type", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Chengchang Tang <tangchengchang@huawei.com>\n\nThe variable type of the current socket ID is uint8_t. When traversing all\nnodes, the socket ID is compared with RTE_MAX_NUMA_NODES. Since\nRTE_MAX_NUMA_NODES has not been verified, it may be larger than UCHAR_MAX\ntheoretically. This would lead to an infinite loop.\n\nThis patch declares the socket ID type as 'int' or 'unsigned int' by\nreferring to the common practice in EAL.\n\nFixes: 56b6ef874f80 (\"efd: new Elastic Flow Distributor library\")\nFixes: f00708c2aa53 (\"node: add IPv4 rewrite and lookup control\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n lib/efd/rte_efd.c | 4 ++--\n lib/node/ip4_lookup.c | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)", "diff": "diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c\nindex 77f4680..4d354d8 100644\n--- a/lib/efd/rte_efd.c\n+++ b/lib/efd/rte_efd.c\n@@ -500,7 +500,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,\n \tstruct rte_efd_table *table = NULL;\n \tuint8_t *key_array = NULL;\n \tuint32_t num_chunks, num_chunks_shift;\n-\tuint8_t socket_id;\n+\tunsigned int socket_id;\n \tstruct rte_efd_list *efd_list = NULL;\n \tstruct rte_tailq_entry *te;\n \tuint64_t offline_table_size;\n@@ -746,7 +746,7 @@ rte_efd_find_existing(const char *name)\n void\n rte_efd_free(struct rte_efd_table *table)\n {\n-\tuint8_t socket_id;\n+\tunsigned int socket_id;\n \tstruct rte_efd_list *efd_list;\n \tstruct rte_tailq_entry *te, *temp;\n \ndiff --git a/lib/node/ip4_lookup.c b/lib/node/ip4_lookup.c\nindex d083a72..4811378 100644\n--- a/lib/node/ip4_lookup.c\n+++ b/lib/node/ip4_lookup.c\n@@ -129,7 +129,7 @@ rte_node_ip4_route_add(uint32_t ip, uint8_t depth, uint16_t next_hop,\n {\n \tchar abuf[INET6_ADDRSTRLEN];\n \tstruct in_addr in;\n-\tuint8_t socket;\n+\tint socket;\n \tuint32_t val;\n \tint ret;\n \n", "prefixes": [] }{ "id": 92243, "url": "