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 29D7BA00C2; Thu, 30 Dec 2021 04:08:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A877940151; Thu, 30 Dec 2021 04:08:40 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2070.outbound.protection.outlook.com [40.107.244.70]) by mails.dpdk.org (Postfix) with ESMTP id 3D24440040 for ; Thu, 30 Dec 2021 04:08:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EJRPvLM8j4YrBQBmOURRKbdEc7cPFkfQ1VVkzR4xxmyuimOqx8l/F6dubdU0M10NEcOoy+YgaX6yu7QW4EZS3yTuuas+lHk1BpOezdXGQ4KJ5mZmXr8/dcMr0kJNWPn03egXpHtMUPCLZkY4AJ8S3jt4qt7NGTXJbAcksin2E2U2SF/163a45jd2JWNRC++z1mbuxOqnEc7Bwj1sdDcLJBNPmYdbE6G6oz+UDGqoBKFhCXxCQ1r93R08A7GAbu6mxtl4YzmuE3xji+ySvkYWx+vTqB5bCYHbzV4XwQppTFMKIx9YXguoPVAxEZeibScnBkjlt+oPVj5HfP8+yPPEwQ== 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=wu/EWCeX+saSa25Vyh8YUcbOoXMH6AmDduNlzCSh8cQ=; b=Um4+qBjyvMefp0AxHzDwfP/DWk2hUdX7QCysqGbu4rsdZ9aoCTWFolJchYgT4SBL4BQa2xiKj4XZPVCM+FllPbXyGvqOJBYw+ViTxlBkt75WAdcmE27XmBi5DqrEw1/MQyzlLq5xtkDCY8GesYFJ92ZsOkmMefe0RDj2/+392oMEqJ5qrQL3uN8RmRilb4WlcO3ZhsPZtyPskemesQwn4aF6W0CDaGq/KcG2IO32JEdxxdUrVDhmfLSU+zXLQdb8pEWhlMwSOvM2yWEvCCWW+hQ6thVU/+4LfqlnoR30ZfWtSbOcVyDGq1Q2rmruuXFhVvtGqRmCBVEcf4JCxEt3wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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 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=wu/EWCeX+saSa25Vyh8YUcbOoXMH6AmDduNlzCSh8cQ=; b=ZBkKtNM5bkHBHtbkMMF5n4aX4wlUAOeJW4jCi0Bcx4iHq/SAPKDcq/6ICMrO8V6oLXEwzQ1Vp+fsIsifhepJI4O5/3X/QzMdmjC1NAncqbofluWsH2LjUrMXOTBgm41jAW/1tOvyFti1KhYST4uxWbzzntFjO3TtPxSLn2kMcxcDV01qrMADd2weoeXg/O9u8cBIYOGUZMfeCn1M+k63CH60eId5lf+XD6ic+hVRnVslk+uMNGvl/sXzfe+NUxEThqemEHjHCNC5F1siQvK4JkilD3/xHZWlcIstIAhzDi/2MdCC/MZg0pkrHH7jvw8tdFPvilvzB/nMP3ASpB3uQg== Received: from BN6PR22CA0033.namprd22.prod.outlook.com (2603:10b6:404:37::19) by BYAPR12MB3175.namprd12.prod.outlook.com (2603:10b6:a03:13a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.21; Thu, 30 Dec 2021 03:08:36 +0000 Received: from BN8NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:404:37:cafe::5c) by BN6PR22CA0033.outlook.office365.com (2603:10b6:404:37::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.14 via Frontend Transport; Thu, 30 Dec 2021 03:08:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT017.mail.protection.outlook.com (10.13.177.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4844.14 via Frontend Transport; Thu, 30 Dec 2021 03:08:36 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 30 Dec 2021 03:08:35 +0000 Received: from nvidia.com (172.20.187.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Wed, 29 Dec 2021 19:08:33 -0800 From: Sean Zhang To: , CC: , Subject: [RFC 0/3] Add support for GRE optional fields matching Date: Thu, 30 Dec 2021 05:08:14 +0200 Message-ID: <20211230030817.15264-1-xiazhang@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8f3c65fe-89d1-48b8-5957-08d9cb41abad X-MS-TrafficTypeDiagnostic: BYAPR12MB3175:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oE4obMk4ds4o5ucsYBw4+2r/Lx8feNI3dSiEjjehQMFqCLsopXGRdnedQuUedCmRY6nJBEjrY9DZbhJz8cbecUPGtPleKhFzmVT0qmkGIWbcykFnPwggwR7lbzRqSUHwAiHmAdvMlH5/EJZzxE42CG/IC63ltT4YCmivUA31y9I/IbyKPd7WiTaNjvoLYB1u7vu9+5WhW75l64D2FKs6L+IGX/TQ2XlMOnLKGSfYK77k1kqL86lcKxLqZqMuJMat0VmKbQKkWJrxI327wbCuHNmaHNCU5WgUZvKxzGDTihY2LOEUgqGyOmPVICf9w1l7jl/G7kttYnx7uFqHsPwM8nQsOZgHX4WyA1q6Th8UrnIjEaK+RtgNMHPGx+L8Jn9nFKl6X+K5LXWrcKKYYKpvYPH/D2UhqJ34UaNwR5zzksHNpblH4bwXGCE6yfF7JK1myWnkWdqjwZ/1UnqnSIZDOLbx0KloUAONf/WQCXBGGHfQCtguoL2Mp0sbraLEmE2v5O6efpymdYlAQNeYgm+vnpsjjAP0ea6U+g+8/CHU/BQYy+7PhV8QU4MI2LE+0zDnvsWiwTFx//ajtmwaM0lRCf2PQOh9LhlqTCuyHW6AaMShgRQE5pV/OEiZ8kbb96dbFHNgNaamvIYckKv0LaxslPau1KCFDxVl4SyMOhPznjuVP8FXvE3j5++pbHu84oV3dfAs5c/KTZp5Lisy7lLt/nUA1rWu0vm47zCk62RkLA0WSKcuWEp3dyG5/rsUI9uF8MApJTJ3Z2UZ0866Vg0/0fuYCux4y1YdX68uvr1U4VA= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(40470700002)(508600001)(7696005)(1076003)(82310400004)(16526019)(55016003)(81166007)(110136005)(8936002)(36756003)(6636002)(40460700001)(70206006)(86362001)(36860700001)(356005)(4326008)(8676002)(5660300002)(6666004)(2616005)(47076005)(54906003)(316002)(186003)(2906002)(426003)(6286002)(336012)(70586007)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Dec 2021 03:08:36.1494 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f3c65fe-89d1-48b8-5957-08d9cb41abad 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3175 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 This patch set adds support for matching optional fields of GRE header. The optional fields are checksum, key and sequence number. Currently, key field is supported with pattern gre_key item '.. / gre / gre_key value is xx / ..' with field gre_key in misc, but misc does not support matching of checksum and sequence number of GRE. To support matching of checksum and sequence number fields in GRE, rdma-core needs the capbility of misc5 and support tunnel_header 0-3. Since tunnel_header1 is used to match checksum, tunnel_header2 for key and tunnel_header3 for sequence by hardware. If checksum and sequence number not present in the pattern, use misc as before for the matching. Application can still use gre_key item 'gre_key value is xx' for key matching, the effect is the same if use 'gre_option key is xx'. If using gre_option item, the flags in gre item should be correspondingly set. For example, if using gre_option to match checksum, the c_bit should be set '1' (.. / gre c_bit is 1 / gre_option checksum is xx / ..). Sean Zhang (3): ethdev: support GRE optional fields app/testpmd: add gre_option item command net/mlx5: support matching on optional fields of GRE app/test-pmd/cmdline_flow.c | 57 ++++++++++++ doc/guides/prog_guide/rte_flow.rst | 16 ++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 ++ drivers/common/mlx5/mlx5_devx_cmds.c | 3 + drivers/net/mlx5/linux/mlx5_os.c | 2 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.c | 94 ++++++++++++++++++++ drivers/net/mlx5/mlx5_flow.h | 6 ++ drivers/net/mlx5/mlx5_flow_dv.c | 133 ++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 18 ++++ 11 files changed, 337 insertions(+) -- 1.8.3.1