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 19778A00BE; Fri, 11 Feb 2022 10:37:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D868C426F9; Fri, 11 Feb 2022 10:37:01 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C74A641144 for ; Fri, 11 Feb 2022 10:37:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644572220; x=1676108220; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=IEFRPDBKdPDYPrmCHsiypVu6tqUNrFYIinTqZSissIM=; b=dlH3w3CR3ykTD6BPXZM6K/f7+QJZGFB6xFb1n5frhGSOwpVRkEK0Id/l YeOiydp9Lsk/uHxOWK2V+ACnxa/yHTKFMOjhZ8dZXuxkGES9jJB2WLV+D gBs0uY7MbkvuIPwRt6g2TmKxX8OcQo1GO81DEce7426V3Rdp6zsXb+gso 4xwtQjH/oydRK1r7YacWNL3OYhuNLUlPMcic5kKGTzlb2ZYdM/DeGh62w UDF+BmRGJqWRu5QOtytKk2PyF4gj0Exm6PIoy+fDmmYycu6IlsCVREwbX kufiV3SVQktnoxM52ytP8OoAK8I24qSqqfVp12MM7+PkR0nVpd1QSf/Md w==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249646680" X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="249646680" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 01:36:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="702045714" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 11 Feb 2022 01:36:59 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 11 Feb 2022 01:36:59 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 11 Feb 2022 01:36:58 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Fri, 11 Feb 2022 01:36:58 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 11 Feb 2022 01:36:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQOvyPtHWCs01AJwZCHVMN5xKZwi1zwx2V4EgWsZsSgkTZ9D9n2CPTcCv5fa1d/3rNM52nDMjAkCxAZwCV1ZvWkYAGxCzi83Vbxo9Ml8zHo2poTMqY5v0miWUyFDL6FJjXizECKwnpSKfCUSQwkBMR5+6/jd1NYzm3VJaXeGIqNMZBfYzZ1ZPXavA1OowQN/XV/HqkKJr835dbq/t1uKpWH7R0KQ2HsMXz3gUF+5BKA4jjgUj3gef9Dn0TPGFlyU71lZiPlgUE/26hzjq7Kg2SnVUTJ5wHw5VlrGPUYByxlMVVtnm74Dnvui4ne368Fyn4dsR2wyHnUGP0IYd3O7iA== 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=KUr26vgi5SKFAdPOFy/DnWfzzA2wegBkHw9WaL9FJiQ=; b=Qo5W9GrhKa2qCDK2VyZLmblpaNL8GJntm/jQIWNYm53JwSC5DOzBgQ8iNvnqEr3quadKEFYeeluGIybdrFiqAZyfOmVC+2wWrAATQlxj8JA6m7Apa/ln7BC0wxazRU0Xafi8BK5yoLTLoapeMsL5/HrhLmILprk0lCfwk35rGzVmLwFodJtDsBEDI39TJz8M0CImrHpwbG9LMFH+CJHkvYjbdyu/wcDEarTgC0wp3JMrYzLSCqEV/sc1JCUJGV3V58b4hAfhPdRZFCPiOkBiFIOpQizlRx4yKEA+ZY69Ve1qo9Mpyr2ogUS/LM04BUuWMvMKyNq4M5hZK2fMaKJh1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5903.namprd11.prod.outlook.com (2603:10b6:510:144::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.16; Fri, 11 Feb 2022 09:36:56 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Fri, 11 Feb 2022 09:36:56 +0000 Message-ID: Date: Fri, 11 Feb 2022 09:36:51 +0000 Content-Language: en-US To: Sean Zhang , CC: , Andrew Rybchenko , Ori Kam , Qi Zhang References: <20220126084404.40178-1-xiazhang@nvidia.com> <20220211014530.77711-1-xiazhang@nvidia.com> From: Ferruh Yigit Subject: Re: [v2 0/4] Add support for GRE optional fields matching X-User: ferruhy In-Reply-To: <20220211014530.77711-1-xiazhang@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0048.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::8) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c99a2ef3-1faf-49c3-0688-08d9ed420b55 X-MS-TrafficTypeDiagnostic: PH0PR11MB5903:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T1IiilpVTNcuSbMciEgFfM8aziPsDyj7ak2N9K4xQ9HmT6pGH+yumzXRwm24LfR7wp8JZSVX8yMKm18h50FN2h9uVkLDnwg+21iV1U5E/xmAeYbfC+LHaC4ddsxiJelvTWuo1K9JcXQp4+2VJu2LKKJcw+EGkoCM9eYZhsI0MNrGu93hCTser9yL0pkNj4gvtWlr99xp2W25kGAohnzDw9+LNdz+GSC45/DOCht4rimkFqp196eMx325X7+YUh/h6wXDkIdnGIjHm5E5D6Rni5fr4pxzXdp08p5fG9qRtWwu+Hwlj7/7MX7YS8uvqtnj6uIn+eaF/mHIdoZ6PtHxCPvII+3YwZdbgMrZlla9DxmgE4fuRrfDhAz7l1NU4CDI1s2jRv7gcouXqD9ubWSeToIsRnGxw89wmfagoS9EbsdWOTE9StfgFe3SVQSeWp+aNJwmFEpO/F52zzX1SzOFiotU+OmA1agl51z0IfOoM8m3uxp58QAQF5WqJCNePXtYcSGWlP+yRnmRfU7L0qFi2TUhnGXX2pXaBKQWJ1q1qx/6BhiJUn/oLkm4T54X2w54hNU0aCwmjBpMhVloEQ0vzceKE/7JgDWPSCO/Fun+2Pk9N6L7qN1+U4YcYRCvsRDnlGhRl9t7cKMoha7IwfVaTbhNz4YWTeBI2bxABRZZTwjDi+ti8mdvxAg6aaBSTvhkZOmCIFd0cyyzthXSE2ID0w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(86362001)(54906003)(508600001)(6486002)(66556008)(66476007)(316002)(31686004)(8936002)(4326008)(8676002)(31696002)(66946007)(26005)(2616005)(36756003)(186003)(5660300002)(53546011)(2906002)(55236004)(107886003)(44832011)(82960400001)(6506007)(6666004)(6512007)(38100700002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?emxOTTdmTnYybmE5R3YxN3M1Nm12TmpJQlMwZ2tXTktPRytCclo3UHBFTlhJ?= =?utf-8?B?R0U3RXNlVVV5eEhpRjh0dTlUdjVPNis5Q2wxanZ5Z2phZXNheUdKNUZCd2lG?= =?utf-8?B?TEpVRUJiQ0U4U2REV0VvRHhYZ0g0TWJOa1FZM3FvMlJUWHhyaGNBVE1SbzY2?= =?utf-8?B?RFpLVVFaV3cwWWNJUGlSQkl6bmNmd1JEUU1WN2NscS92OVNhSk5mZDY2a1RG?= =?utf-8?B?azE3RlBITzk3Nkpod09KN1RkeElDTHcvdXo4OGpnRTIvVDdaaWsvc0haMU5x?= =?utf-8?B?T3R5Q3JoQ1k5K0hFd2NjVlM1VGRqVjRLWFJncXl4SjArdXRGNi9xeE1UdVVh?= =?ut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9MbTVWYm0wSGFzTzdPMmVZQW5W?= =?utf-8?Q?fxcXSaewjndJijLwG8rxByY=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c99a2ef3-1faf-49c3-0688-08d9ed420b55 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 09:36:56.5725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mX7Q46876zfYmOZabSvYZWI1mz52nWGq50U301ogT7Ti3essTMUTRfDCFZheAVnOTcJ3Pzx0cmBMIh0JTRn3Rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5903 X-OriginatorOrg: intel.com 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 On 2/11/2022 1:45 AM, Sean Zhang wrote: > 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 Hi Sean, The GRE optional fields support in flow API should be generic for any vendor, above description concerns me flow API implementation is done with to match a specific vendor implementation. Will it work to get ethdev part as previous version of this patch (v1), and get the mlx driver patch when rdma-core is ready? > 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(+) >