get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65491,
    "url": "http://patches.dpdk.org/api/patches/65491/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580736735-19472-7-git-send-email-bingz@mellanox.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": "<1580736735-19472-7-git-send-email-bingz@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1580736735-19472-7-git-send-email-bingz@mellanox.com",
    "date": "2020-02-03T13:32:15",
    "name": "[6/6] net/mlx5: do not save device flow matcher value",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "702df8785477afc8cc6eec4dbf16358110b4a139",
    "submitter": {
        "id": 1357,
        "url": "http://patches.dpdk.org/api/people/1357/?format=api",
        "name": "Bing Zhao",
        "email": "bingz@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1580736735-19472-7-git-send-email-bingz@mellanox.com/mbox/",
    "series": [
        {
            "id": 8396,
            "url": "http://patches.dpdk.org/api/series/8396/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8396",
            "date": "2020-02-03T13:32:09",
            "name": "net/mlx5: move to non-cached mode for flow rules",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8396/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65491/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65491/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 40937A052E;\n\tMon,  3 Feb 2020 14:33:29 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9B1481C0C1;\n\tMon,  3 Feb 2020 14:32:44 +0100 (CET)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id B3ED21C0BD\n for <dev@dpdk.org>; Mon,  3 Feb 2020 14:32:42 +0100 (CET)"
        ],
        "From": "Bing Zhao <bingz@mellanox.com>",
        "To": "orika@mellanox.com, viacheslavo@mellanox.com, rasland@mellanox.com,\n matan@mellanox.com",
        "Cc": "dev@dpdk.org",
        "Date": "Mon,  3 Feb 2020 15:32:15 +0200",
        "Message-Id": "<1580736735-19472-7-git-send-email-bingz@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1580736735-19472-1-git-send-email-bingz@mellanox.com>",
        "References": "<1580736735-19472-1-git-send-email-bingz@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 6/6] net/mlx5: do not save device flow matcher\n\tvalue",
        "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://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": "The matcher value is a series of bits with specified format that\ndefined by the hardware interface. PMD driver needs to translate the\npacket header into the matcher format and then used to create the\nflow with the lower layer driver.\nAnd this matcher value is only used when creating a flow, and when\ndestroying it, only the lower layer driver object related to the\nmatcher needs to be released. So there is no need to save such huge\nblock information of a device flow.\n\nSigned-off-by: Bing Zhao <bingz@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.h    |  2 --\n drivers/net/mlx5/mlx5_flow_dv.c | 28 ++++++++++++++++++++--------\n 2 files changed, 20 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex 5e517c3..af30438 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -513,8 +513,6 @@ struct mlx5_flow_dv {\n \tstruct mlx5_hrxq *hrxq; /**< Hash Rx queues. */\n \t/* Flow DV api: */\n \tstruct mlx5_flow_dv_matcher *matcher; /**< Cache to matcher. */\n-\tstruct mlx5_flow_dv_match_params value;\n-\t/**< Holds the value that the packet is compared to. */\n \tstruct mlx5_flow_dv_encap_decap_resource *encap_decap;\n \t/**< Pointer to encap/decap resource in cache. */\n \tstruct mlx5_flow_dv_modify_hdr_resource *modify_hdr;\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 2013082..111b01d 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -56,7 +56,7 @@\n \n #define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \\\n \t\t\t\t\t  sizeof(struct rte_flow_item_ipv4))\n-/* VLAN header definitions */\n+/* VLAN header definitions. */\n #define MLX5DV_FLOW_VLAN_PCP_SHIFT 13\n #define MLX5DV_FLOW_VLAN_PCP_MASK (0x7 << MLX5DV_FLOW_VLAN_PCP_SHIFT)\n #define MLX5DV_FLOW_VLAN_VID_MASK 0x0fff\n@@ -75,15 +75,23 @@\n \tuint32_t attr;\n };\n \n+/* Maximal number of global temporary device flow. */\n+#define MLX5DV_FLOW_HANDLE_MAX_NUM 8\n /* Global temporary device flow. */\n struct mlx5_flow sflow;\n /* Global subsidiary device flows actions' list. */\n struct {\n \tvoid *actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS];\n+\t/**< Action list. */\n \tuint64_t hash_fields;\n+\t/**< Verbs hash Rx queue hash fields. */\n+\tstruct mlx5_flow_dv_match_params value;\n+\t/**< Holds the value that the packet is compared to. */\n \tint actions_n;\n-\tuint8_t transfer; /**< 1 if the flow is E-Switch flow. */\n-} sflow_act[8];\n+\t/**< number of actions. */\n+\tuint8_t transfer;\n+\t/**< 1 if the flow is E-Switch flow. */\n+} sflow_act[MLX5DV_FLOW_HANDLE_MAX_NUM];\n \n /**\n  * Initialize flow attributes structure according to flow items' types.\n@@ -5127,7 +5135,6 @@ struct field_modify_info modify_tcp[] = {\n \t}\n \tdev_flow->ingress = attr->ingress;\n \tdev_flow->transfer = attr->transfer;\n-\tdv_handle->value.size = MLX5_ST_SZ_BYTES(fte_match_param);\n \t/* DV support already defined, compiler will happy for inbox driver. */\n \tdev_flow->dv_handle = dv_handle;\n \treturn dev_flow;\n@@ -7097,7 +7104,7 @@ struct field_modify_info modify_tcp[] = {\n \tunion mlx5_flow_tbl_key tbl_key;\n \tuint32_t modify_action_pos = UINT32_MAX;\n \tvoid *match_mask = matcher.mask.buf;\n-\tvoid *match_value = dev_flow->dv_handle->value.buf;\n+\tvoid *match_value = &sflow_act[sidx].value.buf;\n \tuint8_t next_protocol = 0xff;\n \tstruct rte_vlan_hdr vlan = { 0 };\n \tuint32_t table;\n@@ -7539,6 +7546,11 @@ struct field_modify_info modify_tcp[] = {\n \tsflow_act[sidx].actions_n = actions_n;\n \tsflow_act[sidx].transfer = dev_flow->transfer;\n \tdev_flow->dv_handle->action_flags = action_flags;\n+\t/* Matcher size is fixed right now. */\n+\tsflow_act[sidx].value.size = MLX5_ST_SZ_BYTES(fte_match_param);\n+\t/* Clear buffer in case of dirty content. */\n+\tmemset(&sflow_act[sidx].value.buf, 0,\n+\t       MLX5_ST_SZ_BYTES(fte_match_param));\n \tfor (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {\n \t\tint tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);\n \t\tint item_type = items->type;\n@@ -7723,7 +7735,7 @@ struct field_modify_info modify_tcp[] = {\n \t}\n #ifdef RTE_LIBRTE_MLX5_DEBUG\n \tMLX5_ASSERT(!flow_dv_check_valid_spec(matcher.mask.buf,\n-\t\t\t\t\t      dev_flow->dv.value.buf));\n+\t\t\t\t\t      sflow_act[sidx].value.buf));\n #endif\n \tdev_flow->dv_handle->layers = item_flags;\n \tif (action_flags & MLX5_FLOW_ACTION_RSS)\n@@ -7820,8 +7832,8 @@ struct field_modify_info modify_tcp[] = {\n \t\tmatcher_obj = dv_handle->matcher->matcher_object;\n \t\tdv_handle->flow =\n \t\t\tmlx5_glue->dv_create_flow(matcher_obj,\n-\t\t\t\t\t\t  (void *)&dv_handle->value,\n-\t\t\t\t\t\t  n, sflow_act[sidx].actions);\n+\t\t\t\t\t\t  &sflow_act[sidx].value, n,\n+\t\t\t\t\t\t  sflow_act[sidx].actions);\n \t\tif (!dv_handle->flow) {\n \t\t\trte_flow_error_set(error, errno,\n \t\t\t\t\t   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n",
    "prefixes": [
        "6/6"
    ]
}