get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99358,
    "url": "http://patches.dpdk.org/api/patches/99358/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210921132009.3461020-7-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-7-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210921132009.3461020-7-qi.z.zhang@intel.com",
    "date": "2021-09-21T13:19:55",
    "name": "[v3,06/20] net/ice/base: init ptype marker TCAM table for parser",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "186c8a4e29347c6d58c0cbb47cf69cad097a5ce8",
    "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-7-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/99358/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/99358/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 B25CBA0C4C;\n\tTue, 21 Sep 2021 15:17:59 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8DACA4115C;\n\tTue, 21 Sep 2021 15:17:20 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id E418A41141\n for <dev@dpdk.org>; Tue, 21 Sep 2021 15:17:14 +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:14 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga008.jf.intel.com with ESMTP; 21 Sep 2021 06:17:13 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10113\"; a=\"202847442\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"202847442\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"484173841\""
        ],
        "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:55 +0800",
        "Message-Id": "<20210921132009.3461020-7-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 06/20] net/ice/base: init ptype marker TCAM\n table 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_PTYPE into an array of\nice_ptype_mk_tcam_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_parser.c   | 11 ++++++\n drivers/net/ice/base/ice_parser.h   |  3 ++\n drivers/net/ice/base/ice_ptype_mk.c | 54 +++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_ptype_mk.h | 18 ++++++++++\n drivers/net/ice/base/meson.build    |  1 +\n 5 files changed, 87 insertions(+)\n create mode 100644 drivers/net/ice/base/ice_ptype_mk.c\n create mode 100644 drivers/net/ice/base/ice_ptype_mk.h",
    "diff": "diff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c\nindex 594f802800..e7b79453a8 100644\n--- a/drivers/net/ice/base/ice_parser.c\n+++ b/drivers/net/ice/base/ice_parser.c\n@@ -13,6 +13,7 @@\n #define ICE_SID_RXPARSER_NOMATCH_CAM_ENTRY_SIZE\t\t12\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 \n #define ICE_SEC_LBL_DATA_OFFSET\t\t\t\t2\n #define ICE_SID_LBL_ENTRY_SIZE\t\t\t\t66\n@@ -72,6 +73,9 @@ void *ice_parser_sect_item_get(u32 sect_type, void *section,\n \t\tdata_off = ICE_SEC_LBL_DATA_OFFSET;\n \t\tsize = ICE_SID_LBL_ENTRY_SIZE;\n \t\tbreak;\n+\tcase ICE_SID_RXPARSER_MARKER_PTYPE:\n+\t\tsize = ICE_SID_RXPARSER_MARKER_TYPE_ENTRY_SIZE;\n+\t\tbreak;\n \tdefault:\n \t\treturn NULL;\n \t}\n@@ -205,6 +209,12 @@ enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr)\n \t\tgoto err;\n \t}\n \n+\tp->ptype_mk_tcam_table = ice_ptype_mk_tcam_table_get(hw);\n+\tif (!p->ptype_mk_tcam_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@@ -226,6 +236,7 @@ void ice_parser_destroy(struct ice_parser *psr)\n \tice_free(psr->hw, psr->pg_nm_sp_cam_table);\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 \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 319648970a..40b7b823c3 100644\n--- a/drivers/net/ice/base/ice_parser.h\n+++ b/drivers/net/ice/base/ice_parser.h\n@@ -9,6 +9,7 @@\n #include \"ice_imem.h\"\n #include \"ice_pg_cam.h\"\n #include \"ice_bst_tcam.h\"\n+#include \"ice_ptype_mk.h\"\n \n struct ice_parser {\n \tstruct ice_hw *hw; /* pointer to the hardware structure */\n@@ -29,6 +30,8 @@ struct ice_parser {\n \tstruct ice_bst_tcam_item *bst_tcam_table;\n \t/* load data from section ICE_SID_LBL_RXPARSER_TMEM */\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 };\n \n enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr);\ndiff --git a/drivers/net/ice/base/ice_ptype_mk.c b/drivers/net/ice/base/ice_ptype_mk.c\nnew file mode 100644\nindex 0000000000..33623dcfbc\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_ptype_mk.c\n@@ -0,0 +1,54 @@\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_PTYPE_MK_TCAM_TABLE_SIZE 1024\n+\n+/**\n+ * ice_ptype_mk_tcam_dump - dump an ptype marker tcam info_\n+ * @ice_hw: pointer to the hardware structure\n+ * @item: ptype marker tcam to dump\n+ */\n+void ice_ptype_mk_tcam_dump(struct ice_hw *hw,\n+\t\t\t    struct ice_ptype_mk_tcam_item *item)\n+{\n+\tint i;\n+\n+\tice_info(hw, \"address = %d\\n\", item->address);\n+\tice_info(hw, \"ptype = %d\\n\", item->ptype);\n+\tice_info(hw, \"key    :\");\n+\tfor (i = 0; i < 10; i++)\n+\t\tice_info(hw, \"%02x \", item->key[i]);\n+\tice_info(hw, \"\\n\");\n+\tice_info(hw, \"key_inv:\");\n+\tfor (i = 0; i < 10; i++)\n+\t\tice_info(hw, \"%02x \", item->key_inv[i]);\n+\tice_info(hw, \"\\n\");\n+}\n+\n+static void _parse_ptype_mk_tcam_item(struct ice_hw *hw, u16 idx, void *item,\n+\t\t\t\t      void *data, int size)\n+{\n+\tice_parse_item_dflt(hw, idx, item, data, size);\n+\n+\tif (hw->debug_mask & ICE_DBG_PARSER)\n+\t\tice_ptype_mk_tcam_dump(hw,\n+\t\t\t\t       (struct ice_ptype_mk_tcam_item *)item);\n+}\n+\n+/**\n+ * ice_ptype_mk_tcam_table_get - create a ptype marker tcam table\n+ * @ice_hw: pointer to the hardware structure\n+ */\n+struct ice_ptype_mk_tcam_item *ice_ptype_mk_tcam_table_get(struct ice_hw *hw)\n+{\n+\treturn (struct ice_ptype_mk_tcam_item *)\n+\t\tice_parser_create_table(hw, ICE_SID_RXPARSER_MARKER_PTYPE,\n+\t\t\t\t\tsizeof(struct ice_ptype_mk_tcam_item),\n+\t\t\t\t\tICE_PTYPE_MK_TCAM_TABLE_SIZE,\n+\t\t\t\t\tice_parser_sect_item_get,\n+\t\t\t\t\t_parse_ptype_mk_tcam_item, true);\n+}\ndiff --git a/drivers/net/ice/base/ice_ptype_mk.h b/drivers/net/ice/base/ice_ptype_mk.h\nnew file mode 100644\nindex 0000000000..c93cd8f0ad\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_ptype_mk.h\n@@ -0,0 +1,18 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#ifndef _ICE_PTYPE_MK_H_\n+#define _ICE_PTYPE_MK_H_\n+\n+struct ice_ptype_mk_tcam_item {\n+\tu16 address;\n+\tu16 ptype;\n+\tu8 key[10];\n+\tu8 key_inv[10];\n+};\n+\n+void ice_ptype_mk_tcam_dump(struct ice_hw *hw,\n+\t\t\t    struct ice_ptype_mk_tcam_item *item);\n+struct ice_ptype_mk_tcam_item *ice_ptype_mk_tcam_table_get(struct ice_hw *hw);\n+#endif /* _ICE_PTYPE_MK_H_ */\ndiff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build\nindex 105ae411d3..78e3aee4e5 100644\n--- a/drivers/net/ice/base/meson.build\n+++ b/drivers/net/ice/base/meson.build\n@@ -20,6 +20,7 @@ sources = [\n \t'ice_metainit.c',\n \t'ice_pg_cam.c',\n \t'ice_bst_tcam.c',\n+\t'ice_ptype_mk.c',\n ]\n \n error_cflags = [\n",
    "prefixes": [
        "v3",
        "06/20"
    ]
}