get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/99359/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 99359,
    "url": "http://patches.dpdk.org/api/patches/99359/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210921132009.3461020-8-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-8-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210921132009.3461020-8-qi.z.zhang@intel.com",
    "date": "2021-09-21T13:19:56",
    "name": "[v3,07/20] net/ice/base: init marker group table for parser",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b1eb9e7bf7feb5ff61ae7b4b825e26774316adb5",
    "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-8-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/99359/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/99359/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 7B423A0C4C;\n\tTue, 21 Sep 2021 15:18:06 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B515F4113E;\n\tTue, 21 Sep 2021 15:17:21 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 77A4C41147\n for <dev@dpdk.org>; Tue, 21 Sep 2021 15:17:16 +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:15 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga008.jf.intel.com with ESMTP; 21 Sep 2021 06:17:14 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10113\"; a=\"202847446\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"202847446\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"484173847\""
        ],
        "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:56 +0800",
        "Message-Id": "<20210921132009.3461020-8-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 07/20] net/ice/base: init marker group 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_MARKER_GRP into an array of\nice_mk_grp_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_mk_grp.c | 55 +++++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_mk_grp.h | 15 +++++++++\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 5 files changed, 85 insertions(+)\n create mode 100644 drivers/net/ice/base/ice_mk_grp.c\n create mode 100644 drivers/net/ice/base/ice_mk_grp.h",
    "diff": "diff --git a/drivers/net/ice/base/ice_mk_grp.c b/drivers/net/ice/base/ice_mk_grp.c\nnew file mode 100644\nindex 0000000000..4e9ab5c13a\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_mk_grp.c\n@@ -0,0 +1,55 @@\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_MK_GRP_TABLE_SIZE 128\n+#define ICE_MK_COUNT_PER_GRP 8\n+\n+/**\n+ * ice_mk_grp_dump - dump an marker group item info\n+ * @ice_hw: pointer to the hardware structure\n+ * @item: marker group item to dump\n+ */\n+void ice_mk_grp_dump(struct ice_hw *hw, struct ice_mk_grp_item *item)\n+{\n+\tint i;\n+\n+\tice_info(hw, \"index = %d\\n\", item->idx);\n+\tice_info(hw, \"markers: \");\n+\tfor (i = 0; i < ICE_MK_COUNT_PER_GRP; i++)\n+\t\tice_info(hw, \"%d \", item->markers[i]);\n+\tice_info(hw, \"\\n\");\n+}\n+\n+static void _mk_grp_parse_item(struct ice_hw *hw, u16 idx, void *item,\n+\t\t\t       void *data, int size)\n+{\n+\tstruct ice_mk_grp_item *grp = (struct ice_mk_grp_item *)item;\n+\tu8 *buf = (u8 *)data;\n+\tint i;\n+\n+\tgrp->idx = idx;\n+\n+\tfor (i = 0; i < ICE_MK_COUNT_PER_GRP; i++)\n+\t\tgrp->markers[i] = buf[i];\n+\n+\tif (hw->debug_mask & ICE_DBG_PARSER)\n+\t\tice_mk_grp_dump(hw, grp);\n+}\n+\n+/**\n+ * ice_mk_grp_table_get - create a marker group table\n+ * @ice_hw: pointer to the hardware structure\n+ */\n+struct ice_mk_grp_item *ice_mk_grp_table_get(struct ice_hw *hw)\n+{\n+\treturn (struct ice_mk_grp_item *)\n+\t\tice_parser_create_table(hw, ICE_SID_RXPARSER_MARKER_GRP,\n+\t\t\t\t\tsizeof(struct ice_mk_grp_item),\n+\t\t\t\t\tICE_MK_GRP_TABLE_SIZE,\n+\t\t\t\t\tice_parser_sect_item_get,\n+\t\t\t\t\t_mk_grp_parse_item, false);\n+}\ndiff --git a/drivers/net/ice/base/ice_mk_grp.h b/drivers/net/ice/base/ice_mk_grp.h\nnew file mode 100644\nindex 0000000000..04d11b49c2\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_mk_grp.h\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#ifndef _ICE_MK_GRP_H_\n+#define _ICE_MK_GRP_H_\n+\n+struct ice_mk_grp_item {\n+\tint idx;\n+\tu8 markers[8];\n+};\n+\n+void ice_mk_grp_dump(struct ice_hw *hw, struct ice_mk_grp_item *item);\n+struct ice_mk_grp_item *ice_mk_grp_table_get(struct ice_hw *hw);\n+#endif /* _ICE_MK_GRP_H_ */\ndiff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c\nindex e7b79453a8..142da462ee 100644\n--- a/drivers/net/ice/base/ice_parser.c\n+++ b/drivers/net/ice/base/ice_parser.c\n@@ -14,6 +14,7 @@\n #define ICE_SID_RXPARSER_NOMATCH_SPILL_ENTRY_SIZE\t13\n #define ICE_SID_RXPARSER_BOOST_TCAM_ENTRY_SIZE\t\t88\n #define ICE_SID_RXPARSER_MARKER_TYPE_ENTRY_SIZE\t\t24\n+#define ICE_SID_RXPARSER_MARKER_GRP_ENTRY_SIZE\t\t8\n \n #define ICE_SEC_LBL_DATA_OFFSET\t\t\t\t2\n #define ICE_SID_LBL_ENTRY_SIZE\t\t\t\t66\n@@ -76,6 +77,9 @@ void *ice_parser_sect_item_get(u32 sect_type, void *section,\n \tcase ICE_SID_RXPARSER_MARKER_PTYPE:\n \t\tsize = ICE_SID_RXPARSER_MARKER_TYPE_ENTRY_SIZE;\n \t\tbreak;\n+\tcase ICE_SID_RXPARSER_MARKER_GRP:\n+\t\tsize = ICE_SID_RXPARSER_MARKER_GRP_ENTRY_SIZE;\n+\t\tbreak;\n \tdefault:\n \t\treturn NULL;\n \t}\n@@ -215,6 +219,12 @@ enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr)\n \t\tgoto err;\n \t}\n \n+\tp->mk_grp_table = ice_mk_grp_table_get(hw);\n+\tif (!p->mk_grp_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@@ -237,6 +247,7 @@ void ice_parser_destroy(struct ice_parser *psr)\n \tice_free(psr->hw, psr->bst_tcam_table);\n \tice_free(psr->hw, psr->bst_lbl_table);\n \tice_free(psr->hw, psr->ptype_mk_tcam_table);\n+\tice_free(psr->hw, psr->mk_grp_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 40b7b823c3..b390eecb2b 100644\n--- a/drivers/net/ice/base/ice_parser.h\n+++ b/drivers/net/ice/base/ice_parser.h\n@@ -10,6 +10,7 @@\n #include \"ice_pg_cam.h\"\n #include \"ice_bst_tcam.h\"\n #include \"ice_ptype_mk.h\"\n+#include \"ice_mk_grp.h\"\n \n struct ice_parser {\n \tstruct ice_hw *hw; /* pointer to the hardware structure */\n@@ -32,6 +33,8 @@ struct ice_parser {\n \tstruct ice_lbl_item *bst_lbl_table;\n \t/* load data from section ICE_SID_RXPARSER_MARKER_PTYPE */\n \tstruct ice_ptype_mk_tcam_item *ptype_mk_tcam_table;\n+\t/* load data from section ICE_SID_RXPARSER_MARKER_GRP */\n+\tstruct ice_mk_grp_item *mk_grp_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 78e3aee4e5..df021b12dd 100644\n--- a/drivers/net/ice/base/meson.build\n+++ b/drivers/net/ice/base/meson.build\n@@ -21,6 +21,7 @@ sources = [\n \t'ice_pg_cam.c',\n \t'ice_bst_tcam.c',\n \t'ice_ptype_mk.c',\n+\t'ice_mk_grp.c',\n ]\n \n error_cflags = [\n",
    "prefixes": [
        "v3",
        "07/20"
    ]
}