get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41683,
    "url": "http://patches.dpdk.org/api/patches/41683/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/7bc5b0becafaeaf59c3e97a5ecdc955689a41bed.1530111623.git.nelio.laranjeiro@6wind.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": "<7bc5b0becafaeaf59c3e97a5ecdc955689a41bed.1530111623.git.nelio.laranjeiro@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/7bc5b0becafaeaf59c3e97a5ecdc955689a41bed.1530111623.git.nelio.laranjeiro@6wind.com",
    "date": "2018-06-27T15:07:41",
    "name": "[v2,09/20] net/mlx5: add flow IPv6 item",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5ee1c3fde0da0927506005fe48ef6434436c18c7",
    "submitter": {
        "id": 243,
        "url": "http://patches.dpdk.org/api/people/243/?format=api",
        "name": "Nélio Laranjeiro",
        "email": "nelio.laranjeiro@6wind.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/7bc5b0becafaeaf59c3e97a5ecdc955689a41bed.1530111623.git.nelio.laranjeiro@6wind.com/mbox/",
    "series": [
        {
            "id": 268,
            "url": "http://patches.dpdk.org/api/series/268/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=268",
            "date": "2018-06-27T15:07:32",
            "name": "net/mlx5: flow rework",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/268/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41683/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41683/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 344AA1BFD9;\n\tWed, 27 Jun 2018 17:07:55 +0200 (CEST)",
            "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 0DF321BFAF\n\tfor <dev@dpdk.org>; Wed, 27 Jun 2018 17:07:43 +0200 (CEST)",
            "by mail-wm0-f68.google.com with SMTP id e69-v6so3320740wme.2\n\tfor <dev@dpdk.org>; Wed, 27 Jun 2018 08:07:43 -0700 (PDT)",
            "from laranjeiro-vm.dev.6wind.com\n\t(host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])\n\tby smtp.gmail.com with ESMTPSA id\n\tk17-v6sm4872513wrp.19.2018.06.27.08.07.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 27 Jun 2018 08:07:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=GFq7GfnL0me8dT1JBjk6Uu7HN9fJE+EdqLCBFZDmsak=;\n\tb=OaC8iOnri//XQ8pU2oFYs/7kz0cqyqirKpErs4lmV7of1IhQaIAE4IxdYKj2JM/6z1\n\tgcyuWUN4u8aBs25hGZBdTqEnnW3UcFr7aGM77jb3gY6wNGSHnezDNsXNN5XZM4DI3Wyn\n\tB6xSwnp0cZbUVM/O+2vAamCPFYuSUb88BE5mx6i5nto0/dT7HaJn9EP4fv8m4C/8zpWy\n\tqeCCAeMUCKtZljhlD0Nmohw3FRthxgefIZh75HSfjkbFKt5G0wSJm84TGmzMmYSIhKPy\n\tXLhX5ZRPzv/JN9xVzXa/0l2elz7kj+Z4Nt/jTj98fEwfIhjB+QeEeVcicbbzxQQ2UxH3\n\tD/zA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=GFq7GfnL0me8dT1JBjk6Uu7HN9fJE+EdqLCBFZDmsak=;\n\tb=U/6jikUpiK+rLR9SPhyaUK2cdVyr0RA4+mVCG6/74MXUWn93IOpYIqgp28W3axmt8L\n\tv5IA+GhDNcBBhS4n35KeLaxYg/EZRfpFGuGbG6eWmFTToJGy3h4YzLNCIb6iK440w0Ug\n\tBgpmGgfvJMrZoWXFeSJ/ySrIIcJonMnbKXjF2Bi0E84fb5TBrBJl79xWYhtGEmzWxPyg\n\tQmUIHu47h5/0x7YBmRbeu4NuP9xAunVfKmuIVMOfhJvPVfAGca4Pv8Ed3ZQNwigAajrA\n\t3ASBm3TAUaMjOYV76QDlYqmnsB19A6449Mz36NiS7nsFXrdoh+8YHYx4T9GyWHMmqeYn\n\tokPg==",
        "X-Gm-Message-State": "APt69E2Ac584hVEZvhxY8RuUpU7CHRSUF6E4FbOOLew+Kg09Hr8yj6TV\n\t+1Kr7g6YyNMBR6zLLEHfal38hiHqvw==",
        "X-Google-Smtp-Source": "AAOMgpf91yj0T/kcsbc2Um2DoB9BTtawMHAX9Xkb/1b1l3Vut/YlTsMrlVS06lXqJms4sSG4Nz/LMQ==",
        "X-Received": "by 2002:a1c:944e:: with SMTP id\n\tw75-v6mr3048781wmd.105.1530112062574; \n\tWed, 27 Jun 2018 08:07:42 -0700 (PDT)",
        "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "To": "dev@dpdk.org, Adrien Mazarguil <adrien.mazarguil@6wind.com>,\n\tYongseok Koh <yskoh@mellanox.com>",
        "Date": "Wed, 27 Jun 2018 17:07:41 +0200",
        "Message-Id": "<7bc5b0becafaeaf59c3e97a5ecdc955689a41bed.1530111623.git.nelio.laranjeiro@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<cover.1530111623.git.nelio.laranjeiro@6wind.com>",
        "References": "<cover.1527506071.git.nelio.laranjeiro@6wind.com>\n\t<cover.1530111623.git.nelio.laranjeiro@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2 09/20] net/mlx5: add flow IPv6 item",
        "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": "Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 108 +++++++++++++++++++++++++++++++++++\n 1 file changed, 108 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex 8e7a0bb5a..4e018400a 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -620,6 +620,111 @@ mlx5_flow_item_ipv4(const struct rte_flow_item *item, struct rte_flow *flow,\n \treturn size;\n }\n \n+/**\n+ * Validate IPv6 layer and possibly create the Verbs specification.\n+ *\n+ * @param item[in]\n+ *   Item specification.\n+ * @param flow[in, out]\n+ *   Pointer to flow structure.\n+ * @param flow_size[in]\n+ *   Size in bytes of the available space for to store the flow information.\n+ * @param error\n+ *   Pointer to error structure.\n+ *\n+ * @return\n+ *   size in bytes necessary for the conversion, a negative errno value\n+ *   otherwise and rte_errno is set.\n+ */\n+static int\n+mlx5_flow_item_ipv6(const struct rte_flow_item *item, struct rte_flow *flow,\n+\t\t    const size_t flow_size, struct rte_flow_error *error)\n+{\n+\tconst struct rte_flow_item_ipv6 *spec = item->spec;\n+\tconst struct rte_flow_item_ipv6 *mask = item->mask;\n+\tconst struct rte_flow_item_ipv6 nic_mask = {\n+\t\t.hdr = {\n+\t\t\t.src_addr =\n+\t\t\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\"\n+\t\t\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t\t\t.dst_addr =\n+\t\t\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\"\n+\t\t\t\t\"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\",\n+\t\t\t.vtc_flow = RTE_BE32(0xffffffff),\n+\t\t\t.proto = 0xff,\n+\t\t\t.hop_limits = 0xff,\n+\t\t},\n+\t};\n+\tunsigned int size = sizeof(struct ibv_flow_spec_ipv6);\n+\tstruct ibv_flow_spec_ipv6 ipv6 = {\n+\t\t.type = IBV_FLOW_SPEC_IPV6,\n+\t\t.size = size,\n+\t};\n+\tint ret;\n+\n+\tif (flow->layers & MLX5_FLOW_LAYER_OUTER_L3)\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t  item,\n+\t\t\t\t\t  \"multiple L3 layers not supported\");\n+\telse if (flow->layers & MLX5_FLOW_LAYER_OUTER_L4)\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t  item,\n+\t\t\t\t\t  \"L3 cannot follow an L4 layer.\");\n+\tif (!mask)\n+\t\tmask = &rte_flow_item_ipv6_mask;\n+\tret = mlx5_flow_item_validate(item, (const uint8_t *)mask,\n+\t\t\t\t      (const uint8_t *)&nic_mask,\n+\t\t\t\t      sizeof(struct rte_flow_item_ipv6), error);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tflow->layers |= MLX5_FLOW_LAYER_OUTER_L3_IPV6;\n+\tif (size > flow_size)\n+\t\treturn size;\n+\tif (spec) {\n+\t\tunsigned int i;\n+\t\tuint32_t vtc_flow_val;\n+\t\tuint32_t vtc_flow_mask;\n+\n+\t\tmemcpy(&ipv6.val.src_ip, spec->hdr.src_addr,\n+\t\t       RTE_DIM(ipv6.val.src_ip));\n+\t\tmemcpy(&ipv6.val.dst_ip, spec->hdr.dst_addr,\n+\t\t       RTE_DIM(ipv6.val.dst_ip));\n+\t\tmemcpy(&ipv6.mask.src_ip, mask->hdr.src_addr,\n+\t\t       RTE_DIM(ipv6.mask.src_ip));\n+\t\tmemcpy(&ipv6.mask.dst_ip, mask->hdr.dst_addr,\n+\t\t       RTE_DIM(ipv6.mask.dst_ip));\n+\t\tvtc_flow_val = rte_be_to_cpu_32(spec->hdr.vtc_flow);\n+\t\tvtc_flow_mask = rte_be_to_cpu_32(mask->hdr.vtc_flow);\n+\t\tipv6.val.flow_label =\n+\t\t\trte_cpu_to_be_32((vtc_flow_val & IPV6_HDR_FL_MASK) >>\n+\t\t\t\t\t IPV6_HDR_FL_SHIFT);\n+\t\tipv6.val.traffic_class = (vtc_flow_val & IPV6_HDR_TC_MASK) >>\n+\t\t\t\t\t IPV6_HDR_TC_SHIFT;\n+\t\tipv6.val.next_hdr = spec->hdr.proto;\n+\t\tipv6.val.hop_limit = spec->hdr.hop_limits;\n+\t\tipv6.mask.flow_label =\n+\t\t\trte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >>\n+\t\t\t\t\t IPV6_HDR_FL_SHIFT);\n+\t\tipv6.mask.traffic_class = (vtc_flow_mask & IPV6_HDR_TC_MASK) >>\n+\t\t\t\t\t  IPV6_HDR_TC_SHIFT;\n+\t\tipv6.mask.next_hdr = mask->hdr.proto;\n+\t\tipv6.mask.hop_limit = mask->hdr.hop_limits;\n+\t\t/* Remove unwanted bits from values. */\n+\t\tfor (i = 0; i < RTE_DIM(ipv6.val.src_ip); ++i) {\n+\t\t\tipv6.val.src_ip[i] &= ipv6.mask.src_ip[i];\n+\t\t\tipv6.val.dst_ip[i] &= ipv6.mask.dst_ip[i];\n+\t\t}\n+\t\tipv6.val.flow_label &= ipv6.mask.flow_label;\n+\t\tipv6.val.traffic_class &= ipv6.mask.traffic_class;\n+\t\tipv6.val.next_hdr &= ipv6.mask.next_hdr;\n+\t\tipv6.val.hop_limit &= ipv6.mask.hop_limit;\n+\t}\n+\tmlx5_flow_spec_verbs_add(flow, &ipv6, size);\n+\treturn size;\n+}\n+\n /**\n  * Validate items provided by the user.\n  *\n@@ -659,6 +764,9 @@ mlx5_flow_items(const struct rte_flow_item items[],\n \t\tcase RTE_FLOW_ITEM_TYPE_IPV4:\n \t\t\tret = mlx5_flow_item_ipv4(items, flow, remain, error);\n \t\t\tbreak;\n+\t\tcase RTE_FLOW_ITEM_TYPE_IPV6:\n+\t\t\tret = mlx5_flow_item_ipv6(items, flow, remain, error);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\treturn rte_flow_error_set(error, ENOTSUP,\n \t\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ITEM,\n",
    "prefixes": [
        "v2",
        "09/20"
    ]
}