get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59706,
    "url": "http://patches.dpdk.org/api/patches/59706/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1569398015-6027-10-git-send-email-viacheslavo@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": "<1569398015-6027-10-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1569398015-6027-10-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-09-25T07:53:32",
    "name": "[09/12] net/mlx5: update source and destination vport translations",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "cbdf84a288a97e51b6d9d5e48e12b2f3db7c8b45",
    "submitter": {
        "id": 1102,
        "url": "http://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@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/1569398015-6027-10-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 6519,
            "url": "http://patches.dpdk.org/api/series/6519/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6519",
            "date": "2019-09-25T07:53:23",
            "name": "net/mlx5: add bonding configuration support",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6519/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/59706/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/59706/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 2A1201BE93;\n\tWed, 25 Sep 2019 09:54:19 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 7F3B61BDFD\n\tfor <dev@dpdk.org>; Wed, 25 Sep 2019 09:54:09 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tviacheslavo@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 25 Sep 2019 10:54:06 +0300",
            "from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx\n\t[10.210.17.40])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x8P7s6K0030331;\n\tWed, 25 Sep 2019 10:54:06 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n\tby pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id\n\tx8P7s6L4006875; Wed, 25 Sep 2019 07:54:06 GMT",
            "(from viacheslavo@localhost)\n\tby pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id x8P7s6sA006874; \n\tWed, 25 Sep 2019 07:54:06 GMT"
        ],
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n\tviacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com",
        "Date": "Wed, 25 Sep 2019 07:53:32 +0000",
        "Message-Id": "<1569398015-6027-10-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1569398015-6027-1-git-send-email-viacheslavo@mellanox.com>",
        "References": "<1569398015-6027-1-git-send-email-viacheslavo@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 09/12] net/mlx5: update source and destination\n\tvport translations",
        "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": "There new kernel/rdma_core [1] supports matching on metadata\nregister instead of vport field to provide operations over\nVF LAG bonding configurations. This patch provides correct\ntranslations for flow matchers and destination port actions\nif united E-Switch (for VF LAG) is configured and/or new vport\nmatching mode is engaged.\n\n[1] http://patchwork.ozlabs.org/cover/1122170/\n    \"Mellanox, mlx5 vport metadata matching\"\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 38 +++++++++++++++++++++++++++++++++++---\n drivers/net/mlx5/mlx5_prm.h     |  9 ++++++++-\n 2 files changed, 43 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex ad4ff5a..2a7e3ed 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -4617,6 +4617,29 @@ struct field_modify_info modify_tcp[] = {\n }\n \n /**\n+ * Add vport metadata Reg C0 item to matcher\n+ *\n+ * @param[in, out] matcher\n+ *   Flow matcher.\n+ * @param[in, out] key\n+ *   Flow matcher value.\n+ * @param[in] reg\n+ *   Flow pattern to translate.\n+ */\n+static void\n+flow_dv_translate_item_meta_vport(void *matcher, void *key,\n+\t\t\t\t  uint32_t value, uint32_t mask)\n+{\n+\tvoid *misc2_m =\n+\t\tMLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_2);\n+\tvoid *misc2_v =\n+\t\tMLX5_ADDR_OF(fte_match_param, key, misc_parameters_2);\n+\n+\tMLX5_SET(fte_match_set_misc2, misc2_m, metadata_reg_c_0, mask);\n+\tMLX5_SET(fte_match_set_misc2, misc2_v, metadata_reg_c_0, value);\n+}\n+\n+/**\n  * Add source vport match to the specified matcher.\n  *\n  * @param[in, out] matcher\n@@ -4668,8 +4691,14 @@ struct field_modify_info modify_tcp[] = {\n \tpriv = mlx5_port_to_eswitch_info(id);\n \tif (!priv)\n \t\treturn -rte_errno;\n-\tflow_dv_translate_item_source_vport(matcher, key,\n-\t\t\t\t\t    priv->vport_id, mask);\n+\t/* Translate to vport field or to metadata, depending on mode. */\n+\tif (priv->vport_meta_mask)\n+\t\tflow_dv_translate_item_meta_vport(matcher, key,\n+\t\t\t\t\t\t  priv->vport_meta_tag,\n+\t\t\t\t\t\t  priv->vport_meta_mask);\n+\telse\n+\t\tflow_dv_translate_item_source_vport(matcher, key,\n+\t\t\t\t\t\t    priv->vport_id, mask);\n \treturn 0;\n }\n \n@@ -5113,7 +5142,10 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ACTION,\n \t\t\t\t\t  NULL,\n \t\t\t\t\t  \"No eswitch info was found for port\");\n-\t*dst_port_id = priv->vport_id;\n+\tif (priv->vport_meta_mask)\n+\t\t*dst_port_id = priv->ibv_port;\n+\telse\n+\t\t*dst_port_id = priv->vport_id;\n \treturn 0;\n }\n \ndiff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h\nindex e5afc1c..3765df0 100644\n--- a/drivers/net/mlx5/mlx5_prm.h\n+++ b/drivers/net/mlx5/mlx5_prm.h\n@@ -614,7 +614,14 @@ struct mlx5_ifc_fte_match_set_misc2_bits {\n \tstruct mlx5_ifc_fte_match_mpls_bits inner_first_mpls;\n \tstruct mlx5_ifc_fte_match_mpls_bits outer_first_mpls_over_gre;\n \tstruct mlx5_ifc_fte_match_mpls_bits outer_first_mpls_over_udp;\n-\tu8 reserved_at_80[0x100];\n+\tu8 metadata_reg_c_7[0x20];\n+\tu8 metadata_reg_c_6[0x20];\n+\tu8 metadata_reg_c_5[0x20];\n+\tu8 metadata_reg_c_4[0x20];\n+\tu8 metadata_reg_c_3[0x20];\n+\tu8 metadata_reg_c_2[0x20];\n+\tu8 metadata_reg_c_1[0x20];\n+\tu8 metadata_reg_c_0[0x20];\n \tu8 metadata_reg_a[0x20];\n \tu8 reserved_at_1a0[0x60];\n };\n",
    "prefixes": [
        "09/12"
    ]
}