From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C490FA0093 for ; Thu, 28 May 2020 18:25:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 62D351DC30; Thu, 28 May 2020 18:25:21 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 5AE5B1D996 for ; Thu, 28 May 2020 18:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rGhsPs/3zy0jY4EjgCPOL1BGK6+EDZ42teCvbK3zF10=; b=i3dOvIS9QccFJgu/QZ0mxqmN+MPUl7pXytUs7fABq8JkNKKn4vMR67vjqA0b0FgBMhJGF4 TPBvjQK/Eh5xERObCLpacivKzZBU8s3m5OXKtR4Re6gOr4utJ5KLYC12itR33rfGiwa+FO ye5YHfwrLzPYlbuZSEezV3zc0dTuwfU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-x-1p7kJiOAmUsV3BbCWvsQ-1; Thu, 28 May 2020 12:25:16 -0400 X-MC-Unique: x-1p7kJiOAmUsV3BbCWvsQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 548BC1054F8F; Thu, 28 May 2020 16:25:15 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 713C660C87; Thu, 28 May 2020 16:25:14 +0000 (UTC) From: Kevin Traynor To: Raslan Darawsheh Cc: Matan Azrad , dpdk stable Date: Thu, 28 May 2020 17:22:31 +0100 Message-Id: <20200528162322.7863-44-ktraynor@redhat.com> In-Reply-To: <20200528162322.7863-1-ktraynor@redhat.com> References: <20200528162322.7863-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/03/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a Thanks. Kevin. --- >From e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Mon, 23 Mar 2020 16:21:33 +0200 Subject: [PATCH] net/mlx5: fix validation of VXLAN/VXLAN-GPE specs [ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ] Trying to create zero spec for vni wasn't allowed, to avoid matching all packets from previous layer (udp). This behavior is incorrect, since VXLAN is being identified through the outer UDP destination port. Currently, if the user didn't specify outer UDP destination port the PMD will automatically match only on outer UDP port of 4798, and if the user want to match on some none standard port he need to specify it explicitly in the rule. This removes the limitation of vni spec to be able to match any vni. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Signed-off-by: Raslan Darawsheh Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 362fae56c4..0a0cd1be53 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1441,5 +1441,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, uint8_t vni[4]; } id = { .vlan_id = 0, }; - uint32_t vlan_id = 0; @@ -1468,21 +1467,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, if (spec) { memcpy(&id.vni[1], spec->vni, 3); - vlan_id = id.vlan_id; memcpy(&id.vni[1], mask->vni, 3); - vlan_id &= id.vlan_id; } - /* - * Tunnel id 0 is equivalent as not adding a VXLAN layer, if - * only this layer is defined in the Verbs specification it is - * interpreted as wildcard and all packets will match this - * rule, if it follows a full stack layer (ex: eth / ipv4 / - * udp), all packets matching the layers before will also - * match this rule. To avoid such situation, VNI 0 is - * currently refused. - */ - if (!vlan_id) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ITEM, item, - "VXLAN vni cannot be 0"); if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) return rte_flow_error_set(error, ENOTSUP, @@ -1523,5 +1507,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, uint8_t vni[4]; } id = { .vlan_id = 0, }; - uint32_t vlan_id = 0; if (!priv->config.l3_vxlan_en) @@ -1561,20 +1544,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, " not supported"); memcpy(&id.vni[1], spec->vni, 3); - vlan_id = id.vlan_id; memcpy(&id.vni[1], mask->vni, 3); - vlan_id &= id.vlan_id; } - /* - * Tunnel id 0 is equivalent as not adding a VXLAN layer, if only this - * layer is defined in the Verbs specification it is interpreted as - * wildcard and all packets will match this rule, if it follows a full - * stack layer (ex: eth / ipv4 / udp), all packets matching the layers - * before will also match this rule. To avoid such situation, VNI 0 - * is currently refused. - */ - if (!vlan_id) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ITEM, item, - "VXLAN-GPE vni cannot be 0"); if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) return rte_flow_error_set(error, ENOTSUP, -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:13:01.412417524 +0100 +++ 0044-net-mlx5-fix-validation-of-VXLAN-VXLAN-GPE-specs.patch 2020-05-28 17:12:59.112556151 +0100 @@ -1 +1 @@ -From c79ab350a8976718d477d616f06678872a29b1b2 Mon Sep 17 00:00:00 2001 +From e77da2c0c603d03afa91ae4c1b0eb3126dc08e6a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index 41072da6df..2ef6558495 100644 +index 362fae56c4..0a0cd1be53 100644 @@ -32 +33 @@ -@@ -1837,5 +1837,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, +@@ -1441,5 +1441,4 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, @@ -38 +39 @@ -@@ -1864,21 +1863,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, +@@ -1468,21 +1467,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, @@ -60 +61 @@ -@@ -1919,5 +1903,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, +@@ -1523,5 +1507,4 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, @@ -66 +67 @@ -@@ -1957,20 +1940,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, +@@ -1561,20 +1544,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,