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 F4025A0C45 for ; Fri, 19 Nov 2021 14:02:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BC4D41153; Fri, 19 Nov 2021 14:02:31 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2066.outbound.protection.outlook.com [40.107.236.66]) by mails.dpdk.org (Postfix) with ESMTP id 39ED04114B; Fri, 19 Nov 2021 14:02:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g7x+RobW0xf75DyhyjD42A3KDtx7R7MW92URS32RXWzp6wA0ji2Wa+gjx9HAJ5iIRDS57FRQpWof4l7cFU0woBWDkkkiVZsuf1I9ojZp6h0VrFAfqnJx4a5+5iHUWcX+k2jACsx8eeWyIw9rKMlS5hPgbXt43+TG+uAiunDzsfhx20Ob7afw1yvO9ZWLNE/nAKpWAec2n6hYSdCIlqe8SVcPxjL4PEnuB0NI2Jz0nXDmsulCXeuglUC3JTCGKdek06p2525qxivBeTut0I+0FhfQiGycqR860V4+QlRxIQW2Yoh73/XZzlDMSskABkQCUvW/cEMZkmQsPkLgSR9YTA== 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=zQICepORJhKwRJNgoyFK6Ao7PEDW9Dks2vv7N6ZIBB8=; b=CzQzGYntPobEVijxBW/LXyMf5WabnErI2tbUp2+VPimL9vstMLn838l3V3v5mO/vmYSqa6pckrKNfXHk8Abg7RH4lk9Y6EXdjSySNl9Jhplsh5FZCM1Me9AlD+rDoXbeSRTyHIzQZ3LBXTSkebJ8JWsV4nKMrS3xLpGi6blcY3oYXJylSS92gDZcvO0bJVqcvbxsG03yQP/UC7j0RByb5jdCItDaLj3dm4XHJcL9Wc01OsD1E3RVmYrxI+zlkQujT/z82WdWnHmUmunCrxlI8ZLD6YqdKbTZQrCJ9547CJMteKc+qIAqmhZyV2eh4QrnKdifBE3T0j/xlPnAxf50mw== 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=zQICepORJhKwRJNgoyFK6Ao7PEDW9Dks2vv7N6ZIBB8=; b=iIIoZlTvlXynG++aXkhGL4kgMr5sz0GlV9Z2L1xRReDn/8Q6HlsUlTYh0N5U4YRbwMcfmOGqCxiQI7nNrsm5yvRZgqwLRM3nZR8kmvoAeIbZgN7wLlNDvJXvnK8nTWDU2sfFBEv27X6uzXNqQXcrm8X36o/v9tAM4q++xlvYEO5m3KQGLaEwVheK672IccCGV+b175MvFhdhoFO2a7aTCb8YeMI+FKKN/4ZaLqwHhVwgnIONeoh+6xCR3UfPbCRyXH1d2twrwN6Yx4tdaX18+cU84HeGiRvVTFPJ3IgyWRByh5YlqZ2H0GX7wjQbr/Ojau5HGlzRHJBNnIjgiBusSQ== Received: from DM6PR13CA0071.namprd13.prod.outlook.com (2603:10b6:5:134::48) by CH2PR12MB3847.namprd12.prod.outlook.com (2603:10b6:610:2f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Fri, 19 Nov 2021 13:02:27 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:5:134:cafe::1a) by DM6PR13CA0071.outlook.office365.com (2603:10b6:5:134::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.11 via Frontend Transport; Fri, 19 Nov 2021 13:02:26 +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 DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4713.20 via Frontend Transport; Fri, 19 Nov 2021 13:02:26 +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; Fri, 19 Nov 2021 13:02:23 +0000 From: Jiawei Wang To: , , , Shun Hao CC: , , Subject: [PATCH 2/2] net/mlx5: fix the mismatch metadata flow with meter action Date: Fri, 19 Nov 2021 15:02:01 +0200 Message-ID: <20211119130201.14217-2-jiaweiw@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20211119130201.14217-1-jiaweiw@nvidia.com> References: <20211119130201.14217-1-jiaweiw@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a9520dd-27af-40af-25b8-08d9ab5cd60e X-MS-TrafficTypeDiagnostic: CH2PR12MB3847: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zOKhQCbEZHVjdo5OTbwpAJIv6IUdqAaUT774i//nK1GWONJlTswfyXSdG87FP713QzevEATzC66XWKE8xvD/txlFo7sX5VusUR3iJvc2ZVVh6JiWIdVmgjOcBpAermQT1hkf0Jj9fE6OEGteh/GDUu/Rs5YkJhw/xhZhGzFhokG9S+N0tdDB1Gz0y6LdT8EkOBaW0fK+mSFY2dOpWLwBvmdl0E0i2Me1QfaiWw+5QMuvfcyu9HzbF6fAwa9HjC7KQccxhfcAQdq4e9ZHmc5jdOdQFMXZFU7DI8ycpRinC0ZFbjDBDpxfOUK1GnOQe1CBctpEJ3CxOiQsdUEzgr8tSTZBpqb7JruTKj/GFD2mvDAoX1Xm0mEzm++1oOEp6ko1uu/+kWXQUcgXMqhUCppRo/Ftw3cl65Mp9K0xp6iraUX/RrbJjpeFrUfCzZOquPbpzKG87HFSg2bT1GL0X8kTrJKaQ/YQFe2zV+6AvkJV8cIKw9/Rcnsyz0qQKZoBChQXETsSXXC4AsQfyLwquNL7vJnLpcixM8PaZoGCOP7zTPMtNBiz05ydDjdfD0x5rKro8MjGU69T7gQnOos0dygmMPE5z8ajK1VKxRp2/1tw6ao8eAXkytPyYvsJR6R0Q/SXGlNL9p+CpLsGKA8WC44CmvBlWwG1/p02keBSr65B6jxyiXNJP7YRiadQA2Ae+Lw52+YUk50OVIsT9S3drs55SA== 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)(36906005)(316002)(70206006)(55016002)(110136005)(36860700001)(7636003)(2906002)(70586007)(6666004)(54906003)(7696005)(1076003)(86362001)(2616005)(4326008)(186003)(26005)(16526019)(47076005)(426003)(82310400003)(6636002)(336012)(5660300002)(450100002)(6286002)(8676002)(508600001)(36756003)(356005)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 13:02:26.5118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9520dd-27af-40af-25b8-08d9ab5cd60e 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: DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3847 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 The mlx5 PMD introduced the table id attribute to allow multiple flow tables on the same table level for flow metering, there can be multiple flow table objects with the same table level but different table ids. If the extended metadata mode is enabled, all flows containing destination Queue/RSS actions are split into two subflows - prefix one jumps to the MLX5_FLOW_MREG_CP_TABLE_GROUP flow table to copy MARK action data, and suffix one to perform the destination Queue/RSS action. The table_id for the jump in the metadata split prefix flow is always 0. If flow itself was the metering split suffix subflow the table id was set to 1 in the flow split structure and the metadata split suffix subflow was created in the table with wrong table id, causing the metadata suffix flow mismatch. This patch resets the table id to 0 while creating the metadata suffix flows. Fixes: 51ec04dc7bcf ("net/mlx5: connect meter policy to created flows") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 84e6f3048c..a30ce695aa 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5881,6 +5881,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev, /* Add suffix subflow to execute Q/RSS. */ flow_split_info->prefix_layers = layers; flow_split_info->prefix_mark = 0; + flow_split_info->table_id = 0; ret = flow_create_split_inner(dev, flow, &dev_flow, &q_attr, mtr_sfx ? items : q_items, q_actions, -- 2.18.1