From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF3DFA0C4C for ; Mon, 12 Jul 2021 15:12:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA1FB4119D; Mon, 12 Jul 2021 15:12:07 +0200 (CEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 5608E4069D for ; Mon, 12 Jul 2021 15:12:06 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id r11so20292083wro.9 for ; Mon, 12 Jul 2021 06:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sI5pIT1jX11thzx2GwVpBVq2Y/YNIBo1hEUO0tP5KKc=; b=BcgahhHiFGjBqFHaa7JVVAgQex7al/H34FHjjS2UsAZ6KaCg7zUfbIkqvjRLyHq3YF O26K+kinGh9qVJOaspOSqwupaT7sPJwFqN37LppkaYUWQFh4POXjVw6+PDE2oDn7bPxw wkpErokuo48o2ab9tK+L+XhgFMMe6oIwASr1FD66HsDu9LtCwQ2DGyIb4cgFm9ZARFDD IJIL03Pf+xDTKrwUMZIqd6oSTyPsZshvz7K1XjWrHN3EDq66WPf3sKYQS8ZZ8yDRfm0q 8l3aeCzKmKzMc2KDOke6PAq+TWgQWs/qa7gSHmzhqFvo+qYN5PJth39UFCwWO01DE+RJ myxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sI5pIT1jX11thzx2GwVpBVq2Y/YNIBo1hEUO0tP5KKc=; b=e57rK7TFfvK5lL+cRir188cdgDPzyT/wP8g1RUHdfSnkihBQTWsUpU7q7Aj6bTH3O8 K6JTiUVbOZ3WSQt9hPof1Gl1ujB2DY1/ofvqPH/8Bx9JJkoFKa5QUT44G4eh7aQ4l+hR z54hEbA/DjEaTv9XLb7BZssVjOkCiScWnG9jcUxKoenF1WfxZibPBnCFuhnESz5VcelE Q8HGO1pYZF9liKQd8zIqJ/H6D1fbAmP1/ZHhjzyXXlzgZb9uhRq5AfmbGuHVdk/JGoY4 h6L1hJjG6Tw/seMsQ6ra4Y67w3lZZN7Rwr8DPSkhdKL4lxh3wSl+nY826XHs0RNEqlwj cu9Q== X-Gm-Message-State: AOAM533IjcbBuOLhu4fhiHV2BbRw9mbwzI1nLSJrxn6mNLmCYcW5vhFK SJtddvFKBNRKxMlZp4azqt0= X-Google-Smtp-Source: ABdhPJxMWPBWEQTQxUouRngBnGU4BNw3t4xqgrGFt7qmDbmaqISkOMTpPhTtIoE3/opDaAMQI1/XlA== X-Received: by 2002:a05:6000:144a:: with SMTP id v10mr7256738wrx.339.1626095526159; Mon, 12 Jul 2021 06:12:06 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id g138sm7778172wmg.32.2021.07.12.06.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:12:05 -0700 (PDT) From: luca.boccassi@gmail.com To: Lior Margalit Cc: Ori Kam , Matan Azrad , dpdk stable Date: Mon, 12 Jul 2021 14:04:34 +0100 Message-Id: <20210712130551.2462159-39-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix IPIP multi-tunnel validation' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/48c9b36155a1de1d85b7980cebeb3323dd241597 Thanks. Luca Boccassi --- >From 48c9b36155a1de1d85b7980cebeb3323dd241597 Mon Sep 17 00:00:00 2001 From: Lior Margalit Date: Wed, 16 Jun 2021 10:01:18 +0300 Subject: [PATCH] net/mlx5: fix IPIP multi-tunnel validation [ upstream commit fa06906a48ee9d31a22f58a05f72c7bd4b737459 ] A flow rule must not include multiple tunnel layers. An attempt to create such a rule, for example: testpmd> flow create .../ vxlan / eth / ipv4 proto is 4 / end results in an unclear error. In the current implementation there is a check for multiple IPIP tunnels, but not for combination of IPIP and a different kind of tunnel, such as VXLAN. The fix is to enhance the above check to use MLX5_FLOW_LAYER_TUNNEL that consists of all the tunnel masks. The error message will be "multiple tunnel not supported". Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel") Signed-off-by: Lior Margalit Acked-by: Ori Kam Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index c5fc1ee6b4..048823a50b 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2044,7 +2044,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, RTE_FLOW_ERROR_TYPE_ITEM, item, "IPv4 cannot follow L2/VLAN layer " "which ether type is not IPv4"); - if (item_flags & MLX5_FLOW_LAYER_IPIP) { + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { if (mask && spec) next_proto = mask->hdr.next_proto_id & spec->hdr.next_proto_id; @@ -2152,7 +2152,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, "which ether type is not IPv6"); if (mask && mask->hdr.proto == UINT8_MAX && spec) next_proto = spec->hdr.proto; - if (item_flags & MLX5_FLOW_LAYER_IPV6_ENCAP) { + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { if (next_proto == IPPROTO_IPIP || next_proto == IPPROTO_IPV6) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:38.700628162 +0100 +++ 0039-net-mlx5-fix-IPIP-multi-tunnel-validation.patch 2021-07-12 13:41:36.326119194 +0100 @@ -1 +1 @@ -From fa06906a48ee9d31a22f58a05f72c7bd4b737459 Mon Sep 17 00:00:00 2001 +From 48c9b36155a1de1d85b7980cebeb3323dd241597 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fa06906a48ee9d31a22f58a05f72c7bd4b737459 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index e5e062d09a..c5c767aaee 100644 +index c5fc1ee6b4..048823a50b 100644 @@ -32 +33 @@ -@@ -2124,7 +2124,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, +@@ -2044,7 +2044,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, @@ -41 +42 @@ -@@ -2232,7 +2232,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, +@@ -2152,7 +2152,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,