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 DA1A9A0543 for ; Tue, 21 Jun 2022 10:13:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A891740151; Tue, 21 Jun 2022 10:13:24 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2076.outbound.protection.outlook.com [40.107.244.76]) by mails.dpdk.org (Postfix) with ESMTP id 5656240151 for ; Tue, 21 Jun 2022 10:13:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i/AcXMFwcVxn+q69sjQjv+RFZO4kuY20Z7g0WlPAzEwjdleRi3/GBejBXjBq8XaljqVUEF3GpnGQanAOHM1/cu8ojCMtuGx1rfX+ugpU/Rmt7CtC3gxTvZktNxv1eg/EQ5bmFhCXvynJNrecV1ShsfFmO8M6GsBdekiXng8OYI2lnXW8hdZtk9cCuEK6XWiFiBJ15dZ+jJFH7igByOBC7++PAVUI7Ipiwq2hFyqx3Daz+GUtqYAcOb7mgRtDhXMFHGdBP362Z0WlqW8RA5yFo40wUXpntVza3RZXGAcwlxiS3B/jttv4KA4oSxFNSYjUxSnvsDYV6D6UUqjN/QSRiA== 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=aYYTTUmaYJWDiIo67WRbSCPh2euaiITMhfV22GQUpgY=; b=GyOeaQKAil3zJ2ABBGhpExMyctTlXRUd8kl4nIkPVwvxKcGBQ+54VTSeGEf4Vpwo4Hp+lPSyWvs//IXV9sNIKL5ZWWxEFlNmXEQWO5wf7QPEhCEblMOu4fpGef1jKlOkFKsfLJ0OdqkCtStGbHY7whmlcKYbcMjZXqTnBN24pJGgkBntJrOJ+cwV2uavLR6SAxl6w2FWij43rYM6nfX+wp+S3N0NlklXozX9DN1s2hn63C12tpyRJcWfDlpD4W/FGg5aU2hobJJl7K+bT5zx+mYbt8Hi366d7MfpZW8OXmZq9OlcU2bP20Z2c0chcI11C7NZVDfDgruz225k5FTxCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=aYYTTUmaYJWDiIo67WRbSCPh2euaiITMhfV22GQUpgY=; b=UvriA20AOZpXJ/jeD+NaAbEoY0zN2dyZEaTXAzD75zIn9b2zZZwElXo0JfWST14h+netK2U19VKRMWBuhXt+5BJbOIbCZtNHD/2+tDoyVgPMEkh2J7GIyN9WNHLUiDBo1dZoOkMjUo1GmQ2uG05V6+TF7HpdxX4VLZCSIqh/H0JPXUx/pklHx+BI4zKZ0rXWpVhO9FWpHJXe08K3vXe4x8XGvzQE7wNM6YeNQwVa19b39K9pc1R+9N6N5BbFPKpQfBLYDCOGWgZLMdx3c3lZJL58S+Zx0bOVgHtAxzB9Mst/fvxuFamokPSLN3TeICnWm5MUymZSZOgRlaGDaanY2A== Received: from BN8PR12CA0007.namprd12.prod.outlook.com (2603:10b6:408:60::20) by MN2PR12MB3072.namprd12.prod.outlook.com (2603:10b6:208:c5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.13; Tue, 21 Jun 2022 08:13:21 +0000 Received: from BN8NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::5f) by BN8PR12CA0007.outlook.office365.com (2603:10b6:408:60::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18 via Frontend Transport; Tue, 21 Jun 2022 08:13:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT022.mail.protection.outlook.com (10.13.176.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:13:20 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:13:20 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:13:18 -0700 From: Xueming Li To: Dariusz Sosnowski CC: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix RSS hash types adjustment' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:03:01 +0300 Message-ID: <20220621080301.2315720-116-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e619c092-366f-42a5-d4fd-08da535de7be X-MS-TrafficTypeDiagnostic: MN2PR12MB3072:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fQ/coWPzu8l3lor2LiDJYX1ytIsxiTO/xPqvLXTPZ3IfH54yiZFHdkjSyWAmrBGqL2+aLX0E09ij4xnELQZZ6VQvRlBmEV/U+PvWpow01T2jrMERODSDNy4/rCmb1dtrsHKldhLAqcf9cN7FgseB3SPzdQQh/jybX64QrAWACXB2lrf/VyYlKDEey+OoDzcf9pKUGujsJ1JV3rC1mcEGWAY1HkwZ5DQEe5hDCepH/o73sUvP6sVgwnTxBm22tKYw0/TuyWrA+A9uU+UMMb3ICH//8cMMAZ1jNIcmjy9u/rhbKJaXAgCUz05GrskTCLsgkFVL9W0ltfmrIlLTTWZ4V32OPqeeqOwOOemkGNwR9cOKUZ1uxVjGkoEYYNxSLDkNs7U+ku1vnfd3mFnwRYqHKzsDFQBQROYCZ8GEn6mYlhk6c+t6caA5Ffc338VyWJYiEAwkVcrS/OSd9ZiBlbkw1+jM89TCOW8/pgvE8bc437EhQbK9tR88I9TNqbB35kdEFvEcyJObSqf7dZgLOq7tFkaRf+NN6Ugd6fK4QFxZnjMYEJpxMSRaph+QpXAfmQ1wsncv8wVqH9lgXz50ehLuCzwreeZco0LIzuUf/nD66rO0g9k8lR2vg/no3Ss5aM6bhczYMW0AztLqB6duQaI2ISkR6XQXcuSGQQPkUWb6aEfEXbuU3xhrUGmj/sRTtFuLVfVB2IJwXky80rR1AzXNdzzdPISK6kLQ9g+BE1l9PT8TDUZ+esYYA2zqdFgdwvLPm/ynKI9yo6cbbWbPZNnPiX/qsAYaLaUbG0N/5RgRcdHFxVCja0Nz6GKmPqTXhpoil22yS0AvgQDEEwMdHfiIExpsFuPtMHtiP8YRw9M3OCA= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(136003)(396003)(39860400002)(40470700004)(46966006)(36840700001)(966005)(6862004)(8936002)(8676002)(70206006)(70586007)(36860700001)(2906002)(40480700001)(4326008)(54906003)(37006003)(478600001)(6636002)(316002)(55016003)(82310400005)(5660300002)(36756003)(6666004)(2616005)(83380400001)(356005)(26005)(7696005)(86362001)(6286002)(16526019)(336012)(81166007)(186003)(53546011)(1076003)(47076005)(40460700003)(426003)(41300700001)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:13:20.9735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e619c092-366f-42a5-d4fd-08da535de7be X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3072 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.6 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/23/22. 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/40b12a05613e84f38acffcfc2965b752edc3c7b9 Thanks. Xueming Li --- >From 40b12a05613e84f38acffcfc2965b752edc3c7b9 Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Mon, 20 Jun 2022 10:37:28 +0000 Subject: [PATCH] net/mlx5: fix RSS hash types adjustment Cc: Xueming Li [ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ] When an indirect action was created with an RSS action configured to hash on both source and destination L3 addresses (or L4 ports), it caused shared hrxq to be configured to hash only on destination address (or port). This patch fixes this behavior by refining RSS types specified in configuration before calculating hash types used for hrxq. Refining RSS types removes *_SRC_ONLY and *_DST_ONLY flags if they are both set. Fixes: 212d17b6a650 ("net/mlx5: fix missing shared RSS hash types") Cc: stable@dpdk.org Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index aa22e85f6a..c1505b69e6 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, * MLX5_RSS_HASH_IPV4_DST_ONLY are mutually exclusive so they can share * same slot in mlx5_rss_hash_fields. * - * @param[in] rss - * Pointer to the shared action RSS conf. + * @param[in] orig_rss_types + * RSS type as provided in shared RSS action. * @param[in, out] hash_field * hash_field variable needed to be adjusted. * @@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, * void */ static void -__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss, +__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types, uint64_t *hash_field) { - uint64_t rss_types = rss->origin.types; + uint64_t rss_types = rte_eth_rss_hf_refine(orig_rss_types); switch (*hash_field & ~IBV_RX_HASH_INNER) { case MLX5_RSS_HASH_IPV4: @@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev, uint64_t hash_fields = mlx5_rss_hash_fields[i]; int tunnel = 0; - __flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields); + __flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types, + &hash_fields); if (shared_rss->origin.level > 1) { hash_fields |= IBV_RX_HASH_INNER; tunnel = 1; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:54.354196046 +0800 +++ 0115-net-mlx5-fix-RSS-hash-types-adjustment.patch 2022-06-21 15:37:49.287785472 +0800 @@ -1 +1 @@ -From d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 Mon Sep 17 00:00:00 2001 +From 40b12a05613e84f38acffcfc2965b752edc3c7b9 Mon Sep 17 00:00:00 2001 @@ -3 +3 @@ -Date: Thu, 21 Apr 2022 20:36:56 +0000 +Date: Mon, 20 Jun 2022 10:37:28 +0000 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ] @@ -21,2 +24,2 @@ - drivers/net/mlx5/mlx5_flow_dv.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) + drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) @@ -25 +28 @@ -index da2ddd58cd..cb5006bb11 100644 +index aa22e85f6a..c1505b69e6 100644 @@ -28 +31 @@ -@@ -14793,8 +14793,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, +@@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, @@ -32,2 +35,2 @@ -- * @param[in] rss_types -- * RSS type. +- * @param[in] rss +- * Pointer to the shared action RSS conf. @@ -39 +42 @@ -@@ -14802,9 +14802,11 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, +@@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev, @@ -42,4 +45,4 @@ - void --flow_dv_action_rss_l34_hash_adjust(uint64_t rss_types, -+flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types, - uint64_t *hash_field) + static void +-__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss, ++__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types, + uint64_t *hash_field) @@ -46,0 +50 @@ +- uint64_t rss_types = rss->origin.types; @@ -48 +52 @@ -+ + @@ -51 +55,10 @@ - if (rss_types & MLX5_IPV4_LAYER_TYPES) { +@@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev, + uint64_t hash_fields = mlx5_rss_hash_fields[i]; + int tunnel = 0; + +- __flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields); ++ __flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types, ++ &hash_fields); + if (shared_rss->origin.level > 1) { + hash_fields |= IBV_RX_HASH_INNER; + tunnel = 1;