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 E872AA00BE; Fri, 11 Feb 2022 02:45:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 728DD410E5; Fri, 11 Feb 2022 02:45:53 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2044.outbound.protection.outlook.com [40.107.223.44]) by mails.dpdk.org (Postfix) with ESMTP id 714C840683 for ; Fri, 11 Feb 2022 02:45:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyzJo/Pof6qUBnAjeF1dPVbFqRiG6rmOw3GIftjv+8SgdG4MJAgTVpNenTEuO4sngzpfp3dvsP1GEpLWFWWJ2T0ArprpknyaquJQCMsC5OBHvbIevM5rAMmVRDum58H36+gl50twCJwTXvacb9auOhLt2Q3AKa77mqCa68IeFcpaH0X2304MGNAe9LMBZqhNIH5+tFg369qPZBPmqNlKvYVFtd8IoWjp1gfv5pZiwoTYOo/Yh0LEidHuNAieLSm0ioekolihxlHSj6rqy9lCrAmpuXbHKrdTz4i68CnEIMYLYci2IAIXaG651Yqa+HNVNtCB4Uz3HaPOHcBY7eg3Zg== 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=o5OwJ8a+YzThpRh/8wmeSmGBN4QGdfGUYjfM4yCpux8=; b=B/o3pL40o5KFVBVtGp1EYLbPMDuctY1LYVvCXucHxeg3H98/5StJ0IUMZ3O9fzA3UGTBQK7Z1ncXFUNXo4xMiw8YyAKemGA3xWGzqYMdITL58s7u0pWS+TNZ2X5IlJt+t8dmyaAKJDi1VfnifwNH0LvU7yzidOR7SlMOecRyhs2i0Zp4ZoVRFY45oXJLUMYZsl15YTTwB7GTQq1S9e8PjfaH3TqvSEgFqc2YqMH80oAchRGs3QqXfW2ky4i33KP1FxzNFKaI22jo6UMOqKRrRUUqNXKBzOv89/cFmhtKcBzxYJtPrVhQ/ir8w8iOuHMSYE/aJSvJQ/nETy6MzEnnGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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=o5OwJ8a+YzThpRh/8wmeSmGBN4QGdfGUYjfM4yCpux8=; b=D+yHyDTgGYhGeBv0SdJZwiHTLFuU2BKlCMx40seNFHRA+zTEaZ7DbCjqUVyADvY2yANzygRQsM+0E3W2kVZmmwYNwwXOyNsP81NSxoOJAbEs+UEBCMPvQZNq/15A+RNV88U8xvMGrOUelTdu/UTuRAps0suZ4CCsfm9c72SRWlptD1xDXR8ThOGsr+NvS/1WpFY5Swn1onz28TTOmOcVxkaRXwXm9wFP0XMghk34SrHWhrQ1fM+tyzvS5AbjPCw99YwNapjWEUUsMx/NElgQXNiqnaEdDTuviarKjgDZavLceAYQZEs2Ve8UFHv7m8Z8G7Izhz8xRD9JSpHannJa0w== Received: from CO2PR04CA0161.namprd04.prod.outlook.com (2603:10b6:104:4::15) by DM6PR12MB3818.namprd12.prod.outlook.com (2603:10b6:5:1cf::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 01:45:50 +0000 Received: from CO1NAM11FT057.eop-nam11.prod.protection.outlook.com (2603:10b6:104:4:cafe::1e) by CO2PR04CA0161.outlook.office365.com (2603:10b6:104:4::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18 via Frontend Transport; Fri, 11 Feb 2022 01:45:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT057.mail.protection.outlook.com (10.13.174.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Fri, 11 Feb 2022 01:45:49 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 11 Feb 2022 01:45:49 +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; Thu, 10 Feb 2022 17:45:47 -0800 From: Sean Zhang To: , CC: Subject: [v2 0/4] Add support for GRE optional fields matching Date: Fri, 11 Feb 2022 03:45:26 +0200 Message-ID: <20220211014530.77711-1-xiazhang@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220126084404.40178-1-xiazhang@nvidia.com> References: <20220126084404.40178-1-xiazhang@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: faf1c012-b6e0-41eb-1f97-08d9ed003b4c X-MS-TrafficTypeDiagnostic: DM6PR12MB3818: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: ARgfEzPcv/f/NZSRAqKxY+sJi5TwhZpycRcGWznjcDdNirI3KNFUZEiVf9N1Xxq3/OvElKtt+N+2i5ls/+sYvlqauJkXJLTEIJBftECB9cZTC4K7onO+KUthzwEzs1woyGpzX3pXlAhNVGHTmmtjn84r/EkzJ6DJRDhwcphQJuY8D1KDirXaWR8Vvveg9kxoLGh8SU87jPtIU4FMNBiuFRIOLvfuqtjL8ONKTylhEBkx1L+ZB3TME9LHgs0N3tkjooBSahlkLQg0Hl+AAWTuYkDnwYQNoHUBV5xjw6JUgCzUyFCv+k1KaT3G0lj78Dp1dUlySHtDte7t29UPhdX0lpTc2i2hohgiamgD5IzBaH1leWJz8m23dUuy5jp3FpFJGDNCpvOTcL5GQ0XukMw1llalh8nB38h1UIizKyn4YuzGnw/iNpEN56MiFpmX/Y5apile12J6ManJOwIWM7kkxAL0VLAR51ViM4Jz+Ki44z4KuvSz9pMFYXuZFJUDwHpmOjHnduVo3hTT+WXvMUD4UF4vVyORnKZS9THlXRPNi7Nxw9kfDjx9PvH18K5lPmpjL1Uzd+z3ua6hymr21b8DRVU9my7hyDPCHZAS9HgkEOTk+fZicQXDByPXEdjUsvfGfdUykjKuqv8o66YAdMadRxyNlON6wMhSn62w7TvOM5ylpI7KqLXXrRsfg1Z5mqJ34q6lmIO00UCbUFjU4NaNmw== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(6286002)(82310400004)(2616005)(5660300002)(2906002)(186003)(8676002)(4326008)(8936002)(7696005)(70206006)(70586007)(16526019)(40460700003)(36860700001)(336012)(316002)(36756003)(426003)(55016003)(86362001)(110136005)(508600001)(1076003)(81166007)(356005)(26005)(47076005)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 01:45:49.9169 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: faf1c012-b6e0-41eb-1f97-08d9ed003b4c 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.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT057.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3818 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 / ..). change in v2: -changed the struct defined in rte_flow for gre_option item. -fixed raw encap issue. 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 | 72 +++++++++++++++ doc/guides/nics/mlx5.rst | 8 ++ doc/guides/prog_guide/rte_flow.rst | 17 ++++ doc/guides/rel_notes/release_22_03.rst | 5 ++ 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 | 108 +++++++++++++++++++++++ drivers/net/mlx5/mlx5_flow.h | 6 ++ drivers/net/mlx5/mlx5_flow_dv.c | 130 ++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 19 ++++ lib/net/rte_gre.h | 22 +++++ 14 files changed, 400 insertions(+) -- 1.8.3.1