get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99353,
    "url": "http://patches.dpdk.org/api/patches/99353/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210921132009.3461020-2-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-2-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210921132009.3461020-2-qi.z.zhang@intel.com",
    "date": "2021-09-21T13:19:50",
    "name": "[v3,01/20] net/ice/base: add parser create and destroy skeleton",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "32af9cdf4a7e3fffff6b5b2ba71486cbf3060d77",
    "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-2-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/99353/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/99353/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 524E5A0C4C;\n\tTue, 21 Sep 2021 15:17:13 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E797341122;\n\tTue, 21 Sep 2021 15:17:08 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id ACD174003C\n for <dev@dpdk.org>; Tue, 21 Sep 2021 15:17:06 +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:05 -0700",
            "from dpdk51.sh.intel.com ([10.67.111.142])\n by orsmga008.jf.intel.com with ESMTP; 21 Sep 2021 06:17:04 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10113\"; a=\"202847417\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"202847417\"",
            "E=Sophos;i=\"5.85,311,1624345200\"; d=\"scan'208\";a=\"484173819\""
        ],
        "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:50 +0800",
        "Message-Id": "<20210921132009.3461020-2-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 01/20] net/ice/base: add parser create and\n destroy skeleton",
        "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": "Add new parser module which can parse a packet in binary\nand generate information like ptype, protocol/offset pairs\nand flags which can be used to feed the FXP profile creation\ndirectly.\n\nThe patch added skeleton of the parser instance create and\ndestroy APIs:\nice_parser_create\nice_parser_destroy\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_common.h    |  1 +\n drivers/net/ice/base/ice_flex_pipe.c |  2 +-\n drivers/net/ice/base/ice_flex_pipe.h |  5 ++++\n drivers/net/ice/base/ice_parser.c    | 34 ++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_parser.h    | 14 ++++++++++++\n drivers/net/ice/base/meson.build     |  1 +\n 6 files changed, 56 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/ice/base/ice_parser.c\n create mode 100644 drivers/net/ice/base/ice_parser.h",
    "diff": "diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h\nindex 1d8882c279..a3cbf4fb05 100644\n--- a/drivers/net/ice/base/ice_common.h\n+++ b/drivers/net/ice/base/ice_common.h\n@@ -8,6 +8,7 @@\n #include \"ice_type.h\"\n #include \"ice_nvm.h\"\n #include \"ice_flex_pipe.h\"\n+#include \"ice_parser.h\"\n #include \"ice_switch.h\"\n #include \"ice_fdir.h\"\n \ndiff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 3631ddba2c..703c3e0416 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -284,7 +284,7 @@ ice_pkg_enum_section(struct ice_seg *ice_seg, struct ice_pkg_enum *state,\n  * indicates a base offset of 10, and the index for the entry is 2, then\n  * section handler function should set the offset to 10 + 2 = 12.\n  */\n-static void *\n+void *\n ice_pkg_enum_entry(struct ice_seg *ice_seg, struct ice_pkg_enum *state,\n \t\t   u32 sect_type, u32 *offset,\n \t\t   void *(*handler)(u32 sect_type, void *section,\ndiff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h\nindex b690be75fc..045a77c607 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.h\n+++ b/drivers/net/ice/base/ice_flex_pipe.h\n@@ -94,4 +94,9 @@ void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld);\n enum ice_status\n ice_set_key(u8 *key, u16 size, u8 *val, u8 *upd, u8 *dc, u8 *nm, u16 off,\n \t    u16 len);\n+void *\n+ice_pkg_enum_entry(struct ice_seg *ice_seg, struct ice_pkg_enum *state,\n+\t\t   u32 sect_type, u32 *offset,\n+\t\t   void *(*handler)(u32 sect_type, void *section,\n+\t\t\t\t    u32 index, u32 *offset));\n #endif /* _ICE_FLEX_PIPE_H_ */\ndiff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c\nnew file mode 100644\nindex 0000000000..c08decaf0d\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_parser.c\n@@ -0,0 +1,34 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#include \"ice_common.h\"\n+\n+/**\n+ * ice_parser_create - create a parser instance\n+ * @hw: pointer to the hardware structure\n+ * @psr: output parameter for a new parser instance be created\n+ */\n+enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr)\n+{\n+\tstruct ice_parser *p;\n+\n+\tp = (struct ice_parser *)ice_malloc(hw, sizeof(struct ice_parser));\n+\n+\tif (!p)\n+\t\treturn ICE_ERR_NO_MEMORY;\n+\n+\tp->hw = hw;\n+\n+\t*psr = p;\n+\treturn ICE_SUCCESS;\n+}\n+\n+/**\n+ * ice_parser_destroy - destroy a parser instance\n+ * @psr: pointer to a parser instance\n+ */\n+void ice_parser_destroy(struct ice_parser *psr)\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\nnew file mode 100644\nindex 0000000000..5964bf4e49\n--- /dev/null\n+++ b/drivers/net/ice/base/ice_parser.h\n@@ -0,0 +1,14 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2001-2021 Intel Corporation\n+ */\n+\n+#ifndef _ICE_PARSER_H_\n+#define _ICE_PARSER_H_\n+\n+struct ice_parser {\n+\tstruct ice_hw *hw; /* pointer to the hardware structure */\n+};\n+\n+enum ice_status ice_parser_create(struct ice_hw *hw, struct ice_parser **psr);\n+void ice_parser_destroy(struct ice_parser *psr);\n+#endif /* _ICE_PARSER_H_ */\ndiff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build\nindex be9713dfa1..2b0af54a5c 100644\n--- a/drivers/net/ice/base/meson.build\n+++ b/drivers/net/ice/base/meson.build\n@@ -15,6 +15,7 @@ sources = [\n         'ice_acl_ctrl.c',\n         'ice_vlan_mode.c',\n         'ice_ptp_hw.c',\n+\t'ice_parser.c',\n ]\n \n error_cflags = [\n",
    "prefixes": [
        "v3",
        "01/20"
    ]
}