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 451A943BED; Mon, 26 Feb 2024 14:46:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3276442E62; Mon, 26 Feb 2024 14:46:31 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) by mails.dpdk.org (Postfix) with ESMTP id 8F8C542E50 for ; Mon, 26 Feb 2024 14:46:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XD93hWyLOLj40+zsSPg5yiut0pmuSxTYdLUdus8sdAM6ys6Blc8gF8cNH6+2t6BN9qEaH5CHXuXGYzXFhkWXKrsp9cPpYyj7IScm83WNE/t6eSaehdFzfYxO3AMqudvv5GGYVyaEVFQfsLlN3EDRuX7cyIYjHLSXRP2wJOypc6ZDXIi+wb6skEvsluYznj/R6ZsmI3Lg9zkxoxh0AmkNzAKVNVXqyra2ZT92y7+06/AE1G/CXvZF4iK/OQV/P+IgAX9CJNzULs/TkL1qB8RYHGMRpj+YYQgpkDSzNnfarIQ4sobJ9miR3Z3+y+mvPk4I84Yx0bWpk6Pj2sAxNic1cg== 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=ru8nfI0O5omW7xIMk+6BKLnMfTXzbwO9hK8kSvH4YUQ=; b=KwGxumMYszEczbhUQwO3vQaxDMfYD1nrJlhciHu8U2HO/0quVAF/H5ZGoxXkKSR4BTX89c5Gkgjn/HusdBwBD14jpJNPF/s/l01gIxqkAgMu71Ns6Oa34bGYoAAciSk/bKYqjn46prqPz8UTsGx602ZaNlt4+hdPZb8bJ8+87u4a2MDRKGKS60a8YFnJ0rY/5uCEoYpuS9H3/kxkv+L6NqL5g7aK2dih9cCie4svazipfrg0iYTekmzNt4GXa8VKWUDH1RkpAktTZGxQlY6js8+PQ+OBAYf6uubS/LUMJfAqqCII1AJChNeZ17tLlnmjiI8vDt7RJeSz9jVNgeh+0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=ru8nfI0O5omW7xIMk+6BKLnMfTXzbwO9hK8kSvH4YUQ=; b=n/AZujiSyaDTk/AyG2qJxEYXCJONfV6r11/nPmvKpqWkBLR7YX4Q7acxHcgCqDy6ClA5UtKniValX3sf3tUTUav2a1ZS5Lp/ai/HG+YVFv9L0GbqZKpG55DaaXFRKrmxc/jpqWX55nZuu+XnKwfksUISCBhE2/SWIszsRYaVO8w0I50IJgIBJH8jEXLDOlZ16/aVtXWJ+S7LiwchTFwrPqxX2Yen3xm0p+8g2RaRh1xv5I+vf8pFutix1l+KoFHfpEcnDFZ+iCsXDrdVUnAYumnf850TwK+4iLTDf0ymWBp6qrmmHAre8+eKNpZpeio7IcRdBtcVfAKDNDQ7Svra3Q== Received: from CH2PR08CA0018.namprd08.prod.outlook.com (2603:10b6:610:5a::28) by CH0PR12MB5266.namprd12.prod.outlook.com (2603:10b6:610:d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.34; Mon, 26 Feb 2024 13:46:22 +0000 Received: from DS2PEPF00003442.namprd04.prod.outlook.com (2603:10b6:610:5a:cafe::4c) by CH2PR08CA0018.outlook.office365.com (2603:10b6:610:5a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.49 via Frontend Transport; Mon, 26 Feb 2024 13:46:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS2PEPF00003442.mail.protection.outlook.com (10.167.17.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Mon, 26 Feb 2024 13:46:22 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 26 Feb 2024 05:46:08 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.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; Mon, 26 Feb 2024 05:46:07 -0800 Received: from nvidia.com (10.127.8.13) by mail.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.1258.12 via Frontend Transport; Mon, 26 Feb 2024 05:46:05 -0800 From: Michael Baum To: CC: Matan Azrad , Dariusz Sosnowski , Raslan Darawsheh , Viacheslav Ovsiienko , Ori Kam , Suanming Mou Subject: [PATCH v3 1/7] common/mlx5: remove enum value duplication Date: Mon, 26 Feb 2024 15:45:50 +0200 Message-ID: <20240226134556.2985054-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226134556.2985054-1-michaelba@nvidia.com> References: <20240207155533.1582031-1-michaelba@nvidia.com> <20240226134556.2985054-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: DS2PEPF00003442:EE_|CH0PR12MB5266:EE_ X-MS-Office365-Filtering-Correlation-Id: 4bb34a0f-c8d9-4723-7c1e-08dc36d15197 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3AEmehoxBUnAerHmwklMTE/WX1HS8y45iEsC5jQQVu4O7SvTStHs9ZfLu0LT7uZrRlpI3n3eZ6//SDCjqj+/zbgDVkm5gGaO9+eYlNPxfvhycyG/aj5uqkhi13e5ktPlM47ZktJfpPTQFnuJNO+NUQydcwU3B1OQcgOluwyPjOfx0KyfaTYyK6RC7FUaKl7PdWN5hEPd1hZAHhrgdxzOFmZT2oQFVoJ8C/IxWZvUrMACIVLuUeoYx5e+PMWpjeJMg0dE7zRU9GJvkEmAbFjvUYk38SLnhYfW6cprVB65h4IVra04yBQFtMDu7lhH1ciybeASjVoOJXRYUmcilwBIrkp+kz6KiMVjXSMh2Vi3tCdhL5KBrUr4zYmz8I8zYORCrgObiTxEji2VSYrILdQlJ0FAaqXthtMm9zsh9MfBnACwF4HuICIbHSLs2BCoM0kIaNrU758IAe2tmZdqCjky1s14+lulYufN3qmoGRoGfFGEC+2kesOY8a3svxnjKm/315YyHY9ARUKY9PF9yDedqZBKH1lyvgwqJlQ2wAFyhRY97uMJuNE3dTkC5B/Htj2SVE6p4Jbuupc4Fu44i0LW/t+/smp8DXQgCP03p9HVvsYB4MsIYHQoAy8ATvHTop4FKZlyGsVnBbNWErOUlIw6m3LPMX9RjMcXibeZvXzyNMWNEeQbxwYJgRIyEFG+6EWnGXKg681pMctk699xrfTTNeO3Ix/33jP+ujg9DdWv2RIIVLSU+pz8O96UnNnnmKvA X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 13:46:22.2058 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4bb34a0f-c8d9-4723-7c1e-08dc36d15197 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003442.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5266 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 Acked-by: Dariusz Sosnowski --- 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 282e59e52c..6a8cb7a8aa 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 f55069c675..631763dee0 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -2291,7 +2291,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); @@ -2352,7 +2352,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