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 CB9A343A3A; Tue, 6 Feb 2024 15:41:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4929F42D2E; Tue, 6 Feb 2024 15:40:36 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2041.outbound.protection.outlook.com [40.107.237.41]) by mails.dpdk.org (Postfix) with ESMTP id 9E1B642C24 for ; Tue, 6 Feb 2024 15:40:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dg1tguTkjsAUHeEpQOnIhS2Gh4o6QBeiiVn5SaqTZxezTdxaBeYT5ylBpP46vrfW4x+zbHfGd9wyGe+FLZQpmoCZ04Qa5SvYt6rqL9kjt5t5q2JDp7VL4zHwMUPHwbzw2fC8RCTqe52L3R6hP2gqfu042axmyHmSeoATJR5yxBpH9ajLpk1Ew8Se9v/ayU0ebNfQD0z8pY7bV914vTBHUTs34cUvwzBFvJFvJaschyKb+m1CVRA5sUlJcWItuX8USjqyj/y/QLlqrR3fms7um4zOKWkLWQDz9YNJfrnJ0fon0a0i4DiAnmUAPZjD57m54lHV86GIWTViOYdiIIj5ZQ== 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=NPKILEXOfqjJmNqBYU5IBcRVY/hGAafA0+FZJV17e3Y=; b=LQvP9Jh+7/7XuUxx2/EhYZytjFmN1Ic8guTrPYqA/jV8Zyt5eP6IWdyoZdFm44GHLEh4YofgHuZzPWPqea0nlzF7YF+16PaLIBPwblTAWPGRHtkM/zvLmpQPUW9q1+5n2yJYpokI7TIZLrZ+vK4Et/oycqo8Kpq3yAV4qJScpocTU82wB/5SUTcR5dOkZR/cIJKoaKNuEId8QEOUscPyMMfvgbe1HxEl/M9XUgQwrUOzXReq6iYQ8D5w2+4aid1YD169P+p9Dze3BffDxXXzzZ6WRlallCwxQMDdNIuTiEMNNPJwWwYy6vKqJ1Y0oJ3PngZtCiOcNQuRJH2bsvrkNw== 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=NPKILEXOfqjJmNqBYU5IBcRVY/hGAafA0+FZJV17e3Y=; b=eZTqKTCG8EKYhqmAFnD3HfMDZT53DpeSZESfF81r7d//bK20OSpMh9B/MxYday5JuJAyJn9FV4PZ29MMNYAlUCf+vco+/zb+0KuyvafSoi8hJE9S/05pVo6NcsfxMOJ5gJuaYnUwxH80na4bgY+eF26d+4VbBZzdacxCfXsliOwEul9Ozuyejwt6C5dmUSIjlWeLbMWE5r1ZbMDk5IjHByXPglFDBK5WTDVhlxActfiDx7yor/+YvRnCM/921ScCJRAkfdqjlzVlxa7yIMt49VhKCjrdCMexLmxuF91voAwCQDA7WRzjIU13sTIEL9IppeWqlJoWnkc+oCs+sE0GZg== Received: from DS7PR03CA0334.namprd03.prod.outlook.com (2603:10b6:8:55::11) by SJ2PR12MB7848.namprd12.prod.outlook.com (2603:10b6:a03:4ca::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.16; Tue, 6 Feb 2024 14:40:28 +0000 Received: from DS2PEPF0000343B.namprd02.prod.outlook.com (2603:10b6:8:55:cafe::c5) by DS7PR03CA0334.outlook.office365.com (2603:10b6:8:55::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Tue, 6 Feb 2024 14:40:28 +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 DS2PEPF0000343B.mail.protection.outlook.com (10.167.18.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Tue, 6 Feb 2024 14:40:28 +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.41; Tue, 6 Feb 2024 06:40:15 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) 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.1258.12; Tue, 6 Feb 2024 06:40:15 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Tue, 6 Feb 2024 06:40:13 -0800 From: Michael Baum To: CC: Matan Azrad , Dariusz Sosnowski , Raslan Darawsheh , Viacheslav Ovsiienko , Ori Kam , Suanming Mou Subject: [PATCH v1 7/7] net/mlx5: support modify IPv6 flow label field Date: Tue, 6 Feb 2024 16:39:50 +0200 Message-ID: <20240206143950.1499532-8-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240206143950.1499532-1-michaelba@nvidia.com> References: <20240206143950.1499532-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: DS2PEPF0000343B:EE_|SJ2PR12MB7848:EE_ X-MS-Office365-Filtering-Correlation-Id: 01fd0d11-0a47-440c-8a24-08dc27219017 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oslBwsMEaGaqlDmqRAVBVOpIB8trrB1t16Y6ekwupRft6KG7jUcP2pysUglFkGuPYaha5VzvAEenC/nKnL3qaorVmP250OuN/W1+7i1hS/u4wKn6rXpCWh4esXEapmcYP2dgYOfpCJLGleNMKpgWKZrD2SIzjnow8+HRze0AvgCLL0Y+aV1C2XRgorSmUzTo7g82ulDSrG0Rqma6SrlsfJVsn8OAduvMEfrOQ26W7D6ATN6SX1yziRO+zuITXMuzrp0b3IkSih4nINSfBYXupVPi4R2qelaKevg1ZtvofkllXf4UDOvHLWR+c4RAbnaqmz51H3ydomBWwqH5PvPjdDcQqR8bi4OxEkMJX6oN1IAjVvVaWQ9i9Dik4eaNLn108WGv5luVmMXNAmV5astoeHBJsqKL0ZcPN+A/42dZV2eoBjnz2JJg4QJOlyLdagffYDq5G6k/57tOIH+ow9ZeQ1KpACjZYywFDz+rB4YRKgcxHy+RC6XgTVyM1fMYGXgqydCSHjiSexooNwRAjXTNDKLuLE0h9VAftX83nrXdwQypVQr/T4UpafY/6rH4N4oDydXCd7LEps1mP/e8N1pc4AxPmskyO0Toc7a+fxqDrdhEv0LxFSPWCMv063yOUrKMIxdhFzNUu9wNOxEU+rVdsvSODkHDQS7sKK0w2RJQjkpufv9dVGUmoZalboMZNk1tbMOxORAfY/QAY/kgQG0aa9/89ldWMY7YDsQEqrvIYygifPW9Vl68YqXEUl5XbEFL 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)(4636009)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(1800799012)(82310400011)(451199024)(64100799003)(186009)(40470700004)(36840700001)(46966006)(82740400003)(2906002)(40480700001)(7636003)(356005)(36860700001)(40460700003)(83380400001)(86362001)(55016003)(2616005)(6286002)(47076005)(1076003)(26005)(426003)(336012)(107886003)(8936002)(6916009)(316002)(36756003)(5660300002)(478600001)(7696005)(6666004)(4326008)(70206006)(54906003)(70586007)(8676002)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 14:40:28.3227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 01fd0d11-0a47-440c-8a24-08dc27219017 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: DS2PEPF0000343B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7848 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 HW steering support for IPv6 flow label field modification. Copy from inner IPv6 flow label field is also supported using "level=2". Signed-off-by: Michael Baum --- doc/guides/rel_notes/release_24_03.rst | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++++ drivers/net/mlx5/mlx5_flow_hw.c | 1 + 3 files changed, 14 insertions(+) diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 272bc9d056..4cb45ba439 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -101,6 +101,7 @@ New Features * Added HW steering support for modify field ``RTE_FLOW_FIELD_ESP_SEQ_NUM`` flow action. * Added HW steering support for modify field ``RTE_FLOW_FIELD_ESP_PROTO`` flow action. * Added HW steering support for modify field ``RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS`` flow action. + * Added HW steering support for modify field ``RTE_FLOW_FIELD_IPV6_FLOW_LABEL`` flow action. Removed Items diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 90ef21d75b..418e0c0998 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1394,6 +1394,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev, return 32; case RTE_FLOW_FIELD_IPV6_DSCP: return 6; + case RTE_FLOW_FIELD_IPV6_FLOW_LABEL: + return 20; case RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS: case RTE_FLOW_FIELD_IPV6_HOPLIMIT: case RTE_FLOW_FIELD_IPV6_PROTO: @@ -1806,6 +1808,16 @@ mlx5_flow_field_id_to_modify_info else info[idx].offset = off_be; break; + case RTE_FLOW_FIELD_IPV6_FLOW_LABEL: + MLX5_ASSERT(data->offset + width <= 20); + off_be = 20 - (data->offset + width); + modi_id = CALC_MODI_ID(IPV6_FLOW_LABEL, data->level); + info[idx] = (struct field_modify_info){4, 0, modi_id}; + if (mask) + mask[idx] = flow_modify_info_mask_32(width, off_be); + else + info[idx].offset = off_be; + break; case RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN: MLX5_ASSERT(data->offset + width <= 16); off_be = 16 - (data->offset + width); diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 90e3cf2555..90a06e7b44 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -5059,6 +5059,7 @@ flow_hw_validate_modify_field_level(const struct rte_flow_action_modify_data *da case RTE_FLOW_FIELD_IPV4_SRC: case RTE_FLOW_FIELD_IPV4_DST: case RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS: + case RTE_FLOW_FIELD_IPV6_FLOW_LABEL: case RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN: case RTE_FLOW_FIELD_IPV6_HOPLIMIT: case RTE_FLOW_FIELD_IPV6_SRC: -- 2.25.1