Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/84952/?format=api
http://patches.dpdk.org/api/patches/84952/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201210150648.8784-2-talshn@nvidia.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": "<20201210150648.8784-2-talshn@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201210150648.8784-2-talshn@nvidia.com", "date": "2020-12-10T15:06:16", "name": "[v2,01/33] net/mlx5: fix folding constant array error", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "428e6425cd0f6840f8daa24cbb4097e2ae0a6d0f", "submitter": { "id": 1893, "url": "http://patches.dpdk.org/api/people/1893/?format=api", "name": "Tal Shnaiderman", "email": "talshn@nvidia.com" }, "delegate": { "id": 3268, "url": "http://patches.dpdk.org/api/users/3268/?format=api", "username": "rasland", "first_name": "Raslan", "last_name": "Darawsheh", "email": "rasland@nvidia.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201210150648.8784-2-talshn@nvidia.com/mbox/", "series": [ { "id": 14240, "url": "http://patches.dpdk.org/api/series/14240/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14240", "date": "2020-12-10T15:06:17", "name": "mlx5 Windows support - part #5", "version": 2, "mbox": "http://patches.dpdk.org/series/14240/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/84952/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/84952/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 22CC3A04DB;\n\tThu, 10 Dec 2020 16:08:10 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 313A5C96E;\n\tThu, 10 Dec 2020 16:07:52 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id BCC00BE73\n for <dev@dpdk.org>; Thu, 10 Dec 2020 16:07:47 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n talshn@nvidia.com) with SMTP; 10 Dec 2020 17:07:44 +0200", "from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BAF7h8r007994;\n Thu, 10 Dec 2020 17:07:43 +0200" ], "From": "Tal Shnaiderman <talshn@nvidia.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com,\n ophirmu@nvidia.com, stable@dpdk.org", "Date": "Thu, 10 Dec 2020 17:06:16 +0200", "Message-Id": "<20201210150648.8784-2-talshn@nvidia.com>", "X-Mailer": "git-send-email 2.16.1.windows.4", "In-Reply-To": "<20201210150648.8784-1-talshn@nvidia.com>", "References": "<20201027232335.31427-2-ophirmu@nvidia.com>\n <20201210150648.8784-1-talshn@nvidia.com>", "Subject": "[dpdk-dev] [PATCH v2 01/33] net/mlx5: fix folding constant array\n\terror", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "Before this commit the PMD used:\n const int elt_n = 8\n const int *stack[elt_n];\n\nIn Windows clang compiler complains:\nnet/mlx5/mlx5_flow.c:215:19: error: variable length array folded\nto constant array as an extension [-Werror,-Wgnu-folding-constant]\n\nFix it by using a constant macro definition instead of a variable:\n #define MLX5_RSS_EXP_ELT_N 8\n const int *stack[MLX5_RSS_EXP_ELT_N];\n\nFixes: c7870bfe09dc (\"ethdev: move RSS expansion code to mlx5 driver\")\nCc: stable@dpdk.org\n\nSigned-off-by: Tal Shnaiderman <talshn@nvidia.com>\nSigned-off-by: Ophir Munk <ophirmu@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex 82e24d7067..bf86aaaa39 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -212,6 +212,8 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)\n \treturn ret;\n }\n \n+#define MLX5_RSS_EXP_ELT_N 8\n+\n /**\n * Expand RSS flows into several possible flows according to the RSS hash\n * fields requested and the driver capabilities.\n@@ -242,13 +244,12 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,\n \t\t const struct mlx5_flow_expand_node graph[],\n \t\t int graph_root_index)\n {\n-\tconst int elt_n = 8;\n \tconst struct rte_flow_item *item;\n \tconst struct mlx5_flow_expand_node *node = &graph[graph_root_index];\n \tconst int *next_node;\n-\tconst int *stack[elt_n];\n+\tconst int *stack[MLX5_RSS_EXP_ELT_N];\n \tint stack_pos = 0;\n-\tstruct rte_flow_item flow_items[elt_n];\n+\tstruct rte_flow_item flow_items[MLX5_RSS_EXP_ELT_N];\n \tunsigned int i;\n \tsize_t lsize;\n \tsize_t user_pattern_size = 0;\n@@ -261,10 +262,10 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,\n \n \tmemset(&missed_item, 0, sizeof(missed_item));\n \tlsize = offsetof(struct mlx5_flow_expand_rss, entry) +\n-\t\telt_n * sizeof(buf->entry[0]);\n+\t\tMLX5_RSS_EXP_ELT_N * sizeof(buf->entry[0]);\n \tif (lsize <= size) {\n \t\tbuf->entry[0].priority = 0;\n-\t\tbuf->entry[0].pattern = (void *)&buf->entry[elt_n];\n+\t\tbuf->entry[0].pattern = (void *)&buf->entry[MLX5_RSS_EXP_ELT_N];\n \t\tbuf->entries = 0;\n \t\taddr = buf->entry[0].pattern;\n \t}\n@@ -367,7 +368,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,\n \t\t/* Go deeper. */\n \t\tif (node->next) {\n \t\t\tnext_node = node->next;\n-\t\t\tif (stack_pos++ == elt_n) {\n+\t\t\tif (stack_pos++ == MLX5_RSS_EXP_ELT_N) {\n \t\t\t\trte_errno = E2BIG;\n \t\t\t\treturn -rte_errno;\n \t\t\t}\n", "prefixes": [ "v2", "01/33" ] }{ "id": 84952, "url": "