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 7C332A04A8; Wed, 26 Jan 2022 09:44:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B0B94270F; Wed, 26 Jan 2022 09:44:28 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2084.outbound.protection.outlook.com [40.107.236.84]) by mails.dpdk.org (Postfix) with ESMTP id D03824270F for ; Wed, 26 Jan 2022 09:44:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfVXdh7QYIJvFSZO1I1JhsA/nasF0vTnn800Hi8bJxWzsJIQjEpv9tHB6shVC0oNTcHaYsPRAAubLRGdkMj+sDuf4ulFT4PsuAREhFK5AvbRo2Wvt3HoDEFIbxNh5HfL2tSTImBLm0Gr2BZfLf7qeME4JelJYrcrHxB9SE4c2+XlMfYvLG15qC0zvK/EJSUheggN8mN/HjsgtWqa7f2wb0lDSqhpgs21X6iPvJqHzftGHk0m5TkMVZiz8wyVwEoBxKsSWIui50Q+LtSmTnyzN+lSTpjCIttTnSwUKEY6DlRglbRqXmYhw/aVS2niqPMs5m+eptxYOtZF4cs+CPhvTw== 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=CGxXTKqNYE0vci/Ufx5R4YtSf1Ak8EtPHaQVju27N+8=; b=jQNA+JISoYFUm4qDMNUhBDov9tz8eagzB4KlVoneTIxPRDV0koFXqJYqt67BZQwF5m8IX6Coph7kiVslAbowB4Vgw7cQLeAZjpTwgkuGSpAW/jlqYlL1psT9mOue8Vk9mZnmIauBohRCiU0cTKy3ZUtrZbZ5E9vNXOMmRu464PQKoRSFhrJ1VWfr+uRqDcx4eIbSklkYmRy+lB0H8BjtZ8vnukRrJzhLahr58AxTfcYNyELJZytx8hFaKGH9PE6g04bNeEW8wlQrW+c2ntX+5fzG7L3JVWcQIaxYn85jBVoou5do4NKdu67yJ6I7ay4rsjJ6AcKSclG55lKjRSfMww== 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=CGxXTKqNYE0vci/Ufx5R4YtSf1Ak8EtPHaQVju27N+8=; b=jVtwCc6FbTRcT0awSrRuZ/05ITQioYT+Onrz99i/Nbrox/aotghvUQ9+b6HNqC6abEYq5Lz/ox4bXOOjnoH87bC5PKXnPUeWuC1nlLuQhiO2trzopCxFK5eSTYM/nO/CXNfEtZK8SnMVUhw9374TuXwS9rphgyD0EQHUdBVvP6/HMwAmMi3YmoPuKPNjrXEB3Y22ARmeGW/oCL37QQvEMczAM7Qq2SAKV/JM5aWIlxBZAvI4awVa1LXModF46PBhgAJRQzPTKxGEum6sctfva4+paDYnjmFYtjqToPia475QxQiXpqg0LliVJc/ILo9f0vaGlTOiwn2BE4goefNY3Q== Received: from DM5PR07CA0152.namprd07.prod.outlook.com (2603:10b6:3:ee::18) by MWHPR1201MB2540.namprd12.prod.outlook.com (2603:10b6:300:e0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Wed, 26 Jan 2022 08:44:22 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ee:cafe::15) by DM5PR07CA0152.outlook.office365.com (2603:10b6:3:ee::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15 via Frontend Transport; Wed, 26 Jan 2022 08:44:22 +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 DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4930.15 via Frontend Transport; Wed, 26 Jan 2022 08:44:22 +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; Wed, 26 Jan 2022 08:44:21 +0000 Received: from nvidia.com (10.126.231.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.9; Wed, 26 Jan 2022 00:44:19 -0800 From: Sean Zhang To: CC: Subject: [v1 0/4] Add support for GRE optional fields matching Date: Wed, 26 Jan 2022 10:44:00 +0200 Message-ID: <20220126084404.40178-1-xiazhang@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211230030817.15264-2-xiazhang@nvidia.com> References: <20211230030817.15264-2-xiazhang@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: drhqmail203.nvidia.com (10.126.190.182) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a3ba0dd-cabc-4194-04af-08d9e0a80ccf X-MS-TrafficTypeDiagnostic: MWHPR1201MB2540: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: OKD8I980vvBucIV10X1kpMesLHoGoKOUZnQ2VRKKiIu0iG5U6u1sRkdOq5Q0bQAFN7Vxp0pdVS3D+vdWmdfSWEeFNMzN+mqcTvQCpGUCpFaVyeskGgnQkfw3GtiDHH7m6rRAMBbUyRnpyn1OFMw9wxt6d66ZRV74Y8gV9GseGqbvwynLd+x++gpu79bdAJ4A4F8RyA/afHxNeQ4poMPXPSuoVEgQOg4TkJEjJnNNogI9Ze1Z5fbPA99ruJf+avN5YruLKPDHUDyLRMEcLw/fu7BkBIkEGmNs+hFCqphzK3TEilVHwWgmA73+adf/xHhRUALBEIShtxR+g6dUtJwcjM3v1zRo7FlA0bZvgvIvEzAWtMGDScFlUDvTVH1wkhjhA2AAP8VgGElFhn7hDXjv+Ra4N2XLjWLwnXwXxna1eFGuXiSY+tW2iRH4KpBNrDhcJCH826ojCi0EZ66FBWsZVKr1/H45VHMOsnZLj4CQ2zSgq4nkT1AAWQAig9Skwbf6HEzrzAaNATb1bmz9j3YMWFoBJct7y+z2d7ndHLLtqLU2NqxWB+13jkOFFS0CvdZ6TzmKHXsPSKSU2dJh92cvV4KdzkVDiKc7v6fZb9XI5jCzUdmMMm7HckGjSmngp7JULHCeVQGZUhHv6ag4aLR2MBsci2oFfaqfcYmLGrbat1FWt4wC4h5uXq5vbdSeylYLmWbe8ai8SD8A+0wL38uTvJE2swKaGlfvOwtWAFmFxNT/tfGo/3Zy0TvBxUGmypQW8+OXdwwggjsxt12YqMVcIsWDbGydthwtlEW/2hFRGro= 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)(36840700001)(40470700004)(46966006)(2616005)(5660300002)(2906002)(36756003)(1076003)(8936002)(6666004)(16526019)(86362001)(70586007)(186003)(4326008)(7696005)(316002)(36860700001)(47076005)(55016003)(26005)(356005)(40460700003)(508600001)(426003)(82310400004)(336012)(70206006)(8676002)(6916009)(81166007)(6286002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2022 08:44:22.2251 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a3ba0dd-cabc-4194-04af-08d9e0a80ccf 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: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB2540 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 (4): lib: add optional fields in GRE header ethdev: support GRE optional fields app/testpmd: add gre_option item command net/mlx5: support matching optional fields of GRE app/test-pmd/cmdline_flow.c | 59 +++++++++++ doc/guides/prog_guide/rte_flow.rst | 17 ++++ 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 | 106 ++++++++++++++++++++ drivers/net/mlx5/mlx5_flow.h | 6 ++ drivers/net/mlx5/mlx5_flow_dv.c | 146 ++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 19 ++++ lib/net/rte_gre.h | 21 ++++ 12 files changed, 387 insertions(+) -- 1.8.3.1