Show a patch.

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

{
    "id": 74477,
    "url": "https://patches.dpdk.org/api/patches/74477/",
    "web_url": "https://patches.dpdk.org/patch/74477/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1595235822-114874-1-git-send-email-bingz@mellanox.com>",
    "date": "2020-07-20T09:03:42",
    "name": "net/mlx5: fix the compatibility with MISC4",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b1743b663e6c1ce6745a3e10d307f1463a4db7a5",
    "submitter": {
        "id": 1357,
        "url": "https://patches.dpdk.org/api/people/1357/",
        "name": "Bing Zhao",
        "email": "bingz@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74477/mbox/",
    "series": [
        {
            "id": 11163,
            "url": "https://patches.dpdk.org/api/series/11163/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11163",
            "date": "2020-07-20T09:03:42",
            "name": "net/mlx5: fix the compatibility with MISC4",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11163/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74477/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/74477/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: fix the compatibility with MISC4",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Bing Zhao <bingz@mellanox.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 73EE5A0540;\n\tMon, 20 Jul 2020 11:03:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2BEEB2B9C;\n\tMon, 20 Jul 2020 11:03:55 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 853382AA6\n for <dev@dpdk.org>; Mon, 20 Jul 2020 11:03:53 +0200 (CEST)"
        ],
        "To": "orika@mellanox.com,\n\tviacheslavo@mellanox.com",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Mon, 20 Jul 2020 17:03:42 +0800",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "rasland@mellanox.com,\n\tmatan@mellanox.com,\n\tdev@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595235822-114874-1-git-send-email-bingz@mellanox.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "When eCPRI offloading is introduced, the support for misc parameters\n4 of flow table entry (FTE) match set is needed. The structure of\n\"mlx5_ifc_fte_match_param_bits\" is extended with\n\"mlx5_ifc_fte_match_set_misc4_bits\" at the end of it. The total size\nof the FTE match set will be changed into 384 bytes from 320 bytes.\nLow level user space driver (rdma-core) will have the validation of\nthe length of FTE match set. In the old release that no MISC4\nsupported in the rdma-core, the validation will fail, and this will\nbreak the backward compatibility, even if the MISC4 is not used in\nmost cases.\nIn order to make new mlx5 PMD work well with old rdma-core, the\nlength adjustment needs to be done. When creating a flow, the lengths\nof the matcher and value are both set to 320 without MISC4. There is\nno need to change the structure definition, all bytes of the MISC4\nwill be discarded if it is not needed. Or else, like in eCPRI\nmatching, the lengths will be adjusted to 384 for matcher creation\nand value matching.\n\nFixes: afa8556c873c (\"net/mlx5: add flow translation of eCPRI header\")\n\nSigned-off-by: Bing Zhao <bingz@mellanox.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow_dv.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex ee66a44..778a766 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -5765,7 +5765,15 @@ struct field_modify_info modify_tcp[] = {\n \tdev_flow = &((struct mlx5_flow *)priv->inter_flows)[priv->flow_idx++];\n \tdev_flow->handle = dev_handle;\n \tdev_flow->handle_idx = handle_idx;\n-\tdev_flow->dv.value.size = MLX5_ST_SZ_BYTES(fte_match_param);\n+\t/*\n+\t * In some old rdma-core releases, before continuing, a check of the\n+\t * length of matching parameter will be done at first. It needs to use\n+\t * the length without misc4 param. If the flow has misc4 support, then\n+\t * the length needs to be adjusted accordingly. Each param member is\n+\t * aligned with a 64B boundary naturally.\n+\t */\n+\tdev_flow->dv.value.size = MLX5_ST_SZ_BYTES(fte_match_param) -\n+\t\t\t\t  MLX5_ST_SZ_BYTES(fte_match_set_misc4);\n \t/*\n \t * The matching value needs to be cleared to 0 before using. In the\n \t * past, it will be automatically cleared when using rte_*alloc\n@@ -7986,7 +7994,8 @@ struct field_modify_info modify_tcp[] = {\n \tuint64_t priority = attr->priority;\n \tstruct mlx5_flow_dv_matcher matcher = {\n \t\t.mask = {\n-\t\t\t.size = sizeof(matcher.mask.buf),\n+\t\t\t.size = sizeof(matcher.mask.buf) -\n+\t\t\t\tMLX5_ST_SZ_BYTES(fte_match_set_misc4),\n \t\t},\n \t};\n \tint actions_n = 0;\n@@ -8678,6 +8687,10 @@ struct field_modify_info modify_tcp[] = {\n \t\t\t\t\t\tNULL,\n \t\t\t\t\t\t\"cannot create eCPRI parser\");\n \t\t\t}\n+\t\t\t/* Adjust the length matcher and device flow value. */\n+\t\t\tmatcher.mask.size = MLX5_ST_SZ_BYTES(fte_match_param);\n+\t\t\tdev_flow->dv.value.size =\n+\t\t\t\t\tMLX5_ST_SZ_BYTES(fte_match_param);\n \t\t\tflow_dv_translate_item_ecpri(dev, match_mask,\n \t\t\t\t\t\t     match_value, items);\n \t\t\t/* No other protocol should follow eCPRI layer. */\n",
    "prefixes": []
}