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 E1CD6424B9; Mon, 30 Jan 2023 05:01:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0AA642F82; Mon, 30 Jan 2023 05:00:35 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2052.outbound.protection.outlook.com [40.107.243.52]) by mails.dpdk.org (Postfix) with ESMTP id B1E6742D51 for ; Mon, 30 Jan 2023 05:00:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQVcYHxMFmn0jD3o+4SpMaLgBmGvFOtPZDzv5NklseO1i52Aj9Gesv236VyZzNCXC5TDIMgHfdBgJsN95GxuryeVh+58ygEOgQj0StNUZq6wQq5GKQ4msCpH4eNglC1JLDF2IEJBDeTHB9YwM9aNtJwqvsPF/7ETuW0qPMmJR/bg6kLdJ65Z1bk9MrVQUnryOCBISEIgdY5hEjwa6QSwzs4AtBJSpBpF/NnLfkQMLLgBmd6M5yah+CZCaK6GQ7i4i9nYDi0sWoywc92eYzOAbK99g6Dsm+oCn7MzZsz8uxQtvyGOiLfG0txB76Rcg666u6q9sz5GIpCAcIOPXIyJqw== 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=/NzXuyLcjq0Von5kjldAVfgWF0Zv+2sWCD74htGO3nM=; b=Tb82T7O0l3gPJWxLp/V9oMFucLeO1POeLgvln1n2KuAfh7x+4uWGHKLIWsbKNpkOIlaBeqV+aPhflJPSzzjEdUmSDzAPbDTiW3kX6NXQehpBrF40kzkIU8LQaT67v3Lxwo/kIdUwLqlKmtVDcf78yMhCzALpowAOabGPptFZQpkbHRmkhAyvLMYfrGD+m62+kNPx16c6MCNyoRiM6E2A6iyR1sHm3GlP4mPxGBsxZBO4266SObvjsPTxs0MUeiUkPJ3i4UEflQ7RufJQoJgDrJOHon2vVVMnvU/EDp4j/EATth/6rA1+X/zvFfxFiIovBZfZk3jqZCPOGguYvuy8bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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=/NzXuyLcjq0Von5kjldAVfgWF0Zv+2sWCD74htGO3nM=; b=c4F0igStfK4ar1S9v67UTZVtcJqFJBsyHJbQdrZYbnknBXrNhQ6ZoiJwCuVq9XCfrijWL7HRebcciTBBeMRmOpgOKOKdUaz5dwNgsme4Ci4RJ0iPIEVMb6dt09Or7fdOA2tXCIlLaCIh12O3w0WHQts7cxlcXa1n4l8frecEI+5cPCFM8BPI+r3z75RJKU0BzyB/uIl1VO664LcLNn63p3NE/gLJ7VFrtSk4Hwm9MhFwg8brap3W4UcYs0GRT2WsXhKTkf1zEThOK7hYyyexb3YxfcFA79vNJxtJdfQ9NC9Bld9cSEWVGlDPWWP9WbW+U2zCPaT37Swo2DZ4odyscw== Received: from CY5PR17CA0037.namprd17.prod.outlook.com (2603:10b6:930:12::16) by MN0PR12MB6200.namprd12.prod.outlook.com (2603:10b6:208:3c3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Mon, 30 Jan 2023 04:00:32 +0000 Received: from CY4PEPF0000C968.namprd02.prod.outlook.com (2603:10b6:930:12:cafe::a) by CY5PR17CA0037.outlook.office365.com (2603:10b6:930:12::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36 via Frontend Transport; Mon, 30 Jan 2023 04:00:32 +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 CY4PEPF0000C968.mail.protection.outlook.com (10.167.241.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.17 via Frontend Transport; Mon, 30 Jan 2023 04:00:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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.36; Sun, 29 Jan 2023 20:00:15 -0800 Received: from nvidia.com (10.126.230.37) 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.36; Sun, 29 Jan 2023 20:00:13 -0800 From: Rongwei Liu To: , , , CC: , Subject: [PATCH v3 7/8] net/mlx5: add modify IPv6 protocol implementation Date: Mon, 30 Jan 2023 05:59:39 +0200 Message-ID: <20230130035941.1495874-8-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230130035941.1495874-1-rongweil@nvidia.com> References: <5da6632a-0976-dc1f-facb-f778c8aad8e6@oktetlabs.ru> <20230130035941.1495874-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: CY4PEPF0000C968:EE_|MN0PR12MB6200:EE_ X-MS-Office365-Filtering-Correlation-Id: fb07c9f3-cc39-4998-0133-08db0276884f 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: h1qHEcKORGwJzhA9GVhgNm5TC7ELxxRxLxssyLHO6x1uTlRRRHNnKLnD0VdK16Ov7K1Qq2rVOWbf96fxPPi4xGhJzmg51368CXJKRJhfGyO2KJ0YtFroQ2+cofoT9WGt6t6oI50tcmoD8b8crUpclw5ZPTWP+aite62h0BTyYDh2guokriZjYWXb80oxSEhTE+P18P7MMGbrNricV87eRTMZI+ydopPS40uuci5cDwJ8hryym8KNN8MNBBTp7Qevj9yMGa9ASrha79k2d7MzZA3ObVzRDz8zcWr/J3O5/VzZGw8PS6+wuNnWqx9kmFkFPlwbIOFhEiIU5Ha7iHpanGHk0nSu7JAsYULRJ0pgfYv1Do3nildswQnvW4UcHgVwc3ZkpjzzGU0YQ37YNgnt68CaiBRb+uINr8B/OJWF6crPTBV3iGtYFqWWmZyqQt4uTXdBftySukMg75ffXZJ3M2Ud3ecM65/KBNndT5YVfTECx5i+SA7kzx6fN68tUX3fDQ++S0eTo6teB/L6PePO/AQ6IE+lFodzaTMh4nFgPo1kIxvd8Yy9uRM+ZfcwEn3ANBPyp/zmUv6gByaodIkiyTWTmlYvvlCrNhCYEeeEFS144SCCKsrSvhudZhgPbq1zod7ZABglY3Md7zdtAIFTnQuBQBLY9T83bPxN+K43jqOv7nHqrGS3Av+gYlt2kqupSynEa2NLgXMQAKqnIhYuTQ== 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:(13230025)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199018)(36840700001)(40470700004)(46966006)(2906002)(5660300002)(40480700001)(36756003)(82740400003)(16526019)(2616005)(186003)(26005)(6286002)(7636003)(36860700001)(47076005)(426003)(83380400001)(336012)(70206006)(86362001)(8676002)(4326008)(70586007)(54906003)(316002)(110136005)(8936002)(41300700001)(55016003)(6666004)(107886003)(40460700003)(1076003)(356005)(7696005)(478600001)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 04:00:31.8238 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb07c9f3-cc39-4998-0133-08db0276884f 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: CY4PEPF0000C968.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6200 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 Add HWS modify IPv6 protocol implementation. Signed-off-by: Rongwei Liu Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index ce6cd98fd7..497f2622b2 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -759,6 +759,7 @@ enum mlx5_modification_field { MLX5_MODI_OUT_IP_ECN = 0x73, MLX5_MODI_TUNNEL_HDR_DW_1 = 0x75, MLX5_MODI_GTPU_FIRST_EXT_DW_0 = 0x76, + MLX5_MODI_OUT_IPV6_NEXT_HDR = 0x4A, }; /* Total number of metadata reg_c's. */ diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 7ca909999b..e972a2dc5a 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1357,6 +1357,7 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev, case RTE_FLOW_FIELD_IPV6_DSCP: return 6; case RTE_FLOW_FIELD_IPV6_HOPLIMIT: + case RTE_FLOW_FIELD_IPV6_PROTO: return 8; case RTE_FLOW_FIELD_IPV6_SRC: case RTE_FLOW_FIELD_IPV6_DST: @@ -1883,6 +1884,15 @@ mlx5_flow_field_id_to_modify_info info[idx].offset = data->offset; } break; + case RTE_FLOW_FIELD_IPV6_PROTO: + MLX5_ASSERT(data->offset + width <= 8); + off_be = 8 - (data->offset + width); + info[idx] = (struct field_modify_info){1, 0, MLX5_MODI_OUT_IPV6_NEXT_HDR}; + if (mask) + mask[idx] = flow_modify_info_mask_8(width, off_be); + else + info[idx].offset = off_be; + break; case RTE_FLOW_FIELD_POINTER: case RTE_FLOW_FIELD_VALUE: default: -- 2.27.0