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 B0B90A00C4 for ; Thu, 3 Nov 2022 16:34:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2E7842D14; Thu, 3 Nov 2022 16:34:01 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2052.outbound.protection.outlook.com [40.107.212.52]) by mails.dpdk.org (Postfix) with ESMTP id ADBF042D0B; Thu, 3 Nov 2022 16:33:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=moNhCO2aNRYuE8xS+340lSFHLM1iRAIrTtlbjmeiHzvr3IYuL7aPHf1UXQkv1PRMxoldyazisdVkx+9KYfGaMeQpN/8aRbU2xFNQk9QeflI8Z4xIH0r+lYeVZdel353KfIukheEFveZ6atOQVSiV6vWfcBtHYLi0YwTV3oKWvEvwrohAJitgF5aMOqEyEG81JDfcNxKklfeWIy95dr/ZH91XO51dtJ6wj++BE173ssibQx5YbUm65Oww1crO9ppgtWXsDBHuydauDyEFzA0NauGKTPAF8Dl42Fi5stpJRQYyYQREg6KfiK9UmFNYjMXBuBq3zEPmjEpciQNrH0RIBQ== 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=q2goyvKeUg2AjdxSasX/iv7VuhYdGXeYweIvau2pwRo=; b=RP2d8JyP/S647nAAstHgdaJTMkiDHDeHNQUBMGmDOyeDvAka4VfCQEeKCrG+3yBkUJfCDyHpJRbbdV7/vGcdk+XPezffPaDJz0+DkFep6vy6wUU8LJDVcbmMot15Mr8yYNOY6HXMXJMJD+bYSryGPqcWyeVpW1lvRfWkYAroJ82Ot7KTh1yXEfePLHdyXrfj9VrdJtNsri6EllnGW0RboJnMyz6SZFutwr+zWSGpq75Djc5L+2GQUVhZnou4nbR43bIBN5Y3aeDP1WA8Ficf7AQ5EpEtfwNnnabZFnCgcQs4WRHR/d27oTVpbUa/mh8f3IYwD60aWeXyP2SEnjIzTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=q2goyvKeUg2AjdxSasX/iv7VuhYdGXeYweIvau2pwRo=; b=SK9X55bZmQVeoKMCzq+PGYzOR3NwU6QBW0vDo/yOxq7Mc1bSyaOvf1/2T3lLZnnzSDNdAbZSnxbibAwRrsKCk0dt2uBckQp9YxZRliNgFrrQX2cTr9ndacfa+pQlmSaSvoFWZcqLEv38QC7D/fNEyyH8W4ZoBeiz41VbfR0N0fX7mdnt+JZ3CvnLzjwLu1syyr8KUzoAZdNUTz/FkjahG/LVrIektFzDaDBnQAjvqy3kHj3Ox8RXGMCD/c5Rqwsc2dvTax4eaMi7uA6MYC0dhyLv4uShMGUKy4XoeSAAQu9RsnFX5LFM6mdZfGwkY8mJ+LSPif2ISN7ICJrZXu8Kig== Received: from MW4PR04CA0259.namprd04.prod.outlook.com (2603:10b6:303:88::24) by DM4PR12MB5184.namprd12.prod.outlook.com (2603:10b6:5:397::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Thu, 3 Nov 2022 15:33:58 +0000 Received: from CO1NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:303:88:cafe::fd) by MW4PR04CA0259.outlook.office365.com (2603:10b6:303:88::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19 via Frontend Transport; Thu, 3 Nov 2022 15:33:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT050.mail.protection.outlook.com (10.13.174.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20 via Frontend Transport; Thu, 3 Nov 2022 15:33:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Thu, 3 Nov 2022 08:33:43 -0700 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.29; Thu, 3 Nov 2022 08:33:41 -0700 From: Shun Hao To: , , , "Suanming Mou" CC: , , Subject: [PATCH v1] net/mlx5: fix incorrect match mask for meter flow Date: Thu, 3 Nov 2022 17:33:26 +0200 Message-ID: <20221103153327.73170-1-shunh@nvidia.com> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT050:EE_|DM4PR12MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: 4985d355-1858-42cc-fabe-08dabdb0d330 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L2uD/9lDpnoWATBDJkM92v2FOPABYaCjCqrYYXsNX/ygPdTTn6FsmWOkw/XxFdwnd8OFomIyhLtewMT7nnooFtdeNfclZXoM81T+SqJk7VkcfKVMi2abuXJkLUUjadqRa1Q74JgJ2CXVuoY6lr50qams6tx6VZWfHnqAX5kzPig1YBU/0Hnr+cPFfSLUzhXa9J4yjb8qL2bX4JKt/36uZz2S8LKVcXi3Hv8303cL6NYXWO9M6rnU6WEvhxvWc80kl7OotEkaDSSiceTb4WyO8b66jy1sYlUYaDdyanxOBRw4sTBtFSQryFJmIz2ikidsEqQlYNQubEMKf2d0Uoo9F/WXbC4A3ki7CD3lZ12WRFWPp0hiKxTtZgnDWFoqhTHBe0BNFNmmvOyGVdf0SHwK7MaFvoBvJ1xi71TBHUPDsZNBrufm02QP+SWS5PJXQ7BFoEelz08m2QKT7UcA2ouA23jmJPSMhN35/wPEskLPJw+FSBkqSC0eAGN1iLUqXC0nXdIKn6KtZ+yKP3PicNztXbYe85B4ei3znZPOU5aRQLHoUuy+Lo6IsbbNCCB0LztO9ebfvW8PTcUIJgXVFrKDIPmgXHQJxVa9zrNidMzpxEAWgYpZU5ZcFFxQniWNWc9dcWHwVT5gDBxuWK0tdhHIsxSJ1HMBSw7hGgIYkVN7RqTwO3l+hSiFFMxJgVQNMkMoHwKus2OUat5o7Ooood58dl+rvAFMh8ldrySFUDVQoWdAL5ruXpw5w0ox8pCMVveMBjMCxrssgSvbiZaUpCeDrg== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(396003)(136003)(376002)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(55016003)(2616005)(40480700001)(336012)(5660300002)(1076003)(186003)(16526019)(478600001)(8936002)(426003)(2906002)(83380400001)(110136005)(47076005)(7696005)(36756003)(82740400003)(86362001)(40460700003)(82310400005)(6666004)(316002)(26005)(6636002)(54906003)(6286002)(41300700001)(4326008)(7636003)(356005)(70586007)(70206006)(8676002)(450100002)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2022 15:33:57.9880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4985d355-1858-42cc-fabe-08dabdb0d330 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5184 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 There's an issue introduced by the change of splitting item matcher and value translation, that the matcher mask value for color is not set correctly in meter policy flow creation. This patch fixes this by providing the correct color mask. Fixes: cd4ab74206 ("net/mlx5: split flow item matcher and value translation") Cc: stable@dpdk.org Signed-off-by: Shun Hao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 7b904eeed6..0b1ff89d35 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9727,8 +9727,8 @@ flow_dv_translate_item_mpls(void *key, const struct rte_flow_item *item, * Flow matcher value. * @param[in] reg_type * Type of device metadata register - * @param[in] value - * Register value + * @param[in] data + * Register data * @param[in] mask * Register mask */ @@ -17132,7 +17132,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev, tbl_data = container_of(tbl_rsc, struct mlx5_flow_tbl_data_entry, tbl); if (priority < RTE_COLOR_RED) flow_dv_match_meta_reg(matcher.mask.buf, - (enum modify_reg)color_reg_c_idx, 0, color_mask); + (enum modify_reg)color_reg_c_idx, color_mask, color_mask); matcher.priority = priority; matcher.crc = rte_raw_cksum((const void *)matcher.mask.buf, matcher.mask.size); -- 2.20.0