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 71634423CB; Thu, 19 Jan 2023 04:12:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA70942D98; Thu, 19 Jan 2023 04:12:32 +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 CB73242D93 for ; Thu, 19 Jan 2023 04:12:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kxfhvdu2HF+3l+zj8x5LZMDtPg7SkACLLS0rHjR2jvgUMqfHin7ZObREyoqidto9b1XpkhYYK0hw5E01OSPrZr2cdjvjP7K97wJx68zoOUAZ0GAmATweLr9DBFghELFTQbjzSWdxkrdFtDVlguK1Hk68MB+cOX/8rKBOf5nmn7yUo2m1W4uKR7VCIyv26I9ZRUV1TgCtbcvzGBI2qurQRWRNkXUU29mHUh4ptLjrEaoigZKz+eScr3+w8Fixh1Eie6W1OsDqcCfOEoczSbCvYh7w3FG0UHxIFVemWcAO9LJT2eh89EInBqviknM0iLcu0zt1fTwy/0rnlQiu2tU3Jw== 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=cdfAdW9QPdiF7cKsNTb3x6NGERUHbc94Py/8cGWJqzFrGWFNJ3DkScEqqKyfT6o18ZBL3HYrplfTpOqnx41Yocfp0J0Vk5vQodMq2BgBS5huN0TQfGONrjgGIzejvvNVes26M1CMPLCN+IaulyUFqGbIoFKIQv2gPrYL+/ZMJygrI8JZ5DCkN1yBfJCJFtr0oUcsqo0Xqi4KjCg05S70fTPVTMuacv4Qcjg7OdXXVs/I4PH8ZO2r/YU5ZlCqr3PBrO5GZdMAD6tqrUjRXUO6GUle0/6gNODWU9oIMwEh85EF4Fmn1Xf5u6+BY6lLa8SHxBq7NdFW5dEVF6ZtxM2MyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=EFSZUJyThHPnbKpy8v2AoduKBl+SDikG0jn3S4aGtB4dx9uBEOj3BgP6S/ch6hKrmdAqvnAGI4uYSN6NGbjOC00eT72u8jqm4oEber67Lz6ZdIcUR5FsQ85ZHY9ZwjHCI//vmJN+uTxDBN2rQ3VDHN0b2fAvd/F+d8hZmE9UwcvmF0lqf+8QQ7slNx+hC4R6TlobArzEVgXJoJN5uSOzVm/BFLm3iewyEHNZFQkWTSgoovHgHMFnU8FHfGGoKzyvGU4DKBEYYWFSNpI+9pJRAxMaIIUxGqzxZm9RVm95tMABfzIWt9t/hWsQmi4r9vpgC3hbm+vQnZ0Thj/6qAnS2A== Received: from BN9P222CA0004.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::9) by CH2PR12MB4905.namprd12.prod.outlook.com (2603:10b6:610:64::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Thu, 19 Jan 2023 03:12:28 +0000 Received: from BN8NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10c:cafe::6e) by BN9P222CA0004.outlook.office365.com (2603:10b6:408:10c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Thu, 19 Jan 2023 03:12:28 +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 BN8NAM11FT063.mail.protection.outlook.com (10.13.177.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24 via Frontend Transport; Thu, 19 Jan 2023 03:12:27 +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.36; Wed, 18 Jan 2023 19:12:14 -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; Wed, 18 Jan 2023 19:12:12 -0800 From: Rongwei Liu To: , , , CC: , Subject: [PATCH v2 7/8] net/mlx5: add modify IPv6 protocol implementation Date: Thu, 19 Jan 2023 05:11:38 +0200 Message-ID: <20230119031139.621217-8-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230119031139.621217-1-rongweil@nvidia.com> References: <20221221084304.3680690-2-rongweil@nvidia.com> <20230119031139.621217-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: BN8NAM11FT063:EE_|CH2PR12MB4905:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b54b67f-b770-4992-38d2-08daf9cafec6 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: QgBvBUXsVRso+qPSjMlOzNjF8OJlND8RgHsn2yhYY76yp8qvLO92/DlYozGAXHw0cH+Cv0BzFVMbgrvbf/R8WLS0I9WekRkSIuyKwWyAMHhbTtzl4LO5POe9NF6C6V3k1XVofW7UPsk2nHJ6/CeCLHjWX7MrxAyh6yxor+LebTKE6JbvGOdTpajgEt96fKwl7SnSiYgdK0Ksg3mhLtEOfR85lWvDaLMfEbc6NfwZKTidK5mboRbqI5ZX+1cpxhkduwQcuTWAT2NHxnwa+nDXgjYFOpPDg84Fmk9XqR8Lh8AqctqenUaFtrBj1jBW2WgZ9TpFo1m67rQGQhOj5ObAFsjYuwxhRPdeKN5y/YGfqZE37XwnMqQ6nC1h6tWVGwL2ybHX++B/OJ1OBN81VwzEWOS4nBQvqVFF8Bz3MIh85WVaBMruWwLc6vx3emT2gVx0gZYjzSlVDJ02x3lDjiah7qzhuLAG2JNiJjGWP2QgBC69ZFFMskVo5Zjg+pTq4qxxRwysO4MTJSFrGDCiyos45EghBSd55yeNNUfq3PgT/MyGvHM+J9yjQWlzTwmb0nEPGdtqKZ9Eq8qRFiM6TU8IRdzrPfoMBhTYe4pDnGkyWGeWnkOajhwXno26JvcutJ1mSm8yU/r/Air8GeTCHJDZh3owKAme1lnifN0YTUMN+vvcLZqNY8aStSHf3qpAWfq9xFoO2ww94LuVm2e4BFQdzQ== 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:(13230022)(4636009)(136003)(376002)(396003)(39860400002)(346002)(451199015)(46966006)(40470700004)(36840700001)(2906002)(478600001)(336012)(1076003)(86362001)(36860700001)(7696005)(5660300002)(8936002)(41300700001)(36756003)(70586007)(4326008)(70206006)(8676002)(83380400001)(82310400005)(426003)(6666004)(107886003)(26005)(7636003)(6286002)(186003)(16526019)(40460700003)(82740400003)(2616005)(55016003)(356005)(316002)(47076005)(54906003)(40480700001)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 03:12:27.7428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b54b67f-b770-4992-38d2-08daf9cafec6 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: BN8NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4905 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