get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 36842,
    "url": "https://patches.dpdk.org/api/patches/36842/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1522617562-25940-5-git-send-email-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1522617562-25940-5-git-send-email-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1522617562-25940-5-git-send-email-qi.z.zhang@intel.com",
    "date": "2018-04-01T21:19:22",
    "name": "[dpdk-dev,v2,4/4] ether: add packet modification aciton in flow API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "17abe2a9ac6087c44371f0d9a90cd86a91eba165",
    "submitter": {
        "id": 504,
        "url": "https://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1522617562-25940-5-git-send-email-qi.z.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/36842/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/36842/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9706C7CFA;\n\tMon,  2 Apr 2018 06:29:15 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 5A2AE7CD6\n\tfor <dev@dpdk.org>; Mon,  2 Apr 2018 06:29:14 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Apr 2018 21:29:14 -0700",
            "from dpdk27.sh.intel.com ([10.67.111.90])\n\tby fmsmga007.fm.intel.com with ESMTP; 01 Apr 2018 21:29:12 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,393,1517904000\"; d=\"scan'208\";a=\"28812579\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "adrien.mazarguil@6wind.com",
        "Cc": "dev@dpdk.org, declan.doherty@intel.com, sugesh.chandran@intel.com,\n\tmichael.j.glynn@intel.com, yu.y.liu@intel.com,\n\tkonstantin.ananyev@intel.com, bruce.richardson@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Sun,  1 Apr 2018 17:19:22 -0400",
        "Message-Id": "<1522617562-25940-5-git-send-email-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1522617562-25940-1-git-send-email-qi.z.zhang@intel.com>",
        "References": "<1522279780-34842-1-git-send-email-qi.z.zhang@intel.com>\n\t<1522617562-25940-1-git-send-email-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/4] ether: add packet modification aciton in\n\tflow API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add new actions that be used to modify packet content with\ngeneric semantic:\n\nRTE_FLOW_ACTION_TYPE_FIELD_UPDATE:\n\t- update specific field of packet\nRTE_FLWO_ACTION_TYPE_FIELD_INCREMENT:\n\t- increament specific field of packet\nRTE_FLWO_ACTION_TYPE_FIELD_DECREMENT:\n\t- decreament specific field of packet\nRTE_FLWO_ACTION_TYPE_FIELD_COPY:\n\t- copy data from one field to another in packet.\n\nAll action use struct rte_flow_item parameter to match the pattern\nthat going to be modified, if no pattern match, the action just be\nskipped. These action are non-terminating action. they will not\nimpact the fate of the packets.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n doc/guides/prog_guide/rte_flow.rst | 89 ++++++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_flow.h        | 57 ++++++++++++++++++++++++\n 2 files changed, 146 insertions(+)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex aa5c818..6628964 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1508,6 +1508,95 @@ Representor.\n    | ``port_id``  | identification of the destination |\n    +--------------+-----------------------------------+\n \n+Action: ``FILED_UPDATE``\n+^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Update specific field of the packet.\n+\n+- Non-terminating by default.\n+\n+.. _table_rte_flow_action_field_update:\n+\n+.. table:: FIELD_UPDATE\n+\n+   +-----------+---------------------------------------------------------+\n+   | Field     | Value                                                   |\n+   +===========+=========================================================+\n+   | ``item``  | item->type: specify the pattern to modify               |\n+   |           | item->spec: specify the new value to update             |\n+   |           | item->mask: specify which part of the pattern to update |\n+   |           | item->last: ignored                                     |\n+   +-----------+---------------------------------------------------------+\n+   | ``layer`` | 0 means outermost matched pattern,                      |\n+   |           | 1 means next-to-outermost and so on ...                 |\n+   +-----------+---------------------------------------------------------+\n+\n+Action: ``FILED_INCREMENT``\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Increment 1 on specific field of the packet.\n+\n+- Non-terminating by default.\n+\n+.. _table_rte_flow_action_field_update:\n+\n+.. table:: FIELD_INCREMENT\n+\n+   +-----------+---------------------------------------------------------+\n+   | Field     | Value                                                   |\n+   +===========+=========================================================+\n+   | ``item``  | item->type: specify the pattern to modify               |\n+   |           | item->spec: ignored                                     |\n+   |           | item->mask: specify which part of the pattern to update |\n+   |           | item->last: ignored                                     |\n+   +-----------+---------------------------------------------------------+\n+   | ``layer`` | 0 means outermost matched pattern,                      |\n+   |           | 1 means next-to-outermost and so on ...                 |\n+   +-----------+---------------------------------------------------------+\n+\n+Action: ``FIELD_DECREMENT``\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Decrement 1 on specific field of the packet.\n+\n+Paramenter is same is FIELD_INCREMENT.\n+\n+-Non-terminating by default.\n+\n+ACTION: ``FIELD_COPY``\n+^^^^^^^^^^^^^^^^^^^^^^\n+\n+Copy data of one field to another of the packet.\n+\n+-Non-terminating by default.\n+\n+.. _table_rte_flow_action_field_copy:\n+\n+.. table:: FIELD_COPY\n+\n+   +-----------------+-----------------------------------------------------------------+\n+   | Field           | Value                                                           |\n+   +=================+=================================================================+\n+   | ``src_item``    | src_item->type: match the pattern that data will be copy from   |\n+   |                 | src_item->spec: ignored                                         |\n+   |                 | src_item->mask: specify which part of the pattern to copy       |\n+   |                 | src_item->last: ignored                                         |\n+   +-----------------+-----------------------------------------------------------------+\n+   | ``src_layer``   | layer of src_item                                               |\n+   |                 | 0 means outermost matched pattern,                              |\n+   |                 | 1 means next-to-outermost and so on ...                         |\n+   +-----------------+-----------------------------------------------------------------+\n+   | ``dst_item``    | dst_item->type: match the pattern that data will be copy to     |\n+   |                 | dst_item->spec: ignored                                         |\n+   |                 | dst_item->mask: specify which part of the pattern to be update  |\n+   |                 |                 it must match src_item->mask.                   |\n+   |                 | dst_item->last: ignored                                         |\n+   +-----------------+-----------------------------------------------------------------+\n+   | ``dst_layer``   | layer of dst_item                                               |\n+   |                 | 0 means outermost matched pattern,                              |\n+   |                 | 1 means next-to-outermost and so on ...                         |\n+   +-----------------+-----------------------------------------------------------------+\n+\n Negative types\n ~~~~~~~~~~~~~~\n \ndiff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h\nindex a8ec780..d81ac4c 100644\n--- a/lib/librte_ether/rte_flow.h\n+++ b/lib/librte_ether/rte_flow.h\n@@ -1178,6 +1178,34 @@ enum rte_flow_action_type {\n \t * See struct rte_flow_action_port.\n \t */\n \tRTE_FLOW_ACTION_TYPE_PORT,\n+\n+\t/**\n+\t * Update specific field of the packet.\n+\t *\n+\t * See struct rte_flow_item_field_update.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_FILED_UPDATE,\n+\n+\t/**\n+\t * Increment specific field of the packet.\n+\t *\n+\t * See struct rte_flow_item_field_update.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_FIELD_INCREMENT,\n+\n+\t/**\n+\t * Decrement specific field of the packet.\n+\t *\n+\t * See struct rte_flow_item_field_update.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_FIELD_DECREMENT,\n+\n+\t/**\n+\t * Copy data of one field to another of the packet.\n+\t *\n+\t * See struct rte_flow_item_type_field_copy.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_FIELD_COPY,\n };\n \n /**\n@@ -1327,6 +1355,35 @@ struct rte_flow_action_port {\n \tuint16_t port_id; /**< identification of the forward destination. */\n };\n \n+/** RTE_FLOW_ACTION_TYPE_FIELD_UPDATE\n+ *  RTE_FLOW_ACTION_TYPE_FIELD_INCREMENT\n+ *  RTE_FLOW_ACTION_TYPE_FIELD_DECREMENT\n+ *\n+ * Update specific field of the packet.\n+ *\n+ * Typical usage: update mac/ip address.\n+ */\n+struct rte_flow_action_field_update {\n+\tconst struct rte_flow_item *item; /**< specify the data to modify. */\n+\tuint8_t layer;\n+\t/**< 0 means outermost matched pattern, 1 means next-to-outermost... */\n+};\n+\n+/** RTE_FLOW_ACTION_TYPE_FIELD_COPY\n+ *\n+ * Copy data from one field to another of the packet.\n+ *\n+ * Typical usage: TTL copy-in / copy-out\n+ */\n+struct rte_flow_action_field_copy {\n+\tconst struct rte_flow_item *src_item; /**< Specify the data copy from */\n+\tuint8_t src_layer;\n+\t/**< 0 means outermost matched pattern, 1 means next-to-outermost... */\n+\tconst struct rte_flow_item *dst_item; /**< Specify the data copy to */\n+\tuint8_t dst_layer;\n+\t/**< 0 means outermost matched pattern, 1 means next-to-outermost... */\n+};\n+\n /**\n  * Definition of a single action.\n  *\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "4/4"
    ]
}