Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42956/?format=api
http://patches.dpdk.org/api/patches/42956/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/d7d8264eb218b822ba85e60a06629e0874d11dad.1531387413.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": "<d7d8264eb218b822ba85e60a06629e0874d11dad.1531387413.git.nelio.laranjeiro@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/d7d8264eb218b822ba85e60a06629e0874d11dad.1531387413.git.nelio.laranjeiro@6wind.com", "date": "2018-07-12T09:30:55", "name": "[v4,09/21] net/mlx5: add flow IPv6 item", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "4a291f2c8de030fd00b3b750d912fbba83d85ca4", "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/d7d8264eb218b822ba85e60a06629e0874d11dad.1531387413.git.nelio.laranjeiro@6wind.com/mbox/", "series": [ { "id": 544, "url": "http://patches.dpdk.org/api/series/544/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=544", "date": "2018-07-12T09:30:46", "name": "net/mlx5: flow rework", "version": 4, "mbox": "http://patches.dpdk.org/series/544/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42956/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/42956/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 35C071B5E6;\n\tThu, 12 Jul 2018 11:31:47 +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 3B8BE1B569\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 11:31:33 +0200 (CEST)", "by mail-wm0-f68.google.com with SMTP id z13-v6so5288247wma.5\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 02:31:33 -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\ts2-v6sm18717603wrn.75.2018.07.12.02.31.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 12 Jul 2018 02:31:32 -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:cc:subject:date:message-id:in-reply-to:references;\n\tbh=H6r+7vlOXnaBtOi2cWpdGX7dqfwLOEk9Klglxa6xoJA=;\n\tb=VOGu2Zw34v2jkGeSIBXA/bLHEdvxyNQr4EAlKzZ7OzRhVsuravMktOHt/QfkXbTpEb\n\tBWQysPC+V8dtLE4pqN2w+UDMI/wrQTB760BObFugRCjxRjKwFmhr7dTQvQ70oyDUMIWX\n\t7fBKyy8VWy8gbC17rXt8i7m6Pi2vB2lsu9LZ82pjWb7nfu5LZaj9p7Hiza/SvQojnG+N\n\tlDi2SV/iajEuEYnaPGztU8HVO7uInTdTSrtuRiP5hXrhmk20w2k7vXh4mH2u812bNO6l\n\t6UxutOzPYoeIWIrDl2oq+IpEWqBPdQJlp/aed9kmCKkEMtRvVCi6dDtL+krhe/Sr8sun\n\t5zmw==", "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:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=H6r+7vlOXnaBtOi2cWpdGX7dqfwLOEk9Klglxa6xoJA=;\n\tb=sR7xui5CLbsBkgM8Iyt5BpPkXc3acaQI3UQ74TiLvBMorrRfBk7rTrvxe9DQ4glOeH\n\tS5QZ0W/pZFQyS+yNFyLKBhnxX4n3vFYkd6HyBnlCDdqoCcEYcxfUTqMrmwtomiUgX1mN\n\tu5PoGgTK4Jx8Pmnv+LIat61rdyLIZsI0JSWOYMXl3QWZbn7UsV7KlXYON1ntmXFPkNnq\n\tTGN+RvSPDs4GprRzPwVa5PGB/edX6lIYWZg1bvQIul5RLpRt1+ot7vyp3hZDnrKm3w7K\n\tGX/M2PboRtAiC+POJBQaG5HGOHtlxTXhSjpDXnrGdiGQPKCyRjyIKGA8LTmA7C7uP0+A\n\tUGHg==", "X-Gm-Message-State": "AOUpUlETzb/1J4pZVoHKMVOzCXOPIDeGdit5ACtMFBpvmmWqi8CwJR29\n\tMZzW49iATvvhJUi6Px8EI3QHgYpJOg==", "X-Google-Smtp-Source": "AAOMgpd0vhNwB1akE8tzS0kxTOIbRY5TvHlQEq17m78wKD7K4iMXDUv8iov+kginaaM5JqpSlNmZIw==", "X-Received": "by 2002:a1c:4004:: with SMTP id\n\tn4-v6mr816639wma.83.1531387892757; \n\tThu, 12 Jul 2018 02:31:32 -0700 (PDT)", "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>", "To": "dev@dpdk.org,\n\tYongseok Koh <yskoh@mellanox.com>", "Cc": "Adrien Mazarguil <adrien.mazarguil@6wind.com>", "Date": "Thu, 12 Jul 2018 11:30:55 +0200", "Message-Id": "<d7d8264eb218b822ba85e60a06629e0874d11dad.1531387413.git.nelio.laranjeiro@6wind.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<cover.1531387413.git.nelio.laranjeiro@6wind.com>", "References": "<cover.1531293415.git.nelio.laranjeiro@6wind.com>\n\t<cover.1531387413.git.nelio.laranjeiro@6wind.com>", "Subject": "[dpdk-dev] [PATCH v4 09/21] 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>\nAcked-by: Yongseok Koh <yskoh@mellanox.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 115 +++++++++++++++++++++++++++++++++++\n 1 file changed, 115 insertions(+)", "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex c05b8498d..513f70d40 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -593,6 +593,118 @@ mlx5_flow_item_ipv4(const struct rte_flow_item *item, struct rte_flow *flow,\n \treturn size;\n }\n \n+/**\n+ * Convert the @p item into a Verbs specification after ensuring the NIC\n+ * will understand and process it correctly.\n+ * If the necessary size for the conversion is greater than the @p flow_size,\n+ * nothing is written in @p flow, the validation is still performed.\n+ *\n+ * @param[in] item\n+ * Item specification.\n+ * @param[in, out] flow\n+ * Pointer to flow structure.\n+ * @param[in] flow_size\n+ * Size in bytes of the available space in @p flow, if too small, nothing is\n+ * written.\n+ * @param[out] error\n+ * Pointer to error structure.\n+ *\n+ * @return\n+ * On success the number of bytes consumed/necessary, if the returned value\n+ * is lesser or equal to @p flow_size, the @p item has fully been converted,\n+ * otherwise another call with this returned memory size should be done.\n+ * On error, a negative errno value is returned 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_acceptable\n+\t\t(item, (const uint8_t *)mask,\n+\t\t (const uint8_t *)&nic_mask,\n+\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 * Convert the @p pattern into a Verbs specifications after ensuring the NIC\n * will understand and process it correctly.\n@@ -641,6 +753,9 @@ mlx5_flow_items(const struct rte_flow_item pattern[],\n \t\tcase RTE_FLOW_ITEM_TYPE_IPV4:\n \t\t\tret = mlx5_flow_item_ipv4(pattern, flow, remain, error);\n \t\t\tbreak;\n+\t\tcase RTE_FLOW_ITEM_TYPE_IPV6:\n+\t\t\tret = mlx5_flow_item_ipv6(pattern, 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": [ "v4", "09/21" ] }{ "id": 42956, "url": "