Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/92139/?format=api
http://patches.dpdk.org/api/patches/92139/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1619408092-54050-4-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": "<1619408092-54050-4-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1619408092-54050-4-git-send-email-humin29@huawei.com", "date": "2021-04-26T03:34:49", "name": "[3/6] net/hns3: use RTE DIM instead of ARRAY SIZE", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "af6e70d7a7390df4047d516f9176dd2ebc7f28b1", "submitter": { "id": 1944, "url": "http://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@huawei.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1619408092-54050-4-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 16662, "url": "http://patches.dpdk.org/api/series/16662/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16662", "date": "2021-04-26T03:34:48", "name": "optimization and bugfix for hns3 PMD", "version": 1, "mbox": "http://patches.dpdk.org/series/16662/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/92139/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/92139/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 361C5A0548;\n\tMon, 26 Apr 2021 05:34:59 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 88DA54118A;\n\tMon, 26 Apr 2021 05:34:49 +0200 (CEST)", "from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35])\n by mails.dpdk.org (Postfix) with ESMTP id ED3FD40A4B\n for <dev@dpdk.org>; Mon, 26 Apr 2021 05:34:45 +0200 (CEST)", "from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FT9SH53WnzB1sM\n for <dev@dpdk.org>; Mon, 26 Apr 2021 11:32:15 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id\n 14.3.498.0; Mon, 26 Apr 2021 11:34:42 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>", "Date": "Mon, 26 Apr 2021 11:34:49 +0800", "Message-ID": "<1619408092-54050-4-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1619408092-54050-1-git-send-email-humin29@huawei.com>", "References": "<1619408092-54050-1-git-send-email-humin29@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH 3/6] net/hns3: use RTE DIM instead of ARRAY SIZE", "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: Chengwen Feng <fengchengwen@huawei.com>\n\nThis patch uses RTE_DIM() instead of ARRAY_SIZE().\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/hns3/hns3_cmd.c | 4 ++--\n drivers/net/hns3/hns3_ethdev.h | 2 --\n drivers/net/hns3/hns3_flow.c | 18 +++++++++---------\n drivers/net/hns3/hns3_intr.c | 4 ++--\n 4 files changed, 13 insertions(+), 15 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c\nindex 4651d5b..2eec895 100644\n--- a/drivers/net/hns3/hns3_cmd.c\n+++ b/drivers/net/hns3/hns3_cmd.c\n@@ -245,7 +245,7 @@ hns3_is_special_opcode(uint16_t opcode)\n \t\t\t\t HNS3_OPC_QUERY_ALL_ERR_INFO,};\n \tuint32_t i;\n \n-\tfor (i = 0; i < ARRAY_SIZE(spec_opcode); i++)\n+\tfor (i = 0; i < RTE_DIM(spec_opcode); i++)\n \t\tif (spec_opcode[i] == opcode)\n \t\t\treturn true;\n \n@@ -276,7 +276,7 @@ hns3_cmd_convert_err_code(uint16_t desc_ret)\n \n \tuint32_t i;\n \n-\tfor (i = 0; i < ARRAY_SIZE(hns3_cmdq_status); i++)\n+\tfor (i = 0; i < RTE_DIM(hns3_cmdq_status); i++)\n \t\tif (hns3_cmdq_status[i].imp_errcode == desc_ret)\n \t\t\treturn hns3_cmdq_status[i].linux_errcode;\n \ndiff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h\nindex 68541df..258e26d 100644\n--- a/drivers/net/hns3/hns3_ethdev.h\n+++ b/drivers/net/hns3/hns3_ethdev.h\n@@ -1004,8 +1004,6 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg)\n #define hns3_read_dev(a, reg) \\\n \thns3_read_reg((a)->io_base, (reg))\n \n-#define ARRAY_SIZE(x) RTE_DIM(x)\n-\n #define NEXT_ITEM_OF_ACTION(act, actions, index) \\\n \tdo {\t\t\t\t\t\t\t\t\\\n \t\tact = (actions) + (index);\t\t\t\t\\\ndiff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c\nindex 4511a49..49d6568 100644\n--- a/drivers/net/hns3/hns3_flow.c\n+++ b/drivers/net/hns3/hns3_flow.c\n@@ -1054,37 +1054,37 @@ hns3_parse_normal(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,\n \tcase RTE_FLOW_ITEM_TYPE_ETH:\n \t\tret = hns3_parse_eth(item, rule, error);\n \t\tstep_mngr->items = L2_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L2_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L2_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_VLAN:\n \t\tret = hns3_parse_vlan(item, rule, error);\n \t\tstep_mngr->items = L2_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L2_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L2_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_IPV4:\n \t\tret = hns3_parse_ipv4(item, rule, error);\n \t\tstep_mngr->items = L3_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L3_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L3_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_IPV6:\n \t\tret = hns3_parse_ipv6(item, rule, error);\n \t\tstep_mngr->items = L3_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L3_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L3_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_TCP:\n \t\tret = hns3_parse_tcp(item, rule, error);\n \t\tstep_mngr->items = L4_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L4_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L4_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_UDP:\n \t\tret = hns3_parse_udp(item, rule, error);\n \t\tstep_mngr->items = L4_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L4_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L4_next_items);\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_SCTP:\n \t\tret = hns3_parse_sctp(item, rule, error);\n \t\tstep_mngr->items = L4_next_items;\n-\t\tstep_mngr->count = ARRAY_SIZE(L4_next_items);\n+\t\tstep_mngr->count = RTE_DIM(L4_next_items);\n \t\tbreak;\n \tdefault:\n \t\treturn rte_flow_error_set(error, ENOTSUP,\n@@ -1188,7 +1188,7 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,\n \t\t\t\t\t \"Fdir not supported in VF\");\n \n \tstep_mngr.items = first_items;\n-\tstep_mngr.count = ARRAY_SIZE(first_items);\n+\tstep_mngr.count = RTE_DIM(first_items);\n \tfor (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {\n \t\tif (item->type == RTE_FLOW_ITEM_TYPE_VOID)\n \t\t\tcontinue;\n@@ -1202,7 +1202,7 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,\n \t\t\tif (ret)\n \t\t\t\treturn ret;\n \t\t\tstep_mngr.items = tunnel_next_items;\n-\t\t\tstep_mngr.count = ARRAY_SIZE(tunnel_next_items);\n+\t\t\tstep_mngr.count = RTE_DIM(tunnel_next_items);\n \t\t} else {\n \t\t\tret = hns3_parse_normal(item, rule, &step_mngr, error);\n \t\t\tif (ret)\ndiff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c\nindex cc7d7c6..3155d7f 100644\n--- a/drivers/net/hns3/hns3_intr.c\n+++ b/drivers/net/hns3/hns3_intr.c\n@@ -2206,8 +2206,8 @@ hns3_handle_type_reg_error_data(struct hns3_hw *hw,\n \ttype_id = err_info->type_id & HNS3_ERR_TYPE_MASK;\n \tis_ras = err_info->type_id >> HNS3_ERR_TYPE_IS_RAS_OFFSET;\n \n-\ttotal_module = ARRAY_SIZE(hns3_hw_module_name);\n-\ttotal_type = ARRAY_SIZE(hns3_hw_error_type);\n+\ttotal_module = RTE_DIM(hns3_hw_module_name);\n+\ttotal_type = RTE_DIM(hns3_hw_error_type);\n \n \thns3_err(hw, \"total_module:%u, total_type:%u\",\n \t\t total_module, total_type);\n", "prefixes": [ "3/6" ] }{ "id": 92139, "url": "