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 24A9FA0548 for ; Sun, 28 Nov 2021 16:01:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC72142750; Sun, 28 Nov 2021 16:01:21 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79]) by mails.dpdk.org (Postfix) with ESMTP id 5684940FDF for ; Sun, 28 Nov 2021 16:01:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gnp1s+pIStLTXj1pwdOGtY4Bq+SkAiA19Kvebz8fZzCC4C7LaKri30z075UsoFxQIOvxE5SjT48sYL6fhWVqyWELiTdCWdVcpBwdzinny9Dqzr2jl+CoRHPGXHAEhW86TfJAnOW77ony31++XCg7REE5fj63xsT2c0IIfVtKP5hxlZwSPEzraAKVtpFzC34eFIn2OxkMrmDV31xRVO3MfmIxqenRLmuu2C37RYn3nitP2Z6o2tKo9StPbUqSpZr2jzwTlTF6itZdSODTHI05VHkxCI6LzRI11qM3brZsYUTc/OscU8QYl+/esC1AvYvSjRoonA45aDlzwBi6MC+RLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3QxcC1grLNRac4iSNiWa1+hG+7yHIwMib+HAvE5fFdE=; b=B6ORnymuYMRiIp+f8FPaHdkSc+ip0wkESxCzsed+3FxtJFOlkq6Qxnp7zWoFMbBAnbQR00CFzP8ZKxZ59XYOC5Y+JsHqv6PqJtMk0IDUhOzYWQLlKYSysWpanVuf5aCUNvNGGf4cV+BVKCzoSFnqzrHu6NoUBHKyqgWvjjGKgFS1Gq+VA9r6cEKZYJ2GfkTEDga9afojjtUCmmVTSd0V2EJKP1RUzpju4i7XsLRDKPaeAPC9n8Z7mxMtB9t64ERZa30Nfuz6m75sfFEdJjqqU0zTrNiW0ecl6jEXZN3kfc8Xz9BCsD/JK/EK86cIAW+7YpAH6Ug+qtH5YHD33B9yOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3QxcC1grLNRac4iSNiWa1+hG+7yHIwMib+HAvE5fFdE=; b=T+ELjjEWl9FWH1wobn1W4/7gm8/tCtCYANzfQXR2nyemGUNqxHWIeCqiIN84wVJ0Wc2orir1elhg/k6YBbUVplvQbY91EA8Tr9SYV2jlaPu90Du4/28U2axWJzaDI5tNviIZ5oaF4ooOor9W0MA/+kFAjGYRffAO5g9DXJTbYwUT/rXK2a2/BK6hz036bQOy+en6+ubpB+YB0oCg+zWdGrS+SNZ8M8wQRfKYbC4CBJesSqiKzu3jzd2nm1kx618ZnHkt+R9RkIVEpC0Ox6aYwcdA298egqMh3uZuq/GqdtO1dK/7wnLzwWNcX959RbYctS7sLj+l3oTJijhUkTAM3Q== Received: from BN9PR03CA0656.namprd03.prod.outlook.com (2603:10b6:408:13b::31) by MN2PR12MB4304.namprd12.prod.outlook.com (2603:10b6:208:1d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Sun, 28 Nov 2021 15:01:18 +0000 Received: from BN8NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13b:cafe::e5) by BN9PR03CA0656.outlook.office365.com (2603:10b6:408:13b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.20 via Frontend Transport; Sun, 28 Nov 2021 15:01:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT012.mail.protection.outlook.com (10.13.177.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:01:18 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 15:01:01 +0000 From: Xueming Li To: Dariusz Sosnowski CC: Luca Boccassi , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:53:59 +0800 Message-ID: <20211128145423.3974892-56-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3fae3098-eb3d-4d92-ef2e-08d9b27fee9e X-MS-TrafficTypeDiagnostic: MN2PR12MB4304: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WfXtvvwUPJnkiBX2ns+DiWyIDCpMUrHVa8g34whRvJSwEmNi+oE6ESKwJj+gZ4n0XsvBnX9uwMzpkf6vdHmxnfTYyuuJgNTJ3D8KbFjcTkctntKZG2E1gAhS0PjipMnn2+5ckQeqhI72R/N7vEgn+AVkQeFg5g947ZYCKnreh/ssC14YUlfjINOGQEfxLXhlmLbwy1oU1YeLe7RJo1HHfuER8yt0s8p4vmIJPs0pYNtENbc+7goZHe+zYygK1d8SdIJmAYYgfOPXI6p0LklfO+vDLHjNd0wpFAu89DTK0EwNYdjOjz+F56r+XVaHm/3DYhHVuzouFd3Fnz2Cwm9eFbFqGkcfH8X8ZMDwMILnLL5q1g0Nmv2DMiQ+0d3HA0hK5eY85vXGnrt3PKWlFUBvp3MUveac8viiqcUx9CV7UG1CIvR9bidlpmWXgpa1oAaEEaIF42iBCsg8GMU9m+fNbsxCao/AbP+Rap7r6sUmqqkDGYTQDXoJrcMwNQ1E7iFGwpgxyTw56W16lPXrjLnchezq0nRY7ighhNb7Ti5rSY+vdl+6k4eDARvQWa4RZs5GWF+joaDNlX8/TNpIG3fif0kx4gV3/8C61BXbAc0bP4a+Hz763j3YQUYoM9w5apKh4/r45bkgdAlKspPZ9qCnJhUhKpB4a+X6LALDCHhf/yv/UNj/umNzHazrnkRAeM21/VAAAtwcl5ZAKz2rBW787lihEBcNk8pceAEkCwmGWM0cisZG8KzvTqfKdkuYxyTP95kQ0ibbaXSNUL2pAtWVpFjnqK72hrb+ymTB1KW9IHcNO4kq9xSS2CMamGqspGXM2FUQg9aFtyyJianiA1VyCw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(966005)(6636002)(4326008)(508600001)(8936002)(54906003)(36860700001)(83380400001)(1076003)(8676002)(26005)(186003)(2616005)(16526019)(70586007)(70206006)(5660300002)(7696005)(36756003)(6862004)(53546011)(4001150100001)(37006003)(316002)(7636003)(86362001)(47076005)(2906002)(82310400004)(55016003)(6286002)(336012)(356005)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:01:18.1920 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3fae3098-eb3d-4d92-ef2e-08d9b27fee9e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4304 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 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/4a5f3c979e5964b87b1f094536e2e8e189f9f1a9 Thanks. Xueming Li --- >From 4a5f3c979e5964b87b1f094536e2e8e189f9f1a9 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 Cc: Xueming Li [ 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 498b2137f7..8804b9816d 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -7364,16 +7364,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-28 22:41:06.125022299 +0800 +++ 0055-net-mlx5-fix-MPLS-tunnel-outer-layer-overwrite.patch 2021-11-28 22:41:03.390206379 +0800 @@ -1 +1 @@ -From 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 Mon Sep 17 00:00:00 2001 +From 4a5f3c979e5964b87b1f094536e2e8e189f9f1a9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 7b32c06fc6..d079a52d30 100644 +index 498b2137f7..8804b9816d 100644 @@ -28 +30 @@ -@@ -9328,16 +9328,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key, +@@ -7364,16 +7364,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key,