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 0016643AA0; Wed, 7 Feb 2024 16:56:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71C5342DE9; Wed, 7 Feb 2024 16:56:01 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2052.outbound.protection.outlook.com [40.107.244.52]) by mails.dpdk.org (Postfix) with ESMTP id 0C4FC4026E for ; Wed, 7 Feb 2024 16:56:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPByKi6pmZXfYJ+RDW0CUwmGzq2JXR4QCgrCVVE12pztYAvMeg9l1xi/+g4W1sw1pl8yjazr++Pgii4PoAmZgtybTc/khpVhqJyFFmgyg/3ZM5sGxhwP9oY5hqAFIXbodbdhvWd3/msKrcG89FWHQ3uS8xLkSG5ol3I4L0kDnr7Ce1jgALZGbyAjwBlZxspS1PF6/zgn8PuE/63UJp8Tz/6KxafFLDBSAuDh6H1DedKirMoLr4otMr8tUNAUEr2tXxPXST4kwNNszXRsCtdz2ccd6uvTY+ypF8hJfVEBBa3O0Iaekg66GauCeuL59efc0fVedjiRTZGpWfwWhfX74w== 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=E6ysqARtXlTsBbPXnJJOyvvFMvdDdDgcKaZxecIdCC8=; b=grgZe50oILQtjXluI6aTaomnyMqF5Y+EFdj21GJKT5DASvaqLvWCQW+neYoTcJjyAF4NFYk6+uYHv0wHy5YZYFjluL1vVs6Yb8Ner/EXV5MGQPswvMrlGXx5MaZ1rvsZlkL+aJD5IJgcolFKGTg9MHr1p6UhmuA7YFox8nt3KHacbAHnCgzTh/fR74W9cF7t/BNScjBokHAWQxbn5PHDj3/PGPw1VpZ/EnE5kfwPMyVRjr5Lwp/ixCJX5SQISTdapkaJPQQnizgHnq8coLLaEgC9khi0vPD/18Q4LVqjtUKylz+89MLeLNp0tCgNS2ltUQAj2AyU1+LinOVMRmNXKQ== 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 (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=E6ysqARtXlTsBbPXnJJOyvvFMvdDdDgcKaZxecIdCC8=; b=rxHZhQybz4cNZf2O+YSIDzKYXxuE96Ec6B1+fel6IbdOZJ7tQTE5V6dXvCqhhy3azR0Vq1fd2iA42OYfWOyc3Sv6VDF2uIJ+9IGh2if7IoFJpvNkdXFmx4vXZq44TNkSni6TRcOevQ5oTfZSoDveTCXaQvqmMuTVikWZCk57I/R5akpxTxP1obe/kn42V9ziXmQg1trcx9Cqj9bka96keRO1CxA1xtjBD8gidajFM7AAM4Qo7DO67Ew8+s/vwlT1d2tmxmDqKfpqov5golT6+l7jA4odjgMEDAwSiCaQpbEHXrUXSw4MwHDyL85NuL7VRPwUIDK+IVU0v8fzkYi2gw== Received: from MW2PR16CA0020.namprd16.prod.outlook.com (2603:10b6:907::33) by CH2PR12MB5515.namprd12.prod.outlook.com (2603:10b6:610:34::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 15:55:55 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:907:0:cafe::36) by MW2PR16CA0020.outlook.office365.com (2603:10b6:907::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.37 via Frontend Transport; Wed, 7 Feb 2024 15:55:54 +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 MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 15:55:54 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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, 7 Feb 2024 07:55:42 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 7 Feb 2024 07:55:41 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Wed, 7 Feb 2024 07:55:40 -0800 From: Michael Baum To: CC: Matan Azrad , Dariusz Sosnowski , Raslan Darawsheh , Viacheslav Ovsiienko , Ori Kam , Suanming Mou Subject: [PATCH v2 1/7] common/mlx5: remove enum value duplication Date: Wed, 7 Feb 2024 17:55:27 +0200 Message-ID: <20240207155533.1582031-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240207155533.1582031-1-michaelba@nvidia.com> References: <20240206143950.1499532-1-michaelba@nvidia.com> <20240207155533.1582031-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E3:EE_|CH2PR12MB5515:EE_ X-MS-Office365-Filtering-Correlation-Id: 31920eb9-e9f4-45aa-37c8-08dc27f54439 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TpiirAkl2s2tEPZZDuYi7ATRjgaEtM0sAeXII0HEvEn3TfF5aVcgth40z9UesB9rwrMuF5/G+mzoaKJXFdZPDt7+eLJnM9rxLEUtR9U9GzJ2vPajB/tdjM4kIQ1ITVETRFvVGeJKduIUW5N1zfUi7law6W8EV70Wrm/UWXD1SuaXggpN5Wcbz7KvT4shcSXgl+E03kDN39tH0Q3FZeEYvHpB8Q+2133/StjDPoyp866kyrypaQfopP0/t9U9oZNvSQpHlR2kelEmJgYLOByeQO/sQbZK+ZeHUl2YiHDk5UV7nCI5v/V8tpwIs6U9hBPRc1ppc/Mib3KDlp0TRzShR6XYRMvbHswek6sMBZzBWcHuXZC6PVckKVFuJZoO2l3afcr7AVJI9BpjJIM/uQTDZhVoSdtG647394r0PYHmtPNEFh5YrlW4ZPRJlCQfh14NYUUNqRi6pWRbXoQAQw449xeZYY8dyzEX6PwlqPKgPD8FQEYmI4pn04JtrvKf62S+JccnbjW1fst43RYBncan3mhrgdnXHUp4oDqTevkbcz1WUcri50J9PH2At6vfIbdLAHFNvI1LR2fLQhyKCQE1cLg9p74FgBhKPYgtdPIB0Xwi8TS/SUol/O/XYQc8/cUEY9nYOBQnHCvv17ezJFJpiR5a9Vlg69bJ7Dz3/k+WxqjTbw6+AFzHo9ST2TWu1YgeNEOheyB/SU+Kpraz6htv2MlmdgcP51LVZiHInoXeJ7agp7Y0uom3BF46OwFgtoUL 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)(396003)(376002)(346002)(39860400002)(230922051799003)(82310400011)(64100799003)(451199024)(186009)(1800799012)(46966006)(36840700001)(40470700004)(47076005)(6286002)(426003)(336012)(1076003)(40460700003)(26005)(107886003)(83380400001)(55016003)(40480700001)(70586007)(41300700001)(5660300002)(54906003)(70206006)(6916009)(2906002)(2616005)(7696005)(86362001)(6666004)(356005)(7636003)(82740400003)(36860700001)(478600001)(4326008)(36756003)(8676002)(316002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 15:55:54.3901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31920eb9-e9f4-45aa-37c8-08dc27f54439 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: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5515 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 The "mlx5_modification_field" enumeration has 2 different fields representing the same value 0x4A. 1. "MLX5_MODI_OUT_IPV6_NEXT_HDR" - specific for IPv6. 2. "MLX5_MODI_OUT_IP_PROTOCOL" - for both IPv4 and IPv6. This patch removes "MLX5_MODI_OUT_IPV6_NEXT_HDR" and replaces all its usages with "MLX5_MODI_OUT_IP_PROTOCOL". Signed-off-by: Michael Baum --- drivers/common/mlx5/mlx5_prm.h | 1 - drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++-- drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 0035a1e616..af16bf4cf6 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -840,7 +840,6 @@ enum mlx5_modification_field { MLX5_MODI_IN_MPLS_LABEL_3, MLX5_MODI_IN_MPLS_LABEL_4, MLX5_MODI_OUT_IP_PROTOCOL = 0x4A, - MLX5_MODI_OUT_IPV6_NEXT_HDR = 0x4A, MLX5_MODI_META_REG_C_8 = 0x8F, MLX5_MODI_META_REG_C_9 = 0x90, MLX5_MODI_META_REG_C_10 = 0x91, diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c index 862ee3e332..2828a82d5b 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -2287,7 +2287,7 @@ mlx5dr_action_create_pop_ipv6_route_ext_mhdr3(struct mlx5dr_action *action) MLX5_SET(copy_action_in, cmd, length, 8); MLX5_SET(copy_action_in, cmd, src_offset, 24); MLX5_SET(copy_action_in, cmd, src_field, mod_id); - MLX5_SET(copy_action_in, cmd, dst_field, MLX5_MODI_OUT_IPV6_NEXT_HDR); + MLX5_SET(copy_action_in, cmd, dst_field, MLX5_MODI_OUT_IP_PROTOCOL); pattern.data = (__be64 *)cmd; pattern.sz = sizeof(cmd); @@ -2348,7 +2348,7 @@ mlx5dr_action_create_push_ipv6_route_ext_mhdr1(struct mlx5dr_action *action) /* Set ipv6.protocol to IPPROTO_ROUTING */ MLX5_SET(set_action_in, cmd, action_type, MLX5_MODIFICATION_TYPE_SET); MLX5_SET(set_action_in, cmd, length, 8); - MLX5_SET(set_action_in, cmd, field, MLX5_MODI_OUT_IPV6_NEXT_HDR); + MLX5_SET(set_action_in, cmd, field, MLX5_MODI_OUT_IP_PROTOCOL); MLX5_SET(set_action_in, cmd, data, IPPROTO_ROUTING); pattern.data = (__be64 *)cmd; diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c index a949844d24..513549ff3c 100644 --- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.c +++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.c @@ -67,7 +67,7 @@ bool mlx5dr_pat_require_reparse(__be64 *actions, uint16_t num_of_actions) /* Below fields can change packet structure require a reparse */ if (field == MLX5_MODI_OUT_ETHERTYPE || - field == MLX5_MODI_OUT_IPV6_NEXT_HDR) + field == MLX5_MODI_OUT_IP_PROTOCOL) return true; } -- 2.25.1