Show a patch.

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

{
    "id": 42964,
    "url": "http://patches.dpdk.org/api/patches/42964/",
    "web_url": "http://patches.dpdk.org/patch/42964/",
    "project": {
        "id": 1,
        "url": "http://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": "<41aa019d60a28ab271c465e86579e232a2471060.1531387413.git.nelio.laranjeiro@6wind.com>",
    "date": "2018-07-12T09:31:03",
    "name": "[v4,17/21] net/mlx5: add flow VXLAN item",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f6d72313720c9da432ae0b4b2e7019479a2106fb",
    "submitter": {
        "id": 243,
        "url": "http://patches.dpdk.org/api/people/243/",
        "name": "Nélio Laranjeiro",
        "email": "nelio.laranjeiro@6wind.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/patch/42964/mbox/",
    "series": [
        {
            "id": 544,
            "url": "http://patches.dpdk.org/api/series/544/",
            "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/42964/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42964/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<cover.1531387413.git.nelio.laranjeiro@6wind.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.18.0",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5AD361B87B;\n\tThu, 12 Jul 2018 11:32:04 +0200 (CEST)",
            "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n\t[209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 5640B1B51C\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 11:31:40 +0200 (CEST)",
            "by mail-wr1-f66.google.com with SMTP id h10-v6so20954294wre.6\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 02:31:40 -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.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 12 Jul 2018 02:31:39 -0700 (PDT)"
        ],
        "References": "<cover.1531293415.git.nelio.laranjeiro@6wind.com>\n\t<cover.1531387413.git.nelio.laranjeiro@6wind.com>",
        "X-Google-Smtp-Source": "AAOMgpeF5IvgYI+Gz2NYWnokv3U2GKI7j36mXf8VF93GU5avR7c4sHpqFe7dY9HCt/+KlB/rNb5PcA==",
        "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=pIwtgLXtVlM/UJRZsBVixQFK44Ile82fpShYWg1o+qI=;\n\tb=H7cGTlVe8YpbuVt0huQVPZhaxzhUimOCKLjK8FlgQHoziAt5xL3vsXjRMgQXzthmbE\n\tNMKcM2KJrMbkU35iZsld2Aylo9mDSrYOVXNFANeWqivCvDa9fF8a2jVvZXM13K4sXPyG\n\t5bajs/SlzzZqzA4JQz1/2U//OPOw9Wh3Kot00TeuHbTUN2eyu94sLbBJ5QayG1LQzArE\n\tTq4gnTOnWXLXIxPjDmwIT9WXko4nhpO4yD/h/fajtUVnpPoRGbU/XaUfkFyecsFxz1Bi\n\tcvzqNPVE3HXXfF/iuMnny1cigtRwlz21Dmm355qmHZr0sUJRV7N7h90qGG5OXmB0HdJA\n\txi7w==",
        "X-BeenThere": "dev@dpdk.org",
        "X-Received": "by 2002:adf:9996:: with SMTP id\n\ty22-v6mr1178269wrb.69.1531387899822; \n\tThu, 12 Jul 2018 02:31:39 -0700 (PDT)",
        "Message-Id": "<41aa019d60a28ab271c465e86579e232a2471060.1531387413.git.nelio.laranjeiro@6wind.com>",
        "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=pIwtgLXtVlM/UJRZsBVixQFK44Ile82fpShYWg1o+qI=;\n\tb=HkOo9F1fvAl9rsQ1l1anANCQnHHZ8l5oh8V4mrk38eLQxjEniluCQe08+nq+aTGldo\n\tEvgrctZXeQKZ2h02idZYYJes7zHg5XKdH83nIBKyxIm6RaULyp4zFMZ5Boy8om23DOUf\n\t823uqgxhref3M/KdamYFdZ02t72Vjz4g7S3loPwQYnM8hvZCCp4WqilADAhR/vhyYxhp\n\tS/8GgJ9xrRtFOJaq6/kFZFA/pt4f8YpyaxEFHp1fz4TG8VExC9OkAK4hZ0nrD33oXMSH\n\thJEAfJw0hwegcfB/lmuo78Xg4hTI8AF8RUfXOh4+y6sVZ46UzVr3m3tvEqVPRlfazE90\n\tITeg==",
        "Delivered-To": "patchwork@dpdk.org",
        "Precedence": "list",
        "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@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>",
        "To": "dev@dpdk.org,\n\tYongseok Koh <yskoh@mellanox.com>",
        "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>",
        "Date": "Thu, 12 Jul 2018 11:31:03 +0200",
        "X-Gm-Message-State": "AOUpUlEmaZBLOddBvhFtwIGAI3swqJBCpLz94asmn5kuh67/vDOiRDEl\n\tuE9XETRaJliEodsGe2XRtIhKYQsNBQ==",
        "Cc": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v4 17/21] net/mlx5: add flow VXLAN item"
    },
    "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 | 190 +++++++++++++++++++++++++++++------\n drivers/net/mlx5/mlx5_rxtx.h |   1 +\n 2 files changed, 163 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex 84bd99b3e..7eb5d7da3 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -51,6 +51,9 @@ extern const struct eth_dev_ops mlx5_dev_ops_isolate;\n #define MLX5_FLOW_LAYER_INNER_L4_TCP (1u << 10)\n #define MLX5_FLOW_LAYER_INNER_VLAN (1u << 11)\n \n+/* Pattern tunnel Layer bits. */\n+#define MLX5_FLOW_LAYER_VXLAN (1u << 12)\n+\n /* Outer Masks. */\n #define MLX5_FLOW_LAYER_OUTER_L3 \\\n \t(MLX5_FLOW_LAYER_OUTER_L3_IPV4 | MLX5_FLOW_LAYER_OUTER_L3_IPV6)\n@@ -61,7 +64,7 @@ extern const struct eth_dev_ops mlx5_dev_ops_isolate;\n \t MLX5_FLOW_LAYER_OUTER_L4)\n \n /* Tunnel Masks. */\n-#define MLX5_FLOW_LAYER_TUNNEL 0\n+#define MLX5_FLOW_LAYER_TUNNEL MLX5_FLOW_LAYER_VXLAN\n \n /* Inner Masks. */\n #define MLX5_FLOW_LAYER_INNER_L3 \\\n@@ -98,6 +101,7 @@ enum mlx5_expansion {\n \tMLX5_EXPANSION_OUTER_IPV6,\n \tMLX5_EXPANSION_OUTER_IPV6_UDP,\n \tMLX5_EXPANSION_OUTER_IPV6_TCP,\n+\tMLX5_EXPANSION_VXLAN,\n \tMLX5_EXPANSION_ETH,\n \tMLX5_EXPANSION_IPV4,\n \tMLX5_EXPANSION_IPV4_UDP,\n@@ -136,6 +140,7 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {\n \t\t\tETH_RSS_NONFRAG_IPV4_OTHER,\n \t},\n \t[MLX5_EXPANSION_OUTER_IPV4_UDP] = {\n+\t\t.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN),\n \t\t.type = RTE_FLOW_ITEM_TYPE_UDP,\n \t\t.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,\n \t},\n@@ -152,6 +157,7 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {\n \t\t\tETH_RSS_NONFRAG_IPV6_OTHER,\n \t},\n \t[MLX5_EXPANSION_OUTER_IPV6_UDP] = {\n+\t\t.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN),\n \t\t.type = RTE_FLOW_ITEM_TYPE_UDP,\n \t\t.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,\n \t},\n@@ -159,6 +165,10 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {\n \t\t.type = RTE_FLOW_ITEM_TYPE_TCP,\n \t\t.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,\n \t},\n+\t[MLX5_EXPANSION_VXLAN] = {\n+\t\t.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH),\n+\t\t.type = RTE_FLOW_ITEM_TYPE_VXLAN,\n+\t},\n \t[MLX5_EXPANSION_ETH] = {\n \t\t.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,\n \t\t\t\t\t\t MLX5_EXPANSION_IPV6),\n@@ -226,6 +236,8 @@ struct rte_flow {\n \tstruct mlx5_flow_verbs *cur_verbs;\n \t/**< Current Verbs flow structure being filled. */\n \tstruct rte_flow_action_rss rss;/**< RSS context. */\n+\tuint32_t tunnel_ptype;\n+\t/**< Store tunnel packet type data to store in Rx queue. */\n \tuint8_t key[MLX5_RSS_HASH_KEY_LEN]; /**< RSS hash key. */\n \tuint16_t (*queue)[]; /**< Destination queues to redirect traffic to. */\n };\n@@ -1160,6 +1172,103 @@ mlx5_flow_item_tcp(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_vxlan(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_vxlan *spec = item->spec;\n+\tconst struct rte_flow_item_vxlan *mask = item->mask;\n+\tunsigned int size = sizeof(struct ibv_flow_spec_tunnel);\n+\tstruct ibv_flow_spec_tunnel vxlan = {\n+\t\t.type = IBV_FLOW_SPEC_VXLAN_TUNNEL,\n+\t\t.size = size,\n+\t};\n+\tint ret;\n+\tunion vni {\n+\t\tuint32_t vlan_id;\n+\t\tuint8_t vni[4];\n+\t} id = { .vlan_id = 0, };\n+\n+\tif (flow->layers & MLX5_FLOW_LAYER_TUNNEL)\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  \"a tunnel is already present\");\n+\t/*\n+\t * Verify only UDPv4 is present as defined in\n+\t * https://tools.ietf.org/html/rfc7348\n+\t */\n+\tif (!(flow->layers & MLX5_FLOW_LAYER_OUTER_L4_UDP))\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  \"no outer UDP layer found\");\n+\tif (!mask)\n+\t\tmask = &rte_flow_item_vxlan_mask;\n+\tret = mlx5_flow_item_acceptable\n+\t\t(item, (const uint8_t *)mask,\n+\t\t (const uint8_t *)&rte_flow_item_vxlan_mask,\n+\t\t sizeof(struct rte_flow_item_vxlan), error);\n+\tif (ret < 0)\n+\t\treturn ret;\n+\tif (spec) {\n+\t\tmemcpy(&id.vni[1], spec->vni, 3);\n+\t\tvxlan.val.tunnel_id = id.vlan_id;\n+\t\tmemcpy(&id.vni[1], mask->vni, 3);\n+\t\tvxlan.mask.tunnel_id = id.vlan_id;\n+\t\t/* Remove unwanted bits from values. */\n+\t\tvxlan.val.tunnel_id &= vxlan.mask.tunnel_id;\n+\t}\n+\t/*\n+\t * Tunnel id 0 is equivalent as not adding a VXLAN layer, if\n+\t * only this layer is defined in the Verbs specification it is\n+\t * interpreted as wildcard and all packets will match this\n+\t * rule, if it follows a full stack layer (ex: eth / ipv4 /\n+\t * udp), all packets matching the layers before will also\n+\t * match this rule.  To avoid such situation, VNI 0 is\n+\t * currently refused.\n+\t */\n+\tif (!vxlan.val.tunnel_id)\n+\t\treturn rte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t  item,\n+\t\t\t\t\t  \"VXLAN vni cannot be 0\");\n+\tif (!(flow->layers & MLX5_FLOW_LAYER_OUTER))\n+\t\treturn rte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t  item,\n+\t\t\t\t\t  \"VXLAN tunnel must be fully defined\");\n+\tif (size <= flow_size) {\n+\t\tmlx5_flow_spec_verbs_add(flow, &vxlan, size);\n+\t\tflow->cur_verbs->attr->priority = MLX5_PRIORITY_MAP_L2;\n+\t}\n+\tflow->layers |= MLX5_FLOW_LAYER_VXLAN;\n+\tflow->tunnel_ptype = RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_L4_UDP;\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@@ -1217,6 +1326,10 @@ mlx5_flow_items(const struct rte_flow_item pattern[],\n \t\tcase RTE_FLOW_ITEM_TYPE_TCP:\n \t\t\tret = mlx5_flow_item_tcp(pattern, flow, remain, error);\n \t\t\tbreak;\n+\t\tcase RTE_FLOW_ITEM_TYPE_VXLAN:\n+\t\t\tret = mlx5_flow_item_vxlan(pattern, flow, remain,\n+\t\t\t\t\t\t   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@@ -1832,7 +1945,7 @@ mlx5_flow_merge(struct rte_eth_dev *dev, struct rte_flow *flow,\n }\n \n /**\n- * Mark the Rx queues mark flag if the flow has a mark or flag modifier.\n+ * Set the Rx queue flags (Mark/Flag and Tunnel Ptypes) according to the flow.\n  *\n  * @param[in] dev\n  *   Pointer to Ethernet device.\n@@ -1840,28 +1953,34 @@ mlx5_flow_merge(struct rte_eth_dev *dev, struct rte_flow *flow,\n  *   Pointer to flow structure.\n  */\n static void\n-mlx5_flow_rxq_mark_set(struct rte_eth_dev *dev, struct rte_flow *flow)\n+mlx5_flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)\n {\n \tstruct priv *priv = dev->data->dev_private;\n+\tconst int mark = !!(flow->modifier &\n+\t\t\t    (MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK));\n+\tconst int tunnel = !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL);\n+\tunsigned int i;\n \n-\tif (flow->modifier & (MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK)) {\n-\t\tunsigned int i;\n-\n-\t\tfor (i = 0; i != flow->rss.queue_num; ++i) {\n-\t\t\tint idx = (*flow->queue)[i];\n-\t\t\tstruct mlx5_rxq_ctrl *rxq_ctrl =\n-\t\t\t\tcontainer_of((*priv->rxqs)[idx],\n-\t\t\t\t\t     struct mlx5_rxq_ctrl, rxq);\n+\tfor (i = 0; i != flow->rss.queue_num; ++i) {\n+\t\tint idx = (*flow->queue)[i];\n+\t\tstruct mlx5_rxq_ctrl *rxq_ctrl =\n+\t\t\tcontainer_of((*priv->rxqs)[idx],\n+\t\t\t\t     struct mlx5_rxq_ctrl, rxq);\n \n+\t\tif (mark) {\n \t\t\trxq_ctrl->rxq.mark = 1;\n \t\t\trxq_ctrl->flow_mark_n++;\n \t\t}\n+\t\tif (tunnel) {\n+\t\t\trxq_ctrl->rxq.tunnel = flow->tunnel_ptype;\n+\t\t\trxq_ctrl->flow_vxlan_n++;\n+\t\t}\n \t}\n }\n \n /**\n- * Clear the Rx queue mark associated with the @p flow if no other flow uses\n- * it with a mark request.\n+ * Clear the Rx queue flags (Mark/Flag and Tunnel Ptype) associated with the\n+ * @p flow if no other flow uses it with the same kind of request.\n  *\n  * @param dev\n  *   Pointer to Ethernet device.\n@@ -1869,33 +1988,41 @@ mlx5_flow_rxq_mark_set(struct rte_eth_dev *dev, struct rte_flow *flow)\n  *   Pointer to the flow.\n  */\n static void\n-mlx5_flow_rxq_mark_trim(struct rte_eth_dev *dev, struct rte_flow *flow)\n+mlx5_flow_rxq_flags_trim(struct rte_eth_dev *dev, struct rte_flow *flow)\n {\n \tstruct priv *priv = dev->data->dev_private;\n+\tconst int mark = !!(flow->modifier &\n+\t\t\t    (MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK));\n+\tconst int tunnel = !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL);\n+\tunsigned int i;\n \n-\tif (flow->modifier & (MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK)) {\n-\t\tunsigned int i;\n-\n-\t\tfor (i = 0; i != flow->rss.queue_num; ++i) {\n-\t\t\tint idx = (*flow->queue)[i];\n-\t\t\tstruct mlx5_rxq_ctrl *rxq_ctrl =\n-\t\t\t\tcontainer_of((*priv->rxqs)[idx],\n-\t\t\t\t\t     struct mlx5_rxq_ctrl, rxq);\n+\tassert(dev->data->dev_started);\n+\tfor (i = 0; i != flow->rss.queue_num; ++i) {\n+\t\tint idx = (*flow->queue)[i];\n+\t\tstruct mlx5_rxq_ctrl *rxq_ctrl =\n+\t\t\tcontainer_of((*priv->rxqs)[idx],\n+\t\t\t\t     struct mlx5_rxq_ctrl, rxq);\n \n+\t\tif (mark) {\n \t\t\trxq_ctrl->flow_mark_n--;\n \t\t\trxq_ctrl->rxq.mark = !!rxq_ctrl->flow_mark_n;\n \t\t}\n+\t\tif (tunnel) {\n+\t\t\trxq_ctrl->flow_vxlan_n++;\n+\t\t\tif (!rxq_ctrl->flow_vxlan_n)\n+\t\t\t\trxq_ctrl->rxq.tunnel = 0;\n+\t\t}\n \t}\n }\n \n /**\n- * Clear the mark bit in all Rx queues.\n+ * Clear the Mark/Flag and Tunnel ptype information in all Rx queues.\n  *\n  * @param dev\n  *   Pointer to Ethernet device.\n  */\n static void\n-mlx5_flow_rxq_mark_clear(struct rte_eth_dev *dev)\n+mlx5_flow_rxq_flags_clear(struct rte_eth_dev *dev)\n {\n \tstruct priv *priv = dev->data->dev_private;\n \tunsigned int i;\n@@ -1910,6 +2037,8 @@ mlx5_flow_rxq_mark_clear(struct rte_eth_dev *dev)\n \t\t\t\t\tstruct mlx5_rxq_ctrl, rxq);\n \t\trxq_ctrl->flow_mark_n = 0;\n \t\trxq_ctrl->rxq.mark = 0;\n+\t\trxq_ctrl->flow_vxlan_n = 0;\n+\t\trxq_ctrl->rxq.tunnel = 0;\n \t\t++idx;\n \t}\n }\n@@ -2105,7 +2234,7 @@ mlx5_flow_list_create(struct rte_eth_dev *dev,\n \t\t}\n \t}\n \tTAILQ_INSERT_TAIL(list, flow, next);\n-\tmlx5_flow_rxq_mark_set(dev, flow);\n+\tmlx5_flow_rxq_flags_set(dev, flow);\n \treturn flow;\n }\n \n@@ -2143,7 +2272,12 @@ mlx5_flow_list_destroy(struct rte_eth_dev *dev, struct mlx5_flows *list,\n {\n \tmlx5_flow_remove(dev, flow);\n \tTAILQ_REMOVE(list, flow, next);\n-\tmlx5_flow_rxq_mark_trim(dev, flow);\n+\t/*\n+\t * Update RX queue flags only if port is started, otherwise it is\n+\t * already clean.\n+\t */\n+\tif (dev->data->dev_started)\n+\t\tmlx5_flow_rxq_flags_trim(dev, flow);\n \trte_free(flow);\n }\n \n@@ -2181,7 +2315,7 @@ mlx5_flow_stop(struct rte_eth_dev *dev, struct mlx5_flows *list)\n \n \tTAILQ_FOREACH_REVERSE(flow, list, mlx5_flows, next)\n \t\tmlx5_flow_remove(dev, flow);\n-\tmlx5_flow_rxq_mark_clear(dev);\n+\tmlx5_flow_rxq_flags_clear(dev);\n }\n \n /**\n@@ -2206,7 +2340,7 @@ mlx5_flow_start(struct rte_eth_dev *dev, struct mlx5_flows *list)\n \t\tret = mlx5_flow_apply(dev, flow, &error);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n-\t\tmlx5_flow_rxq_mark_set(dev, flow);\n+\t\tmlx5_flow_rxq_flags_set(dev, flow);\n \t}\n \treturn 0;\n error:\ndiff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h\nindex 808118e50..ae9b564dd 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.h\n+++ b/drivers/net/mlx5/mlx5_rxtx.h\n@@ -139,6 +139,7 @@ struct mlx5_rxq_ctrl {\n \tunsigned int irq:1; /* Whether IRQ is enabled. */\n \tuint16_t idx; /* Queue index. */\n \tuint32_t flow_mark_n; /* Number of Mark/Flag flows using this Queue. */\n+\tuint32_t flow_vxlan_n; /* Number of VXLAN flows using this queue. */\n };\n \n /* Indirection table. */\n",
    "prefixes": [
        "v4",
        "17/21"
    ]
}