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 70694A0C41 for ; Tue, 30 Nov 2021 17:44:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B182410F7; Tue, 30 Nov 2021 17:44:00 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 06458410F7 for ; Tue, 30 Nov 2021 17:43:59 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id CF3E83F044 for ; Tue, 30 Nov 2021 16:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290638; bh=KIYPSyDtBAjTdDsOJqyS0vjklNRa9g27NZM77NXQnFk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c7fw0Dk2DXB92msNwHx/zbTz1V5sFPI0i6qqmJg2a4lEsYDh5GGOnFcVxXA7PJgtC PpQXhACTKThRedHthlZBRGV9kqn5yrCwu/5ZUaplEUM6y88WVaqhrhIA8qInZz4kW1 FLqs+p+44VcW+XEXzhc9fP1Kx3XoHYF6Wb/HWQPR/nv5Af3giFzn5hP6SnThvUbGhQ U3afTySaNdn+yj1AjaVsev4sX8ywHeih54vaFpj13n+y62r+w3P3e31RXG7tPt0nEA 4eTtmrS4SmVIRhTvjqBMz1Yu7XVyySjCc71BzYkUyTKavWvW62fkRhgvd1xgSx2ECq sb2djmZKODFRQ== Received: by mail-ed1-f70.google.com with SMTP id w18-20020a056402071200b003e61cbafdb4so17494639edx.4 for ; Tue, 30 Nov 2021 08:43:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KIYPSyDtBAjTdDsOJqyS0vjklNRa9g27NZM77NXQnFk=; b=VBlJdtt/62gXLqj6PkohzCz+alNd/lD7Nxpb2TaE/t7TfPy4Vwmxu/r6yoR2HkQq2f IDOiG3+Tzju4oaby36Pa0k98WlzZI6cInwe05ctIIVBxk9LgHQdMJDfD5R+kHB3Tm0jf siVGB6bgCmk7cTASXLJ4dIr3zrJ0SZe3Q/9+/zuWz/uc8Wp9uC1EtsJ0pQZ3b5ujlZIs 8/mISStZxZv+aff60VNYgEWHpQmfbcqmrk7lezrwo+1dYph7oLRDD6WykQ5mUQEu6w+g tUpzlS8c3XbEAsqXJVllKW+dytK0vbWnsFROCn9msKFgjw84rQPH6zanWrnamK+KPuf6 yQKw== X-Gm-Message-State: AOAM532075FuUxFEcQhB1PGWefXIFR2xUqv6TpKAjpk7L8dOKJ0eS4Oz f7iMqGBKLzpjVDsUGB5O45bkrOMDR0b+4otLJywnm5hsmoovPSZ8iGc4cVpd7cKpMlQ39caxEHw vwhLAPhjfeR4ZJhAVrUhS0vWp X-Received: by 2002:a50:ee19:: with SMTP id g25mr152511eds.162.1638290638055; Tue, 30 Nov 2021 08:43:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3GU0Du6MUJNVAEqolSi6SIeuBXNttQunLuvLZzD+48Eneqx+8xJ4uoUmX1RYEEs0VG520zw== X-Received: by 2002:a50:ee19:: with SMTP id g25mr152495eds.162.1638290637925; Tue, 30 Nov 2021 08:43:57 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id f16sm12779083edd.37.2021.11.30.08.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:43:57 -0800 (PST) From: christian.ehrhardt@canonical.com To: Dariusz Sosnowski Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:55 +0100 Message-Id: <20211130163605.2460997-151-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/49fdbb9a22c144313af5f446c1e4ef250e677fcd Thanks. Christian Ehrhardt --- >From 49fdbb9a22c144313af5f446c1e4ef250e677fcd Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Wed, 17 Nov 2021 11:59:33 +0200 Subject: [PATCH] net/mlx5: fix MPLS tunnel outer layer overwrite [ upstream commit 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 ] mlx5 PMD incorrectly overwrote outer layer fields in MPLS tunnel rte_flow patterns using defaults for MPLS tunnels. This included overwriting UDP destination port in MPLSoUDP and GRE protocol field in MPLSoGRE. This patch fixes this behavior. If application provides the values in flow pattern items preceding the MPLS flow item the provided values will be used, otherwise the defaults will be applied. Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine") Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index f8ca36b1c6..d1a20dafbe 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -6216,16 +6216,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key, switch (prev_layer) { case MLX5_FLOW_LAYER_OUTER_L4_UDP: - MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xffff); - MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, - MLX5_UDP_PORT_MPLS); + if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) { + MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, + 0xffff); + MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, + MLX5_UDP_PORT_MPLS); + } break; case MLX5_FLOW_LAYER_GRE: /* Fall-through. */ case MLX5_FLOW_LAYER_GRE_KEY: - MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, 0xffff); - MLX5_SET(fte_match_set_misc, misc_v, gre_protocol, - RTE_ETHER_TYPE_MPLS); + if (!MLX5_GET16(fte_match_set_misc, misc_v, gre_protocol)) { + MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, + 0xffff); + MLX5_SET(fte_match_set_misc, misc_v, gre_protocol, + RTE_ETHER_TYPE_MPLS); + } break; default: break; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:14.628172549 +0100 +++ 0151-net-mlx5-fix-MPLS-tunnel-outer-layer-overwrite.patch 2021-11-30 16:50:06.118875937 +0100 @@ -1 +1 @@ -From 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 Mon Sep 17 00:00:00 2001 +From 49fdbb9a22c144313af5f446c1e4ef250e677fcd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 7b32c06fc6..d079a52d30 100644 +index f8ca36b1c6..d1a20dafbe 100644 @@ -28 +29 @@ -@@ -9328,16 +9328,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key, +@@ -6216,16 +6216,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key,