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 9D265A034F; Thu, 29 Jul 2021 18:04:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1BC1410FF; Thu, 29 Jul 2021 18:04:48 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2071.outbound.protection.outlook.com [40.107.95.71]) by mails.dpdk.org (Postfix) with ESMTP id 45FC14067A for ; Thu, 29 Jul 2021 18:04:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XlXKeZKcXzrEMa+GWHuHaoNjFf7ylnv6C8t7cpqc+vW+nPrz++SU/6OAXShiAhgkefyQhgHbNVP2HsbA/ejRHga4WI2+fWrzf3HGTEg0cZzZLjCcIPDWJq14W5YL7O/lKWHtR/cLrBlO6G/gSr6/l5NTzEv3E//3kOambC0LoFQGIi5hYgE/4lh3tb4pSfQA+QVYE5GSVNg8Its3yLFEnidcqS8aeauMrKwn0zCWu06mBmBAZKK5tWlAyiCPXTgC4DBA1moSnGfKsdTGerZjTvmYGMV17Wud37ItyLDLBQiSYNU7f/5YUXVrowdjPkzMnWAkP0EA1+C3+iHfWe7hoQ== 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-SenderADCheck; bh=PkSDUfzk21/+Ey7WsXfwxFAPXIwFbmQJW/v264G73pY=; b=ji5O4nOgcXmd1LgaJHt4NLV99ezM8zXs/QJppWDqQmgXTCgj2SoXaD5sJ2EzO50IIYx+HXfHh/9xAbRHAdz71PFX/Lf3YrT1ntkSxsQfwK+KS6Ef/gvizbF+QJBr3NTwRO7ioNlbD5U38yOJQMnpH9H9z8wWovyZTcxZ1iwAFMhSkqGt+XoEZLCtkIdZi1ZdMbePiQvIPD79oiJ/w9bNmlObn3aIRgwlK0Qp47IlmT9iLtwwe4PscQtdeyxEaW4c8FaHgkxbLxoxYKdCRZNFezi3NW+RJuy14sQKWv7KsGwKIev07D7mqizURR2vsrs+aTcs18cp1tkPj/n5tDM0DQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none 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=PkSDUfzk21/+Ey7WsXfwxFAPXIwFbmQJW/v264G73pY=; b=NszTxXZQajHVzPSZSiIrRzDMYmIvjfBRWXC6ZpcTIwlfBgleP1CttyJo8NJBrtPQY5o5rXsKkBRNTnz2kk9TPkviUC5kCDDvUdadheo7AIQSKXvmqzbDH78ng2qMUJnIePJKW9lLTlOsOuR3edtg1fQ4ZXQ7Tx8k+A8yj8pfyONyT1lj8TSJD59hxNu9u1sXRmWSpv2e/x3eMHpprK3n+DSjGETR5WjXVmOXYK0KUmd9NJtC3RoR/uHkREbVb5NGYfzdBbFZKwBvzGIOmHlxNNJYxHPeqHGUmA1MbpbYZya1VcMIkk0P2N02dLLusHaE99155jRB4dT47dSXVG9u2g== Received: from BN9PR03CA0953.namprd03.prod.outlook.com (2603:10b6:408:108::28) by BYAPR12MB2856.namprd12.prod.outlook.com (2603:10b6:a03:136::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Thu, 29 Jul 2021 16:04:44 +0000 Received: from BN8NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:408:108:cafe::41) by BN9PR03CA0953.outlook.office365.com (2603:10b6:408:108::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Thu, 29 Jul 2021 16:04:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; 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 BN8NAM11FT050.mail.protection.outlook.com (10.13.177.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4373.18 via Frontend Transport; Thu, 29 Jul 2021 16:04:44 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Jul 2021 16:04:42 +0000 From: Bing Zhao To: , CC: , , , Date: Thu, 29 Jul 2021 19:04:04 +0300 Message-ID: <20210729160405.161982-3-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210729160405.161982-1-bingz@nvidia.com> References: <20210729160405.161982-1-bingz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5d4dfe6-e821-4b77-a14e-08d952aa94e8 X-MS-TrafficTypeDiagnostic: BYAPR12MB2856: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bMa4b35nc8GwdalDStPlCUhfaHJDYMzhnpl1ek1xSLp15fMfj3eNFfnACokFHY1qNm0+ZRsaTj6hExd7UHlDUqpQ+6M5ndeUqlyyDoXYOUtX8WdOLADCAGOYoUtMHFazCuSmJ1Lc1ojRQYBnpfJMp7IkHRUFdT9m4IaY8AlW6gOQrRzIpefslzYg633StXDpjvVsHznSPQo/dDKkRXKRrjnt2nIQ5fw8TUvQ6ROEu9Rrg8SkUYm8cweyUpUtOfML9mXgY25Y5M0iSPTX6a2e/QtgV3Qn4bm93dBFfgnze+z6NObTvloU7gTZtHzznDNwuEO2ZyUe9JjNqtEV4gC2WamkY6xdIcJNm8IbO7iEF8SiKsUVzN5q2EbbGqfwBEdkTjHli7HmjogSUQ5aRHbwIUXgOrZ0SAcYMsZuZvQUZqaVk+ZzRzR34gOg69Pq0Flb9dTqlYK4oxiY3gqrLQAVPFOsZ6mKdWj04g2sNxEha1b6EuzudTYXcAQ0p18MOtU9PKA/WDECqWUpkJn65JkuX313jml+LzJyy38Sh1KMb51G060JblQ1/uZR/ArDl3xPqAVyGCXAMsPKdKR9gvANGuF6ReYe+RG+9OwDui7tlAOa/V45QUcyZcyDGcrEom5AoYG1lu6p/R3xV8Y/ctTLtvWoUxHbkvuS3XNx/CCqGpsbLgjsS2SSX0CWfPVt25EB 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)(376002)(39860400002)(396003)(346002)(136003)(46966006)(36840700001)(8936002)(83380400001)(54906003)(336012)(47076005)(16526019)(110136005)(186003)(478600001)(6286002)(7636003)(426003)(36906005)(356005)(70586007)(8676002)(316002)(82740400003)(70206006)(2906002)(36860700001)(1076003)(7696005)(6666004)(36756003)(86362001)(26005)(6636002)(5660300002)(4326008)(82310400003)(2616005)(55016002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2021 16:04:44.3558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5d4dfe6-e821-4b77-a14e-08d952aa94e8 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: BN8NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2856 Subject: [dpdk-dev] [PATCH] net/mlx5: fix the green color policy RSS queues overwritten X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Both green policy and yellow policy could support RSS actions simultaneous, the Rx queues configuration may be different between them while the other fields should be the same. When the only green color policy was supported in the past, the queues copied and saved in the temporary workspace were used. Since the yellow support was added, the queues stored in the thread workspace would be overwritten by the yellow color policy. The flow rule created using a meter with such a policy would have the same RSS distribution for both green and yellow packets. By using the meter action containers RSS information instead of the workspace RSS, this overwritten can be prevented. Fixes: b38a12272b3a ("net/mlx5: split meter color policy handling") Signed-off-by: Bing Zhao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f7f16883cd..0689e6d45d 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -4710,7 +4710,7 @@ get_meter_sub_policy(struct rte_eth_dev *dev, uint8_t fate = final_policy->act_cnt[i].fate_action; if (fate == MLX5_FLOW_FATE_SHARED_RSS) { - const void *rss_act = + const struct rte_flow_action_rss *rss_act = final_policy->act_cnt[i].rss->conf; struct rte_flow_action rss_actions[2] = { [0] = { @@ -4746,6 +4746,9 @@ get_meter_sub_policy(struct rte_eth_dev *dev, rss_desc_v[i].tunnel = !!(dev_flow.handle->layers & MLX5_FLOW_LAYER_TUNNEL); + /* Use the RSS queues in the containers. */ + rss_desc_v[i].queue = + (uint16_t *)(uintptr_t)rss_act->queue; rss_desc[i] = &rss_desc_v[i]; } else if (fate == MLX5_FLOW_FATE_QUEUE) { /* This is queue action. */ -- 2.27.0