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 AB2EEA0501; Sat, 2 Apr 2022 09:12:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9AA6D428A4; Sat, 2 Apr 2022 09:12:44 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2081.outbound.protection.outlook.com [40.107.94.81]) by mails.dpdk.org (Postfix) with ESMTP id D57FE41101 for ; Sat, 2 Apr 2022 09:12:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Txr5LS7DqwAJFGBSsI+WIEEj5Pbo0X+tFcxdzLpz1hkhdS+Ac/nCT83Z3OTVFAUDKrTlYyBwW76hN1LiZ2tLjk6BJvqpEmY8j/htkC+Ca5vDjQdoegvrhOatu0TKHeRC1O9GT+mX8ftqy4jz5RuMTaFV2xHYY36Ojg7NnpvfG1JcTyWIyP6ERAYzRwq8iwFvA3tJ/96VSqcnCH7iSAp5RE/04KlI8Oa5jVGj5JUcD+xLzzkw+K2NVL0zT2HudPLoDdeVRbfjDACyERnolmv8jMmaDa4gGFIEG6PFSe0jrGWCOIoiFIYk0xH8HZeoaeWSHv4Sh0mWFsqKloRar9yLtw== 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=LLsqmdaINKWrxaPbmSPweVQkvMbcfuGo/aJ4RlDOkbY=; b=K7MbqVzuDQiz8sbo4MkfhlRTSIBMFHQ+T9svCx1KjHIIty909kJzqzemmqqwl9DKJLiq4G3lnhdpku9RPxfg49dqZ1UDgfCmgwtiykGmSww4apDkQIE+pLvgwyjB9+y7dPDcfRcg7Da1X5AGrBjgri546VCDwHDKIx5058FYBFIKO16pqQGBZb2966FQ3Xn0g7kfMWtr2tz6ri61tJreId65PDFdKDlefiJ2RCT1GdKiftEtxFjkOA5WZX3jGhpxYV6a0HYvuG4Zl4oIV+0UERhbRGLv/hndaoKMS+oupC3DN80FjC80wWiUQeaGaRcgSsYFvXXHk9kBiIIe2XTF4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com 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=LLsqmdaINKWrxaPbmSPweVQkvMbcfuGo/aJ4RlDOkbY=; b=hiafAb4qfeorU/nzrrB9lBIz+iJyCxw9gFU00WknSHYGlPtZwdG50ZfjIsp1XKsreP5lPeDc279Qn/5XF/CaaLEcJeTgiYfnFRzzypLkunV7vN9hnM9kAbi85m39dCiZHjtv/USA2/ISUEaWzQwzsfvq6JJzxxyHwj3YByJDT19eDxWowOwwlhkaBlHFdJ99oJ5Wg86a3XuKVG8Upj4ivG0uDRQ2AEV21pqyO4jrenqPP5rWPXvqYp9wN4TUbBH9rxkEUbHmm88/i01pV3CkhBZBVPq3PKwa2DqDaJWQN4s/NuJMIA6q9qRWPNIsV12OJGncGrmlHj6GfxScHICaLQ== Received: from DS7PR03CA0183.namprd03.prod.outlook.com (2603:10b6:5:3b6::8) by BYAPR12MB4726.namprd12.prod.outlook.com (2603:10b6:a03:98::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.25; Sat, 2 Apr 2022 07:12:40 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b6:cafe::22) by DS7PR03CA0183.outlook.office365.com (2603:10b6:5:3b6::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.26 via Frontend Transport; Sat, 2 Apr 2022 07:12:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5123.19 via Frontend Transport; Sat, 2 Apr 2022 07:12:39 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Sat, 2 Apr 2022 07:12:11 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Sat, 2 Apr 2022 00:12:08 -0700 From: Sean Zhang To: Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang , "Thomas Monjalon" , Ferruh Yigit , "Andrew Rybchenko" CC: , Jiawei Wang Subject: [v1 1/4] ethdev: add IPv4/IPv6 ECN header rewrite action Date: Sat, 2 Apr 2022 10:11:47 +0300 Message-ID: <20220402071150.9392-2-xiazhang@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220402071150.9392-1-xiazhang@nvidia.com> References: <20220402071150.9392-1-xiazhang@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dfba6c8c-13cb-4801-6ed1-08da14782c60 X-MS-TrafficTypeDiagnostic: BYAPR12MB4726:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L2eFHnkWOgm1O8mTiSUicr+bkcvGwk1dt2sam4oA08ff/HyARb8xfQbIV+jCaeMfcCzQX2hABFyuWsVuds2SeMAZ0qg02hVzdXugGLXogpG+XvgEJlMF/TMsTlh1KVwvk56T9B/IMinjq1e/VST7tXH2PZQnjDupJ1YkBxS64AnfQaHRa3ZlHiCs6/cZhk9DsUCtAX+87/1td6419ca15hOYKf0g30oNMXzaFksKZrYK3jy7UQRB5KaENDXh7qPhZUVJcoaHZVppeZeV3ZzNzeCYCfzEFrVTZNcAyuOxyLg89Xzj2JVVfHPvAxluxmRRIOGYHj5UEtrgl4j+hAL/SemckoNQe3YX2qGkA29GEYUaS5G5dmlUTktEwwaNPxDwWsnXaA55pDGhT7gV8YecxKDNjjDZkrRyyf9VogetDd1dhNniwokBMQ3/IFF0ZkgC+oePtzD+ahlQmcu/cpnRBD2RiLk/9KH1kkitm0grhL6YuLc88Qr4Jo7ERm0Wrv2tlEOzB/LuELtYqJ0vSXoP9etZW+6YX0E6DnUAQ6L7cn1jjki53Ox3zgqUIU+LQb2QUQY8JGbqUUPX5uONcNLudV2gmiC2rEToIl8efaPfgN5avZgL2CVvI3sMjpTDxKh4jAdTvRwhIRIy0lM3gX2C0scQL8ds9Ra6aBbVKcqU1sn8SqfUkXDS+9f8KDn98EhdW5IIAZKMGe2DARRwX0EhJQ== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(426003)(316002)(36860700001)(107886003)(336012)(8676002)(508600001)(36756003)(86362001)(2906002)(47076005)(1076003)(7696005)(4326008)(8936002)(6666004)(83380400001)(82310400004)(186003)(26005)(55016003)(110136005)(2616005)(16526019)(81166007)(54906003)(356005)(70206006)(70586007)(5660300002)(40460700003)(6286002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 07:12:39.8088 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dfba6c8c-13cb-4801-6ed1-08da14782c60 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB4726 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 From: Jiawei Wang This patch introduces the IPv4/IPv6 ECN modify field support, and adds the testpmd CLI commands support. Usage: modify_field op set dst_type ipv4_ecn src_type ... For example: flow create 0 ingress group 1 pattern eth / ipv4 / end actions modify_field op set dst_type ipv4_ecn src_type value src_value 0x03 width 2 / queue index 0 / end Signed-off-by: Jiawei Wang --- app/test-pmd/cmdline_flow.c | 3 ++- lib/ethdev/rte_flow.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index fc4a6d9cca..3250add834 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -795,7 +795,8 @@ static const char *const modify_field_ids[] = { "tcp_seq_num", "tcp_ack_num", "tcp_flags", "udp_port_src", "udp_port_dst", "vxlan_vni", "geneve_vni", "gtp_teid", - "tag", "mark", "meta", "pointer", "value", NULL + "tag", "mark", "meta", "pointer", "value", + "ipv4_ecn", "ipv6_ecn", NULL }; /** Maximum number of subsequent tokens and arguments on the stack. */ diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index d8827dd184..1b56f23cba 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3690,6 +3690,8 @@ enum rte_flow_field_id { RTE_FLOW_FIELD_META, /**< Metadata value. */ RTE_FLOW_FIELD_POINTER, /**< Memory pointer. */ RTE_FLOW_FIELD_VALUE, /**< Immediate value. */ + RTE_FLOW_FIELD_IPV4_ECN, /**< IPv4 ECN. */ + RTE_FLOW_FIELD_IPV6_ECN, /**< IPv6 ECN. */ }; /** -- 2.31.1