Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/99361/?format=api
http://patches.dpdk.org/api/patches/99361/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210921132009.3461020-10-qi.z.zhang@intel.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": "<20210921132009.3461020-10-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210921132009.3461020-10-qi.z.zhang@intel.com", "date": "2021-09-21T13:19:58", "name": "[v3,09/20] net/ice/base: init flag redirect table for parser", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0112ef4116f519bdbd27c928c332151934d1e287", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210921132009.3461020-10-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 19057, "url": "http://patches.dpdk.org/api/series/19057/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19057", "date": "2021-09-21T13:19:49", "name": "ice/base: add parser module", "version": 3, "mbox": "http://patches.dpdk.org/series/19057/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/99361/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/99361/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 B335AA0C4C;\n\tTue, 21 Sep 2021 15:18:21 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 942924116E;\n\tTue, 21 Sep 2021 15:17:24 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 9E2EF41159\n for <dev@dpdk.org>; Tue, 21 Sep 2021 15:17:19 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Sep 2021 06:17:19 -0700", "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga008.jf.intel.com with ESMTP; 21 Sep 2021 06:17:17 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10113\"; a=\"202847463\"", "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"202847463\"", "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"484173859\"" ], "X-ExtLoop1": "1", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "qiming.yang@intel.com", "Cc": "junfeng.guo@intel.com,\n\tdev@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>", "Date": "Tue, 21 Sep 2021 21:19:58 +0800", "Message-Id": "<20210921132009.3461020-10-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20210921132009.3461020-1-qi.z.zhang@intel.com>", "References": "<20210921132009.3461020-1-qi.z.zhang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 09/20] net/ice/base: init flag redirect table\n for parser", "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": "Parse DDP section ICE_SID_RXPARSER_FLAG_REDIR into an array of\nice_flag_rd_item.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n drivers/net/ice/base/ice_flex_type.h | 2 ++\n drivers/net/ice/base/ice_flg_rd.c | 53 ++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_flg_rd.h | 16 +++++++++\n drivers/net/ice/base/ice_parser.c | 11 ++++++\n drivers/net/ice/base/ice_parser.h | 3 ++\n drivers/net/ice/base/meson.build | 1 +\n 6 files changed, 86 insertions(+)\n create mode 100644 drivers/net/ice/base/ice_flg_rd.c\n create mode 100644 drivers/net/ice/base/ice_flg_rd.h", "diff": "diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h\nindex 3f2038c931..59eeca0a30 100644\n--- a/drivers/net/ice/base/ice_flex_type.h\n+++ b/drivers/net/ice/base/ice_flex_type.h\n@@ -198,6 +198,8 @@ struct ice_buf_hdr {\n #define ICE_SID_CDID_KEY_BUILDER_PE\t87\n #define ICE_SID_CDID_REDIR_PE\t\t88\n \n+#define ICE_SID_RXPARSER_FLAG_REDIR\t97\n+\n /* Label Metadata section IDs */\n #define ICE_SID_LBL_FIRST\t\t0x80000010\n #define ICE_SID_LBL_RXPARSER_IMEM\t0x80000010\ndiff --git a/drivers/net/ice/base/ice_flg_rd.c b/drivers/net/ice/base/ice_flg_rd.c\nnew file mode 100644\nindex 0000000000..292916d9a8\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_flg_rd.c\n@@ -0,0 +1,53 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#include \"ice_common.h\"\n+#include \"ice_parser_util.h\"\n+\n+#define ICE_FLG_RD_TABLE_SIZE 64\n+\n+/**\n+ * ice_flg_rd_dump - dump a flag redirect item info\n+ * @ice_hw: pointer to the hardware structure\n+ * @item: flag redirect item to dump\n+ */\n+void ice_flg_rd_dump(struct ice_hw *hw, struct ice_flg_rd_item *item)\n+{\n+\tice_info(hw, \"index = %d\\n\", item->idx);\n+\tice_info(hw, \"expose = %d\\n\", item->expose);\n+\tice_info(hw, \"intr_flg_id = %d\\n\", item->intr_flg_id);\n+}\n+\n+/** The function parses a 8 bits Flag Redirect Table entry with below format:\n+ * BIT 0:\tExpose (rdi->expose)\n+ * BIT 1-6:\tInternal Flag ID (rdi->intr_flg_id)\n+ * BIT 7:\treserved\n+ */\n+static void _flg_rd_parse_item(struct ice_hw *hw, u16 idx, void *item,\n+\t\t\t void *data, int size)\n+{\n+\tstruct ice_flg_rd_item *rdi = (struct ice_flg_rd_item *)item;\n+\tu8 d8 = *(u8 *)data;\n+\n+\trdi->idx = idx;\n+\trdi->expose = (d8 & 0x1) != 0;\n+\trdi->intr_flg_id = (u8)((d8 >> 1) & 0x3f);\n+\n+\tif (hw->debug_mask & ICE_DBG_PARSER)\n+\t\tice_flg_rd_dump(hw, rdi);\n+}\n+\n+/**\n+ * ice_flg_rd_table_get - create a flag redirect table\n+ * @ice_hw: pointer to the hardware structure\n+ */\n+struct ice_flg_rd_item *ice_flg_rd_table_get(struct ice_hw *hw)\n+{\n+\treturn (struct ice_flg_rd_item *)\n+\t\tice_parser_create_table(hw, ICE_SID_RXPARSER_FLAG_REDIR,\n+\t\t\t\t\tsizeof(struct ice_flg_rd_item),\n+\t\t\t\t\tICE_FLG_RD_TABLE_SIZE,\n+\t\t\t\t\tice_parser_sect_item_get,\n+\t\t\t\t\t_flg_rd_parse_item, false);\n+}\ndiff --git a/drivers/net/ice/base/ice_flg_rd.h b/drivers/net/ice/base/ice_flg_rd.h\nnew file mode 100644\nindex 0000000000..e65350f18c\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_flg_rd.h\n@@ -0,0 +1,16 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#ifndef _ICE_FLG_RD_H_\n+#define _ICE_FLG_RD_H_\n+\n+struct ice_flg_rd_item {\n+\tu16 idx;\n+\tbool expose;\n+\tu8 intr_flg_id;\n+};\n+\n+void ice_flg_rd_dump(struct ice_hw *hw, struct ice_flg_rd_item *item);\n+struct ice_flg_rd_item *ice_flg_rd_table_get(struct ice_hw *hw);\n+#endif /* _ICE_FLG_RD_H_ */\ndiff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c\nindex 0ed7c5fe32..02a299aa04 100644\n--- a/drivers/net/ice/base/ice_parser.c\n+++ b/drivers/net/ice/base/ice_parser.c\n@@ -16,6 +16,7 @@\n #define ICE_SID_RXPARSER_MARKER_TYPE_ENTRY_SIZE\t\t24\n #define ICE_SID_RXPARSER_MARKER_GRP_ENTRY_SIZE\t\t8\n #define ICE_SID_RXPARSER_PROTO_GRP_ENTRY_SIZE\t\t24\n+#define ICE_SID_RXPARSER_FLAG_REDIR_ENTRY_SIZE\t\t1\n \n #define ICE_SEC_LBL_DATA_OFFSET\t\t\t\t2\n #define ICE_SID_LBL_ENTRY_SIZE\t\t\t\t66\n@@ -84,6 +85,9 @@ void *ice_parser_sect_item_get(u32 sect_type, void *section,\n \tcase ICE_SID_RXPARSER_PROTO_GRP:\n \t\tsize = ICE_SID_RXPARSER_PROTO_GRP_ENTRY_SIZE;\n \t\tbreak;\n+\tcase ICE_SID_RXPARSER_FLAG_REDIR:\n+\t\tsize = ICE_SID_RXPARSER_FLAG_REDIR_ENTRY_SIZE;\n+\t\tbreak;\n \tdefault:\n \t\treturn NULL;\n \t}\n@@ -235,6 +239,12 @@ enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr)\n \t\tgoto err;\n \t}\n \n+\tp->flg_rd_table = ice_flg_rd_table_get(hw);\n+\tif (!p->flg_rd_table) {\n+\t\tstatus = ICE_ERR_PARAM;\n+\t\tgoto err;\n+\t}\n+\n \t*psr = p;\n \treturn ICE_SUCCESS;\n err:\n@@ -259,6 +269,7 @@ void ice_parser_destroy(struct ice_parser *psr)\n \tice_free(psr->hw, psr->ptype_mk_tcam_table);\n \tice_free(psr->hw, psr->mk_grp_table);\n \tice_free(psr->hw, psr->proto_grp_table);\n+\tice_free(psr->hw, psr->flg_rd_table);\n \n \tice_free(psr->hw, psr);\n }\ndiff --git a/drivers/net/ice/base/ice_parser.h b/drivers/net/ice/base/ice_parser.h\nindex ac4139abd7..272eb28d5b 100644\n--- a/drivers/net/ice/base/ice_parser.h\n+++ b/drivers/net/ice/base/ice_parser.h\n@@ -12,6 +12,7 @@\n #include \"ice_ptype_mk.h\"\n #include \"ice_mk_grp.h\"\n #include \"ice_proto_grp.h\"\n+#include \"ice_flg_rd.h\"\n \n struct ice_parser {\n \tstruct ice_hw *hw; /* pointer to the hardware structure */\n@@ -38,6 +39,8 @@ struct ice_parser {\n \tstruct ice_mk_grp_item *mk_grp_table;\n \t/* load data from section ICE_SID_RXPARSER_PROTO_GRP */\n \tstruct ice_proto_grp_item *proto_grp_table;\n+\t/* load data from section ICE_SID_RXPARSER_FLAG_REDIR */\n+\tstruct ice_flg_rd_item *flg_rd_table;\n };\n \n enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr);\ndiff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build\nindex 8da942a2be..9ce508c272 100644\n--- a/drivers/net/ice/base/meson.build\n+++ b/drivers/net/ice/base/meson.build\n@@ -23,6 +23,7 @@ sources = [\n \t'ice_ptype_mk.c',\n \t'ice_mk_grp.c',\n \t'ice_proto_grp.c',\n+\t'ice_flg_rd.c',\n ]\n \n error_cflags = [\n", "prefixes": [ "v3", "09/20" ] }{ "id": 99361, "url": "