get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61290,
    "url": "http://patches.dpdk.org/api/patches/61290/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191016083610.203486-1-motih@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": "<20191016083610.203486-1-motih@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191016083610.203486-1-motih@mellanox.com",
    "date": "2019-10-16T08:36:09",
    "name": "[1/2] net/mlx5: query HCA for enabled FLEX parser protos",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "57e77bfb4f4071221c6d5b653ed2cc36fb4e7faa",
    "submitter": {
        "id": 748,
        "url": "http://patches.dpdk.org/api/people/748/?format=api",
        "name": "Moti Haimovsky",
        "email": "motih@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/20191016083610.203486-1-motih@mellanox.com/mbox/",
    "series": [
        {
            "id": 6877,
            "url": "http://patches.dpdk.org/api/series/6877/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6877",
            "date": "2019-10-16T08:36:09",
            "name": "[1/2] net/mlx5: query HCA for enabled FLEX parser protos",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6877/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/61290/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/61290/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 AD3F61E904;\n\tWed, 16 Oct 2019 10:36:23 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n\tby dpdk.org (Postfix) with ESMTP id 0BDB21E8E2\n\tfor <dev@dpdk.org>; Wed, 16 Oct 2019 10:36:23 +0200 (CEST)"
        ],
        "From": "Moti Haimovsky <motih@mellanox.com>",
        "To": "viacheslavo@mellanox.com,\n\trasland@mellanox.com",
        "Cc": "dev@dpdk.org",
        "Date": "Wed, 16 Oct 2019 11:36:09 +0300",
        "Message-Id": "<20191016083610.203486-1-motih@mellanox.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "Subject": "[dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser\n\tprotos",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This commit add querying the HCA which FLEX protocols are already\nenabled.\n\nSigned-off-by: Moti Haimovsky <motih@mellanox.com>\n---\n drivers/net/mlx5/mlx5.h           |  1 +\n drivers/net/mlx5/mlx5_devx_cmds.c |  2 ++\n drivers/net/mlx5/mlx5_prm.h       | 12 ++++++++++++\n 3 files changed, 15 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex baf945c..024a403 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -184,6 +184,7 @@ struct mlx5_hca_attr {\n \tuint32_t tunnel_lro_vxlan:1;\n \tuint32_t lro_max_msg_sz_mode:2;\n \tuint32_t lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];\n+\tuint32_t flex_parser_protocols;\n };\n \n /* Flow list . */\ndiff --git a/drivers/net/mlx5/mlx5_devx_cmds.c b/drivers/net/mlx5/mlx5_devx_cmds.c\nindex acfe1de..01e4094 100644\n--- a/drivers/net/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/net/mlx5/mlx5_devx_cmds.c\n@@ -330,6 +330,8 @@ struct mlx5_devx_obj *\n \tattr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,\n \t\t\t\t\t  eth_net_offloads);\n \tattr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);\n+\tattr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,\n+\t\t\t\t\t       flex_parser_protocols);\n \tif (!attr->eth_net_offloads)\n \t\treturn 0;\n \ndiff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h\nindex 3765df0..e429792 100644\n--- a/drivers/net/mlx5/mlx5_prm.h\n+++ b/drivers/net/mlx5/mlx5_prm.h\n@@ -856,6 +856,18 @@ enum {\n \tMLX5_INLINE_MODE_INNER_TCP_UDP,\n };\n \n+/* HCA bit masks indicating which Flex parser protocols are already enabled. */\n+#define MLX5_HCA_FLEX_IPV4_OVER_VXLAN_ENABLED (1UL << 0)\n+#define MLX5_HCA_FLEX_IPV6_OVER_VXLAN_ENABLED (1UL << 1)\n+#define MLX5_HCA_FLEX_IPV6_OVER_IP_ENABLED (1UL << 2)\n+#define MLX5_HCA_FLEX_GENEVE_ENABLED (1UL << 3)\n+#define MLX5_HCA_FLEX_CW_MPLS_OVER_GRE_ENABLED (1UL << 4)\n+#define MLX5_HCA_FLEX_CW_MPLS_OVER_UDP_ENABLED (1UL << 5)\n+#define MLX5_HCA_FLEX_P_BIT_VXLAN_GPE_ENABLED (1UL << 6)\n+#define MLX5_HCA_FLEX_VXLAN_GPE_ENABLED (1UL << 7)\n+#define MLX5_HCA_FLEX_ICMP_ENABLED (1UL << 8)\n+#define MLX5_HCA_FLEX_ICMPV6_ENABLED (1UL << 9)\n+\n struct mlx5_ifc_cmd_hca_cap_bits {\n \tu8 reserved_at_0[0x30];\n \tu8 vhca_id[0x10];\n",
    "prefixes": [
        "1/2"
    ]
}