get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69677,
    "url": "https://patches.dpdk.org/api/patches/69677/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200503104755.19545-2-elibr@mellanox.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": "<20200503104755.19545-2-elibr@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200503104755.19545-2-elibr@mellanox.com",
    "date": "2020-05-03T10:47:54",
    "name": "[V2,1/2] net/mlx5: introduce a helper to set IP version match",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "bd0320966ee0bbeb1c2351c86ff9b85b30eedb7d",
    "submitter": {
        "id": 1383,
        "url": "https://patches.dpdk.org/api/people/1383/?format=api",
        "name": "Eli Britstein",
        "email": "elibr@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200503104755.19545-2-elibr@mellanox.com/mbox/",
    "series": [
        {
            "id": 9795,
            "url": "https://patches.dpdk.org/api/series/9795/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9795",
            "date": "2020-05-03T10:47:55",
            "name": "net/mlx5: optimize performance for IPv4/IPv6",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/9795/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/69677/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/69677/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 CC844A04AF;\n\tSun,  3 May 2020 12:48:22 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 708901D555;\n\tSun,  3 May 2020 12:48:08 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id F38A71D555\n for <dev@dpdk.org>; Sun,  3 May 2020 12:48:06 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n elibr@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 3 May 2020 13:48:01 +0300",
            "from dev-r-vrt-215.mtr.labs.mlnx. (dev-r-vrt-215.mtr.labs.mlnx\n [10.212.215.1])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 043Am1O9024289;\n Sun, 3 May 2020 13:48:01 +0300"
        ],
        "From": "Eli Britstein <elibr@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, orika@mellanox.com,\n viacheslavo@mellanox.com, Eli Britstein <elibr@mellanox.com>",
        "Date": "Sun,  3 May 2020 10:47:54 +0000",
        "Message-Id": "<20200503104755.19545-2-elibr@mellanox.com>",
        "X-Mailer": "git-send-email 2.14.5",
        "In-Reply-To": "<20200503104755.19545-1-elibr@mellanox.com>",
        "References": "<20200503104755.19545-1-elibr@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH V2 1/2] net/mlx5: introduce a helper to set IP\n\tversion match",
        "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": "Introduce a heler function to set the ip_version match.\n\nSigned-off-by: Eli Britstein <elibr@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 38 ++++++++++++++++++++++++++++----------\n 1 file changed, 28 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 18d9d302e3..174d86103b 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -5449,6 +5449,32 @@ flow_dv_check_valid_spec(void *match_mask, void *match_value)\n }\n #endif\n \n+/**\n+ * Add match of ip_version.\n+ *\n+ * @param[in] group\n+ *   Flow group.\n+ * @param[in] headers_v\n+ *   Values header pointer.\n+ * @param[in] headers_m\n+ *   Masks header pointer.\n+ * @param[in] ip_version\n+ *   The IP version to set.\n+ */\n+static inline void\n+flow_dv_set_match_ip_version(uint32_t group,\n+\t\t\t     void *headers_v,\n+\t\t\t     void *headers_m,\n+\t\t\t     uint8_t ip_version)\n+{\n+\tif (group == 0)\n+\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);\n+\telse\n+\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version,\n+\t\t\t ip_version);\n+\tMLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, ip_version);\n+}\n+\n /**\n  * Add Ethernet item to matcher and to the value.\n  *\n@@ -5635,11 +5661,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,\n \t\t\t\t\t outer_headers);\n \t\theaders_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);\n \t}\n-\tif (group == 0)\n-\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);\n-\telse\n-\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4);\n-\tMLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4);\n+\tflow_dv_set_match_ip_version(group, headers_v, headers_m, 4);\n \t/*\n \t * On outer header (which must contains L2), or inner header with L2,\n \t * set cvlan_tag mask bit to mark this packet as untagged.\n@@ -5737,11 +5759,7 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,\n \t\t\t\t\t outer_headers);\n \t\theaders_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);\n \t}\n-\tif (group == 0)\n-\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0xf);\n-\telse\n-\t\tMLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6);\n-\tMLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6);\n+\tflow_dv_set_match_ip_version(group, headers_v, headers_m, 6);\n \t/*\n \t * On outer header (which must contains L2), or inner header with L2,\n \t * set cvlan_tag mask bit to mark this packet as untagged.\n",
    "prefixes": [
        "V2",
        "1/2"
    ]
}