get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62825,
    "url": "https://patches.dpdk.org/api/patches/62825/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1573468925-24415-1-git-send-email-matan@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": "<1573468925-24415-1-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1573468925-24415-1-git-send-email-matan@mellanox.com",
    "date": "2019-11-11T10:42:05",
    "name": "ethdev: fix last item detection on RSS flow expand",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "67539e0c078cbe7cc5bf88ee907d9dd6dce37ddb",
    "submitter": {
        "id": 796,
        "url": "https://patches.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1573468925-24415-1-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 7381,
            "url": "https://patches.dpdk.org/api/series/7381/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7381",
            "date": "2019-11-11T10:42:05",
            "name": "ethdev: fix last item detection on RSS flow expand",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/7381/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/62825/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/62825/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BF136A04B7;\n\tMon, 11 Nov 2019 11:42:31 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 85E6BCF3;\n\tMon, 11 Nov 2019 11:42:31 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 9C360235\n for <dev@dpdk.org>; Mon, 11 Nov 2019 11:42:29 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 11 Nov 2019 12:42:24 +0200",
            "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 xABAgOt6024005;\n Mon, 11 Nov 2019 12:42:24 +0200"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "Ori Kam <orika@mellanox.com>, jackmin@mellanox.com",
        "Date": "Mon, 11 Nov 2019 10:42:05 +0000",
        "Message-Id": "<1573468925-24415-1-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] ethdev: fix last item detection on RSS flow\n\texpand",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "There is a rte_flow API which expands a RSS flow pattern to multipile\npatterns according to the RSS hash types in the RSS action\nconfiguration.\n\nAa part of the expansion, detection of the last item of the flow uses\nthe \"next proto\" field of the last configured item in the pattern list.\nWrongly, the mask of this field was not considered in order to validate\nthe field.\n\nIgnore \"next proto\" fields when their corresponded masks invalidate them.\n\nFixes: ec84aa45f17b (\"ethdev: fix expand RSS flows\")\nCc: jackmin@mellanox.com\n\nSigned-off-by: Matan Azrad <matan@mellanox.com>\n---\n lib/librte_ethdev/rte_flow.c | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)",
    "diff": "diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex 8ec9c90..d7f29e5 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -218,12 +218,21 @@ struct rte_flow_desc_data {\n {\n \tenum rte_flow_item_type ret = RTE_FLOW_ITEM_TYPE_VOID;\n \tuint16_t ether_type = 0;\n+\tuint16_t ether_type_m;\n \tuint8_t ip_next_proto = 0;\n+\tuint8_t ip_next_proto_m;\n \n \tif (item == NULL || item->spec == NULL)\n \t\treturn ret;\n \tswitch (item->type) {\n \tcase RTE_FLOW_ITEM_TYPE_ETH:\n+\t\tif (item->mask)\n+\t\t\tether_type_m = ((const struct rte_flow_item_eth *)\n+\t\t\t\t\t\t(item->mask))->type;\n+\t\telse\n+\t\t\tether_type_m = rte_flow_item_eth_mask.type;\n+\t\tif (ether_type_m != RTE_BE16(0xFFFF))\n+\t\t\tbreak;\n \t\tether_type = ((const struct rte_flow_item_eth *)\n \t\t\t\t(item->spec))->type;\n \t\tif (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV4)\n@@ -234,6 +243,13 @@ struct rte_flow_desc_data {\n \t\t\tret = RTE_FLOW_ITEM_TYPE_VLAN;\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_VLAN:\n+\t\tif (item->mask)\n+\t\t\tether_type_m = ((const struct rte_flow_item_vlan *)\n+\t\t\t\t\t\t(item->mask))->inner_type;\n+\t\telse\n+\t\t\tether_type_m = rte_flow_item_vlan_mask.inner_type;\n+\t\tif (ether_type_m != RTE_BE16(0xFFFF))\n+\t\t\tbreak;\n \t\tether_type = ((const struct rte_flow_item_vlan *)\n \t\t\t\t(item->spec))->inner_type;\n \t\tif (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV4)\n@@ -244,6 +260,14 @@ struct rte_flow_desc_data {\n \t\t\tret = RTE_FLOW_ITEM_TYPE_VLAN;\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_IPV4:\n+\t\tif (item->mask)\n+\t\t\tip_next_proto_m = ((const struct rte_flow_item_ipv4 *)\n+\t\t\t\t\t(item->mask))->hdr.next_proto_id;\n+\t\telse\n+\t\t\tip_next_proto_m =\n+\t\t\t\trte_flow_item_ipv4_mask.hdr.next_proto_id;\n+\t\tif (ip_next_proto_m != 0xFF)\n+\t\t\tbreak;\n \t\tip_next_proto = ((const struct rte_flow_item_ipv4 *)\n \t\t\t\t(item->spec))->hdr.next_proto_id;\n \t\tif (ip_next_proto == IPPROTO_UDP)\n@@ -256,6 +280,14 @@ struct rte_flow_desc_data {\n \t\t\tret = RTE_FLOW_ITEM_TYPE_IPV6;\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_IPV6:\n+\t\tif (item->mask)\n+\t\t\tip_next_proto_m = ((const struct rte_flow_item_ipv6 *)\n+\t\t\t\t\t\t(item->mask))->hdr.proto;\n+\t\telse\n+\t\t\tip_next_proto_m =\n+\t\t\t\trte_flow_item_ipv6_mask.hdr.proto;\n+\t\tif (ip_next_proto_m != 0xFF)\n+\t\t\tbreak;\n \t\tip_next_proto = ((const struct rte_flow_item_ipv6 *)\n \t\t\t\t(item->spec))->hdr.proto;\n \t\tif (ip_next_proto == IPPROTO_UDP)\n",
    "prefixes": []
}