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 CB5D5A034F; Fri, 4 Feb 2022 16:15:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 275624013F; Fri, 4 Feb 2022 16:15:31 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5014140041 for ; Fri, 4 Feb 2022 16:15:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643987729; x=1675523729; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=4tykM1+VWeXs4O2csYMpYWAZZOHK3eQm8WMPfdv0lSA=; b=ItQA5apj0ELINcNyOj88Z7cmX2IU+CWfrPAZfHJMCj4dn8MFApZ6KcZD AZtx5mahevQ2xAIC9aTtfgfRsoeL/i/Mg/UlmPXi4/xEcjH+aADOlZeig oDs6euylrOpYonlj4D+B/cHqhtVU72cBPNBdZusK4XqCegOeQ7aEEzSD6 JlMq79fsWYiSQPj5sRSYHeZGUFQm/chm7g0HKPTdaEKQPJaGawO0fXF4G roOj6V9T74H549X/ZoZpt2k+GNFrcQ7oSMt9sjuFGF/XVqFhLJhPn33Ke nURVfVo0tve0YcN2yo70uRjfy9Ieqq78vuE13nAh995pMUR1eTlRcF7xd A==; X-IronPort-AV: E=McAfee;i="6200,9189,10247"; a="235782160" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="235782160" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 07:15:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="631729389" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 04 Feb 2022 07:15:28 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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, 4 Feb 2022 07:15:27 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 4 Feb 2022 07:15:27 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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, 4 Feb 2022 07:15:27 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 4 Feb 2022 07:15:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WUVxbuvdxxOg+ZAcOP9fow1z9gSg3oJ1UBxTwjBYPNoNs1Eoem9ohl4vuM8u0VehFBYiFlPwo/menf5tyFvknv04ZAdl72/KwnwrgziyF71SoPYnFVCL95Qy23wey/tGPDb63cFM3eSwGZjDjVwr9DoOq4PUE7Gsn4W3j/cbfKjgUW7RYMUNKf6doLlCqUABrZ/uqXp5Yjsjoa804/lf0hsUU27A2IuEcaKzOjP/q6lOTrUUXVn0+wMkYL2LCPAorhUb2c3RCbara/QiFEaL9AhFcJMHwH9TVWAd5nsSqlcdc+1ThlGstKse6t5F19ofUCKtVZgUGKMrFE19xTsWDg== 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=yu2AC2oYO/9ru/nmtX/kPt6sjY1JIUXoSdV4cDTeW1U=; b=ebRnwUCir8zJlIXao1MpzrcTnrffAyvgOvu2Pigv5s+OCuKZlViUG2aiEFnrxOTX55DwgdPF19+02rolEhkqA5uc2PC0eThALe0+XYfg9vS6loQ+GqKImX9Ko9HK48/3sFdXPp3v8+2KJgpmzwY/2IrniGsAJfDsd95XHNN9fe9ajROFwgv2G5QnyfpEV9ha6w3KcRIdIMJK/0MxJan6Bu2oKkZZY+MnWs4bg5chlAAxukcJLQXSt4n0SxWpJ/FCaoYlmqE264PU0dqFXW7zxhgKwJu3iqSxVW18oZ2ssg93zzIMBKLYQqowzUR6wrjzRmlzFvcRcsbwnzZNzfKSaQ== 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 SJ0PR11MB5072.namprd11.prod.outlook.com (2603:10b6:a03:2db::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 4 Feb 2022 15:15:25 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4951.012; Fri, 4 Feb 2022 15:15:25 +0000 Message-ID: <602443bd-6d34-d029-9de4-f7b414db1fcc@intel.com> Date: Fri, 4 Feb 2022 15:15:19 +0000 Content-Language: en-US To: Ori Kam , "Sean Zhang (Networking SW)" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Andrew Rybchenko CC: "dev@dpdk.org" References: <20211230030817.15264-2-xiazhang@nvidia.com> <20220126084404.40178-1-xiazhang@nvidia.com> <20220126084404.40178-3-xiazhang@nvidia.com> From: Ferruh Yigit Subject: Re: [v1 2/4] ethdev: support GRE optional fields X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0040.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::28) 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: 53e80f8c-59da-4280-6648-08d9e7f12b79 X-MS-TrafficTypeDiagnostic: SJ0PR11MB5072:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4utuXNkGjU48d3YwQ/4AjyrLJCVWVwQDZkJvH4s4gAqnjYd2Vq4GA+i0Hz3FmJKdnFfHIDjoF/vbALqCOQnbrbAHMQNUKfHsuoF6jEL3ESHSaJ5FJjcObIcYTmE5IdwWDykMHGO86Kvr55G+oc6y3M9L4CtuxdBjSVhBn/3D7PmE/m6iAjIQ8PkfOfLjCsCWZsPNZEaAeGsQtSmlqxHipZOYDcg0B90EWImZEl5sdqj2XXH8LV3/EvfjKFSZa1R64L+Hk+kqk+m0qgIZjCYtuXufPAakeAPMMk6pfJOITTh+OesIoKk1ZL8LYcR0HaupyjT+LzqawoIXjltlTi60S4sX76/Q38IneFsOHqb7OHaWN9Vmg7HqsC/VRWye0o9yoXdqkdKOCvliWCUL6JIOSrIW9olqHhoJqbDPFUuQlVktMwsgQ4npVivplHo7TVawL5tTs7uwsbNygxr7YKEnxpxRnPpPNcklxEEpHezyX/yqq2QyygooW665QDKfUcQ51H9ZeXPMaaX9Le4SgM9UD6enJX1iMjjI421hi4ypzxwyothgJyWfmVBu0pKuDAik14zuee6oN09EjHhAwQCF71W2V1X3G3XtCW2Q4J5454H/Mn+gLPWmXIhzO6j5WLEbiDrAAT1j8wKZaMvHYNwA5bAqdnSZS0HfdSj3sCPrRATzryL2kGNti8g0HVmbVd+O0pb/esCZ2+mbj4l/10qjzQ== 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)(38100700002)(66946007)(8676002)(2616005)(4326008)(66476007)(26005)(186003)(66556008)(8936002)(83380400001)(6666004)(31686004)(55236004)(36756003)(31696002)(6512007)(6506007)(53546011)(5660300002)(508600001)(110136005)(86362001)(316002)(2906002)(82960400001)(6486002)(44832011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZERTY3RGMTM5ZGZsd0F6VWVoelZUL0VzZXlud25wU1NYQWJKTXVWN3dtY0E0?= =?utf-8?B?SUp0WmxQSlkwSnY1Y3ZrYnVUK1dEVk5XOFR2Ukd0ZEJqNHY0alQ2QlZtektn?= =?utf-8?B?c3JrZzB3bVZCSWRPaENXVnptMnZBd0dsaHpRRlBwZzVIdWVHRGkxM0piUzFo?= =?utf-8?B?Qmc1N2NpL2VCOFlUZkN3ZkFpSGlRb0laQ1Y4djRaQVk3TkE5YWZEdlVSQ052?= =?utf-8?B?L3VydG9mTlBjK25KTDdzYzlrU1RDeDFRN3cwZUJRbEVWcmFMY2hpSkxoS2JH?= =?utf-8?B?Rm13TTQ0Y24vd1lOejNoYWFjc0ZuV1pTcVUzYjY5ZWt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cXVhTkk1ZlhQRkdBZ3hodnEzbmxMUC94Wm95alVrcEtXcXVlQ29MM1dVZk5V?= =?utf-8?Q?LtY7x08bzCBSeXyohgAwk+M=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 53e80f8c-59da-4280-6648-08d9e7f12b79 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2022 15:15:25.4783 (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: GrmamZuorGevdjGPvXHURBRt5rxy/hVyQAcF5Hyg5xGEiNCdacdBP6FnKog+I4si2z5otx98VDZfcVqYxNXC2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5072 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/1/2022 12:57 PM, Ori Kam wrote: > Hi Sean, > > Please add this feature to the release note. > Hi Sean, Reminder of this change request, waiting for new version. Also please remember to add the missing doc in mlx patch (4/4) in next version. Thanks, ferruh >> -----Original Message----- >> From: Sean Zhang (Networking SW) >> Sent: Wednesday, January 26, 2022 10:44 AM >> Subject: [v1 2/4] ethdev: support GRE optional fields >> >> Add flow pattern items and header format for matching optional fields >> (checksum/key/sequence) in GRE header. And the flags in gre item should >> be correspondingly set with the new added items. >> >> Signed-off-by: Sean Zhang >> --- >> doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++ >> lib/ethdev/rte_flow.c | 1 + >> lib/ethdev/rte_flow.h | 19 +++++++++++++++++++ >> 3 files changed, 37 insertions(+) >> >> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst >> index b4aa9c4..0e47501 100644 >> --- a/doc/guides/prog_guide/rte_flow.rst >> +++ b/doc/guides/prog_guide/rte_flow.rst >> @@ -1106,6 +1106,7 @@ Matches a GRE header. >> >> Item: ``GRE_KEY`` >> ^^^^^^^^^^^^^^^^^ >> +This action is deprecated. Consider `Item: GRE_OPTION`. >> >> Matches a GRE key field. >> This should be preceded by item ``GRE``. >> @@ -1113,6 +1114,22 @@ This should be preceded by item ``GRE``. >> - Value to be matched is a big-endian 32 bit integer. >> - When this item present it implicitly match K bit in default mask as "1" >> >> +Item: ``GRE_OPTION`` >> +^^^^^^^^^^^^^^^^^^^^ >> + >> +Matches a GRE optional fields (checksum/key/sequence). >> +This should be preceded by item ``GRE``. >> + >> +- ``checksum``: checksum. >> +- ``key``: key. >> +- ``sequence``: sequence. >> +- The items in GRE_OPTION do not change bit flags(c_bit/k_bit/s_bit) in GRE >> + item. The bit flags need be set with GRE item by application. When the items >> + present, the corresponding bits in GRE spec and mask should be set "1" by >> + application, it means to match specified value of the fields. When the items >> + no present, but the corresponding bits in GRE spec and mask is "1", it means >> + to match any value of the fields. >> + >> Item: ``FUZZY`` >> ^^^^^^^^^^^^^^^ >> >> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c >> index a93f68a..7f93900 100644 >> --- a/lib/ethdev/rte_flow.c >> +++ b/lib/ethdev/rte_flow.c >> @@ -139,6 +139,7 @@ struct rte_flow_desc_data { >> MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)), >> MK_FLOW_ITEM(TAG, sizeof(struct rte_flow_item_tag)), >> MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)), >> + MK_FLOW_ITEM(GRE_OPTION, sizeof(struct rte_flow_item_gre_opt)), >> MK_FLOW_ITEM(GTP_PSC, sizeof(struct rte_flow_item_gtp_psc)), >> MK_FLOW_ITEM(PPPOES, sizeof(struct rte_flow_item_pppoe)), >> MK_FLOW_ITEM(PPPOED, sizeof(struct rte_flow_item_pppoe)), >> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h >> index 1031fb2..db58b47 100644 >> --- a/lib/ethdev/rte_flow.h >> +++ b/lib/ethdev/rte_flow.h >> @@ -37,6 +37,7 @@ >> #include >> #include >> #include >> +#include >> >> #ifdef __cplusplus >> extern "C" { >> @@ -660,6 +661,13 @@ enum rte_flow_item_type { >> * See struct rte_flow_item_ppp. >> */ >> RTE_FLOW_ITEM_TYPE_PPP, >> + >> + /** >> + * Matches GRE optional fields. >> + * >> + * See struct rte_flow_item_gre_opt. >> + */ >> + RTE_FLOW_ITEM_TYPE_GRE_OPTION, >> }; >> >> /** >> @@ -1196,6 +1204,17 @@ struct rte_flow_item_gre { >> #endif >> >> /** >> + * RTE_FLOW_ITEM_TYPE_GRE_OPTION. >> + * >> + * Matches GRE optional fields in header. >> + */ >> +struct rte_flow_item_gre_opt { >> + struct rte_gre_hdr_opt_checksum checksum; >> + struct rte_gre_hdr_opt_key key; >> + struct rte_gre_hdr_opt_sequence sequence; >> +}; >> + >> +/** >> * RTE_FLOW_ITEM_TYPE_FUZZY >> * >> * Fuzzy pattern match, expect faster than default. >> -- >> 1.8.3.1 > > Best, > Ori >