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 881CF437A9; Wed, 27 Dec 2023 10:09:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E19C240A6C; Wed, 27 Dec 2023 10:08:43 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2082.outbound.protection.outlook.com [40.107.237.82]) by mails.dpdk.org (Postfix) with ESMTP id C0CA440647 for ; Wed, 27 Dec 2023 10:08:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MX0kmVNHQ2ndaaqQFWdmo3Ze5dGJ4/knST0Kp+IZHl9hPCFOgehz+m4GqGxllsTP/R+aruIgZGlSx9Y2c0/fuuHf3zzZccboVEivVpzQCdHA87oxYhtjY60VINytpIZm5KJ46k2SO58s+0KcqOeAIgVdGiujTGKZxwux4FHUeoufS8eSnuSJA6Tl5yP+r489PNzQGKX0Mo8LB/ilrSIADDWPCTElB7NR7d2XouPXOicf+g5+safn6cYSf14MTEEDWGEaBHtx4b6z50oYr6EKtJrd2lOQow1GRjwr9EFGn4TIRcKXS2AREpBEfuCrEzQwMiN/fBckB3+g3qEkSw3eYQ== 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=A0FMml3VjA++5lnjXcZZ788HgjAIEPNR/0+N1krjNxA=; b=SUFnS4W9IQ4S7r7U7RuwcKVs/snoemKe/sfyRYIgLqhVFclTMwwIsdW90svNixeA3SIjab088uc97rrbGzRtGjsi/kGImKA1L7LdlOYjPH8CaxRHufX2YtgknYkhcwfIqeU65zhkYhd3mmG/re5UEVuVdQIUTbnkw5Co4xvzNpPfOJemwx9WwhM4XZa7yAyqN8Scrwj5zHxcutaAOzSz6YQ9YIJk2lzJ9dI3GLKRsUIlSHKJ44HWe96BCqdQJZFNebvLKm+0zE+APFZRRBGOMBavfC9ly6C2mSS6RuCvUHYDG6EAwLqp0NLMl7xvYIOikp4ZysK97EjaToEc9k8j0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com 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 (0) 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=A0FMml3VjA++5lnjXcZZ788HgjAIEPNR/0+N1krjNxA=; b=BHCn9+RHIy7q7HhJ5x2RVbFJHZTDmIi1G/1TVSh5JkT7ry1CfoRsQcathR0jtG8mu6KxuF3dYwIle5BgrTxUSpbCX7EnaoGy88uFxYj3U6QIVs62rXpFumG5+N1AZ5U7vlKWj+FL6c3haHCBtNc2uTyA6NZmklSpO9S/9vtJgJeQSzya5ASKU4NFZF0F/iquL6XM6ipOCSI3hPo67KWha/hwBazWm1i3H3dZeYwnUjKBY8yjIxfC6tpB0odiUmGvBnF6VTqnJ0BGGscYZHmibsX90Enk2q7/T0OH9mlqanAJElC10QDiIriJ2KOXr6cZS30j0QnC6STW9zEBXUK7cQ== Received: from BLAPR05CA0018.namprd05.prod.outlook.com (2603:10b6:208:36e::13) by BY5PR12MB4902.namprd12.prod.outlook.com (2603:10b6:a03:1dd::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.19; Wed, 27 Dec 2023 09:08:39 +0000 Received: from MN1PEPF0000ECD4.namprd02.prod.outlook.com (2603:10b6:208:36e:cafe::2e) by BLAPR05CA0018.outlook.office365.com (2603:10b6:208:36e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.7 via Frontend Transport; Wed, 27 Dec 2023 09:08:39 +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 MN1PEPF0000ECD4.mail.protection.outlook.com (10.167.242.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.14 via Frontend Transport; Wed, 27 Dec 2023 09:08:39 +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.41; Wed, 27 Dec 2023 01:08:20 -0800 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.41; Wed, 27 Dec 2023 01:08:17 -0800 From: Bing Zhao To: , , , , , , , , , , , Subject: [PATCH 8/8] net/mlx5: validate the actions combination with NAT64 Date: Wed, 27 Dec 2023 11:07:31 +0200 Message-ID: <20231227090731.2569427-9-bingz@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231227090731.2569427-1-bingz@nvidia.com> References: <20231227090731.2569427-1-bingz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD4:EE_|BY5PR12MB4902:EE_ X-MS-Office365-Filtering-Correlation-Id: 27b18950-8168-4ce0-31f5-08dc06bb6a66 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jKBx0DRc0AoXVSik0Z39QqaZsTx2rUmjdNscHBZ8AJOnfUWMSX5KmCHQkCCaLM30lTiSam7PzvecFCmHNxBzEPehGogKZh5jXccZC+iDO1P5kr4TMSWLue1HkFTbaBk/ELSkoCIwOIpfrANNkoJmEob8sB62ZpHJz7G/unN2ZmQnBQRiKX3vV+IeDU25lgTjdzZQxysqlGOiY5GL/Pegbf6r6nfSDUCGhAxFxfs82jjBG7VEBWxgM9VAyioJpZFfi72Fd2V1G2skpXTKPEbjLdrCn2Tb5GCUn+cGa1KxYfg3Jl/c0khTJ9sA6qlKhTFPXIsQ3c3b/AFW7lKwjzfr+mwaizc7Dr+G05aZKf7CtON2qQE8dcXeyfQikdQtoP1kaG0dOZi6sYrVklbca7tsGH6uvuNOepYcuCZhUFvAK6jAiIQb4AD2DEn1VSFvE/ewNZrGRSNAwh3RxRXo/wbAwHtXqloWpXQhXensA8c5DS/HXUpQHN7J9wVvAegFs9I6TfPOVIkrDR5wDVnIJLXkUNqg20VZzI7+xO3uMjm+2MlZ0yO7qKms0/NPAhr6Qkf11mj2hPCrLjufaqgRDnIREqRr5BxTFshodFsNyH3cnryQ5RMTBfv9ie8ynukqjP0KbR82qiJyhL2ayMg9fzOaXy7LR5T0q4QUs7DHRpS9aM1YXEL6nfEgNf63eEyB+UGYadQeY+XIUSuaYHLUov/7NzrMFkXeA37pv0+HmVyAggc= 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:(13230031)(4636009)(136003)(376002)(346002)(396003)(39850400004)(230922051799003)(1800799012)(82310400011)(186009)(64100799003)(451199024)(46966006)(36840700001)(83380400001)(356005)(110136005)(36860700001)(40480700001)(7696005)(7636003)(426003)(921011)(55016003)(336012)(316002)(70586007)(70206006)(6636002)(2616005)(1076003)(82740400003)(6666004)(478600001)(47076005)(86362001)(8936002)(8676002)(26005)(6286002)(16526019)(5660300002)(2906002)(36756003)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2023 09:08:39.1469 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27b18950-8168-4ce0-31f5-08dc06bb6a66 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: MN1PEPF0000ECD4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4902 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 NAT64 is treated as a modify header action. The action order and limitation should be the same as that of modify header in each domain. Since the last 2 TAG registers will be used implicitly in the address backup mode, the values in these registers are no longer valid after the NAT64 action. The application should not try to match these TAGs after the rule that contains NAT64 action. Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_flow_hw.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 81026632ed..6bdd350aef 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -376,6 +376,7 @@ enum mlx5_feature_name { #define MLX5_FLOW_ACTION_PORT_REPRESENTOR (1ull << 47) #define MLX5_FLOW_ACTION_IPV6_ROUTING_REMOVE (1ull << 48) #define MLX5_FLOW_ACTION_IPV6_ROUTING_PUSH (1ull << 49) +#define MLX5_FLOW_ACTION_NAT64 (1ull << 50) #define MLX5_FLOW_DROP_INCLUSIVE_ACTIONS \ (MLX5_FLOW_ACTION_COUNT | MLX5_FLOW_ACTION_SAMPLE | MLX5_FLOW_ACTION_AGE) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 9b60233549..09ae49faa4 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -5841,6 +5841,10 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev, MLX5_HW_VLAN_PUSH_VID_IDX; action_flags |= MLX5_FLOW_ACTION_OF_PUSH_VLAN; break; + case RTE_FLOW_ACTION_TYPE_NAT64: + /* TODO: Validation logic */ + action_flags |= MLX5_FLOW_ACTION_NAT64; + break; case RTE_FLOW_ACTION_TYPE_END: actions_end = true; break; -- 2.25.1