Show a patch.

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

{
    "id": 74566,
    "url": "https://patches.dpdk.org/api/patches/74566/",
    "web_url": "https://patches.dpdk.org/patch/74566/",
    "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": "<1595332641-6144-1-git-send-email-michaelba@mellanox.com>",
    "date": "2020-07-21T11:57:21",
    "name": "net/mlx5: fix enum misusing for steering registers",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "56b4fe7a33e4a6e1decb82c5b8f11e23b03c4d58",
    "submitter": {
        "id": 1582,
        "url": "https://patches.dpdk.org/api/people/1582/",
        "name": "Michael Baum",
        "email": "michaelba@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/74566/mbox/",
    "series": [
        {
            "id": 11203,
            "url": "https://patches.dpdk.org/api/series/11203/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11203",
            "date": "2020-07-21T11:57:21",
            "name": "net/mlx5: fix enum misusing for steering registers",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11203/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74566/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74566/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 enum misusing for steering\n\tregisters",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Michael Baum <michaelba@mellanox.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1FF03A0526;\n\tTue, 21 Jul 2020 13:57:33 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6E44F1BFFF;\n\tTue, 21 Jul 2020 13:57:31 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id DCC911BFE9\n for <dev@dpdk.org>; Tue, 21 Jul 2020 13:57:29 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com) with SMTP; 21 Jul 2020 14:57:28 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n [10.210.16.112])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06LBvSr7007282;\n Tue, 21 Jul 2020 14:57:28 +0300"
        ],
        "To": "dev@dpdk.org",
        "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": "Tue, 21 Jul 2020 11:57:21 +0000",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "matan@mellanox.com, viacheslavo@mellanox.com, stable@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595332641-6144-1-git-send-email-michaelba@mellanox.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "The mlx5_flow_action_copy_mreg structure contains a field called src\ntype enum modify_reg, similarly the mlx5_rte_flow_item_tag field\ncontains a field called id type enum modify_reg.\nThe enum modify_reg variable represents different registers in the\nsystem and it also has a field called REG_NONE whose value is 0 which\nmeans that the register does not exist.\n\nThe flow_mreg_add_copy_action function sets a variable of struct\nmlx5_flow_action_copy_mreg type, and initializes the src field to be 0.\nsimilarly the flow_create_split_metadata function sets a variable of\nstruct mlx5_rte_flow_item_tag type and initializes the id field to be 0.\nIn both functions, they initialize a enum modify_reg type variable with\nan int type value while modify_reg has an appropriate field for that\nvalue (REG_NONE).\n\nReplace assigning 0 with REG_NONE in both functions.\n\nFixes: dd3c774f6ffb (\"net/mlx5: add metadata register copy table\")\nFixes: 71e254bc0294 (\"net/mlx5: split Rx flows to provide metadata copy\")\nCc: stable@dpdk.org\n\nSigned-off-by: Michael Baum <michaelba@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex b56bee4..aba8f41 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -3011,7 +3011,7 @@ struct mlx5_flow_tunnel_info {\n \t};\n \tstruct mlx5_flow_action_copy_mreg cp_mreg = {\n \t\t.dst = REG_B,\n-\t\t.src = 0,\n+\t\t.src = REG_NONE,\n \t};\n \tstruct rte_flow_action_jump jump = {\n \t\t.group = MLX5_FLOW_MREG_ACT_TABLE_GROUP,\n@@ -4067,7 +4067,7 @@ struct mlx5_flow_tunnel_info {\n \t\t/* Internal PMD action to set register. */\n \t\tstruct mlx5_rte_flow_item_tag q_tag_spec = {\n \t\t\t.data = qrss_id,\n-\t\t\t.id = 0,\n+\t\t\t.id = REG_NONE,\n \t\t};\n \t\tstruct rte_flow_item q_items[] = {\n \t\t\t{\n",
    "prefixes": []
}