get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50054,
    "url": "https://patches.dpdk.org/api/patches/50054/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1548429450-27678-1-git-send-email-viacheslavo@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": "<1548429450-27678-1-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1548429450-27678-1-git-send-email-viacheslavo@mellanox.com",
    "date": "2019-01-25T15:17:30",
    "name": "net/mlx5: fix ETH and VLAN items for E-Switch flows",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "c2411df5725fb0b4c10f75ba25aad53bca02d1c6",
    "submitter": {
        "id": 1102,
        "url": "https://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 6624,
        "url": "https://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1548429450-27678-1-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 3327,
            "url": "https://patches.dpdk.org/api/series/3327/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3327",
            "date": "2019-01-25T15:17:30",
            "name": "net/mlx5: fix ETH and VLAN items for E-Switch flows",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/3327/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/50054/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/50054/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 4CD7B293B;\n\tFri, 25 Jan 2019 16:17:36 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id ED6FF288C\n\tfor <dev@dpdk.org>; Fri, 25 Jan 2019 16:17:33 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tviacheslavo@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 25 Jan 2019 17:17:32 +0200",
            "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 x0PFHW0Q018133;\n\tFri, 25 Jan 2019 17:17:32 +0200"
        ],
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "shahafs@mellanox.com",
        "Date": "Fri, 25 Jan 2019 15:17:30 +0000",
        "Message-Id": "<1548429450-27678-1-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: fix ETH and VLAN items for E-Switch\n\tflows",
        "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 patch fixes two issues for E-Switch Flows\n\n- RTE_FLOW_ITEM_TYPE_ETH and RTE_FLOW_ITEM_TYPE_VLAN with NULL\nin spec field caused the asserts in debug version and segfault\nin release, fixed, now empty items are allowed and treated in\ncorrectl way\n\n- empty RTE_FLOW_ITEM_TYPE_VLAN now sets the ethernet type to\nETH_P_802.1Q, in previous version empty VLAN item was ignored\n\nFixes: 3d14ad9be30e (\"net/mlx5: support ethernet type for tunnels on E-Switch\")\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow_tcf.c | 19 ++++++++++++++-----\n 1 file changed, 14 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c\nindex b8204df..916d3a0 100644\n--- a/drivers/net/mlx5/mlx5_flow_tcf.c\n+++ b/drivers/net/mlx5/mlx5_flow_tcf.c\n@@ -2052,7 +2052,8 @@ struct pedit_parser {\n \t\t\t\t\t mask.eth,\n \t\t\t\t\t \"no support for partial mask on\"\n \t\t\t\t\t \" \\\"type\\\" field\");\n-\t\t\tassert(items->spec);\n+\t\t\tif (!items->spec)\n+\t\t\t\tbreak;\n \t\t\tspec.eth = items->spec;\n \t\t\tif (mask.eth->type &&\n \t\t\t    (item_flags & MLX5_FLOW_LAYER_TUNNEL) &&\n@@ -2123,7 +2124,8 @@ struct pedit_parser {\n \t\t\t\t\t \"outer eth_type conflict,\"\n \t\t\t\t\t \" must be 802.1Q\");\n \t\t\touter_etype = RTE_BE16(ETH_P_8021Q);\n-\t\t\tassert(items->spec);\n+\t\t\tif (!items->spec)\n+\t\t\t\tbreak;\n \t\t\tspec.vlan = items->spec;\n \t\t\tif (mask.vlan->inner_type &&\n \t\t\t    vlan_etype != RTE_BE16(ETH_P_ALL) &&\n@@ -2520,10 +2522,14 @@ struct pedit_parser {\n \t\tcase RTE_FLOW_ITEM_TYPE_PORT_ID:\n \t\t\tbreak;\n \t\tcase RTE_FLOW_ITEM_TYPE_ETH:\n+\t\t\tif (!items->spec)\n+\t\t\t\tbreak;\n \t\t\tsize += SZ_NLATTR_DATA_OF(ETHER_ADDR_LEN) * 4;\n \t\t\t\t/* dst/src MAC addr and mask. */\n \t\t\tbreak;\n \t\tcase RTE_FLOW_ITEM_TYPE_VLAN:\n+\t\t\tif (!items->spec)\n+\t\t\t\tbreak;\n \t\t\tsize +=\tSZ_NLATTR_TYPE_OF(uint16_t) +\n \t\t\t\t/* VLAN Ether type. */\n \t\t\t\tSZ_NLATTR_TYPE_OF(uint8_t) + /* VLAN prio. */\n@@ -3319,6 +3325,8 @@ struct pedit_parser {\n \t\t\tassert(mask.eth);\n \t\t\tif (mask.eth == &flow_tcf_mask_empty.eth)\n \t\t\t\tbreak;\n+\t\t\tif (!items->spec)\n+\t\t\t\tbreak;\n \t\t\tspec.eth = items->spec;\n \t\t\tif (mask.eth->type) {\n \t\t\t\tif (item_flags & MLX5_FLOW_LAYER_TUNNEL)\n@@ -3363,12 +3371,13 @@ struct pedit_parser {\n \t\t\t\t sizeof(flow_tcf_mask_supported.vlan),\n \t\t\t\t error);\n \t\t\tassert(mask.vlan);\n-\t\t\tif (mask.vlan == &flow_tcf_mask_empty.vlan)\n-\t\t\t\tbreak;\n-\t\t\tspec.vlan = items->spec;\n \t\t\tassert(outer_etype == RTE_BE16(ETH_P_ALL) ||\n \t\t\t       outer_etype == RTE_BE16(ETH_P_8021Q));\n \t\t\touter_etype = RTE_BE16(ETH_P_8021Q);\n+\t\t\tif (mask.vlan == &flow_tcf_mask_empty.vlan)\n+\t\t\t\tbreak;\n+\t\t\tassert(items->spec);\n+\t\t\tspec.vlan = items->spec;\n \t\t\tif (mask.vlan->inner_type)\n \t\t\t\tvlan_etype = spec.vlan->inner_type;\n \t\t\tif (mask.vlan->tci & RTE_BE16(0xe000))\n",
    "prefixes": []
}