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 9F956A0352; Tue, 25 Jan 2022 12:37:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 329BF426E0; Tue, 25 Jan 2022 12:37:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5FDBB426DF for ; Tue, 25 Jan 2022 12:37:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643110647; x=1674646647; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=QivSiqm7HQ1ZKIga5vFPW/hgv3ZXNmHiE4cMnwhccxE=; b=nZ6ei8N9RIZv+MRR0k2dwdlMspeOyAhdWat0Fsaf8YuDFX1Lnl5AUAdX LocRw/+42QFj8CH5i5aaVtLfCWygJhgv7AIFrWTwDdlTYQxeloXyaFcv/ ECSGhWsZ9ToDYHxAu6ZNRd6LnUSEvTDAvm4q2KL27JE3Y0aT4Bb9Gaq9f /KX4hwEeZ3U89V2tvwIj/5GbmLhJlZK/DsMqp6NfelENamhozei25nNG4 VLTS4F6pow9xBjYBxfUZot3X9CFpx8pKgzP5lrqHmPAgudeTfjNlrdn5g MaeZfdHhtDWcp2Osqch4KKzWWaoesY2zGOFBFMU0mA9OeIt1hxgmIuafJ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="229855790" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="229855790" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 03:37:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="580723681" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 25 Jan 2022 03:37:25 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 25 Jan 2022 03:37:25 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 25 Jan 2022 03:37:25 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 25 Jan 2022 03:37:25 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 25 Jan 2022 03:37:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AvQmDK9g94szjGdbgF5ayvMHgv1MalOYpn5u6NHb+KL864sNgRgWavQ65tZIBmFMPt8za3kAP+kN6o6dQGAPyajy5qyuTTM84xdrPpI+xzFffBOM47wKC2Mdb7WY9cUz+oJRWcC8HK29ylUv5LeqO3lBUgcIAPCOPtc7MdHNuak5RewQnOZqR+Bc1uviqe6HT02MDe+GxTPlnelTmFQMpjRjEk0O+y3TspKKlbWh/AG/CMyVSSPFfcTFaFvQyOCAO4I7DMXKOBeFjCTZHffvCgv3kqZ0XiphcVPLls3LpzjvG7nYt664oG1TPn2VjRu5QPz07sh80GFICPYjCPQngg== 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=XdF5FtkNuxml7SgOWf0aloz1k7cd9dYGXAkCpM+Tpck=; b=VrkO+6Umx5gzxj5E3HDjYpgb5F4kwFm6Co0NiWovwSYItuHJD4EqnAYn9/B7j5POqLZ8ABiT7RTiArcdla/aLOkIu0V97diXS6bp49dmqVDCqWnWhdPhOB9mXaWDs1pVqtahPMqyDc6YLH5m4ZH4OGZzNM0Jl7dK0XywFD2PC0DH2NXjUchmf0JRDXN0plBJED7Ynwi6g5MDSI+NW+4dXj272SBsnZECz/glrnt9Jki6+t87NfEBBrny5oFfm69CyEjDY/NJaHy0kFRxHqntSVpB/bZ7vo8gUyhOF1eD+F6djNFsZ/NOuhou2TA9Jx06WePQLrKNBjog/LT+tvJUQw== 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 MN2PR11MB3631.namprd11.prod.outlook.com (2603:10b6:208:ef::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Tue, 25 Jan 2022 11:37:23 +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.4909.017; Tue, 25 Jan 2022 11:37:23 +0000 Message-ID: Date: Tue, 25 Jan 2022 11:37:17 +0000 Content-Language: en-US To: "Sean Zhang (Networking SW)" , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Matan Azrad CC: Andrew Rybchenko , "dev@dpdk.org" References: <20211230030817.15264-1-xiazhang@nvidia.com> <20211230030817.15264-2-xiazhang@nvidia.com> <002b1f85-0871-a02f-0345-1b19d722762a@intel.com> <2037437.VsPgYW4pTa@thomas> From: Ferruh Yigit Subject: Re: [RFC 1/3] 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: LO4P123CA0222.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::11) 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: 6ed744e0-f5c7-4947-91fe-08d9dff70db7 X-MS-TrafficTypeDiagnostic: MN2PR11MB3631:EE_ 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: 9k8fzwn1pkkNuQ5Jv30LCwjaxr5Z6QzSRoFC36FsELLzf249sBMhGdwhGOW7AabReJbbkikUMnsnwrM4dlRxRTW4ZsDrqZlZZPxgfJb4ZuuRvdXRE4p9FFKCIAcrc3JUdRNmZyv33VKjCyS8ofMsahtrXUOL3fgI+GYc3lr8jb6H/QHFYbQQoMX/L8/3L+R8vt4XeIHGpNmTgMYs/FHjkC4cBau15UbyLtfOBgkGYnL/wCVIhUDvUWJnVljNu/CllsftWaWWkk+7oAdGZYFDDF9xWwoN7gW0f6nAd+UI+2JVhL/5szlb8Talj/I/Ck4P9SoM9S5LKDQxOBexqXHJ4l7ca9fKbUHYaJuO2Zlbtr8XwIoDYV364TmXAo7PKMCmZ0tvsm7HYYvZDmaPwLNSiCiGeev5UQwms2oG6ivw34snccU1VjcEwInZ8Un/Hz213VjCTr4nGjmTJCdddAs8WBZ/OjlVixqve1kL8em6nwR8OVDw0VV7JNVsLPMjqZR4mdrvuTEVTFMUHpqnR+6SOraBtjur9uRbHffEakS3jqyABwmwvybpu57v2grSNumR/vNorq/nF9+2kNj1C7ELlp1qp281Z0kIlVwu0qd/aPK0QvhQVXz3K4OAvv82W4SGjKlUdf7r84arNQz5FadkIRuuTScI9Py6UnVDBXDNBbP/c9mWQwsgnVwLAQNIgX9YPC6Nfon18i3OJEY0H6jyt/nARlt71YvTDGE1pYKSlj8= 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:(366004)(31696002)(6666004)(2616005)(6512007)(316002)(110136005)(53546011)(4326008)(36756003)(8676002)(8936002)(54906003)(6486002)(5660300002)(82960400001)(66556008)(66476007)(86362001)(186003)(2906002)(83380400001)(44832011)(31686004)(508600001)(26005)(6506007)(66946007)(38100700002)(21314003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cW95V2l3bXVYTnZBUzFoeWVGaEM2ZzhXVk40TEEzaENhakxYcjFFYVVSc05z?= =?utf-8?B?VEo2K01jajZyOXBGRFlyWHBJY1duRzVnMGhuS0FqWVBnbmlIczJQNVZyS2wv?= =?utf-8?B?dU9SMHFwQkZKUmZ3aThTZDQ1c2NENEdzWit5SmNnRUVVWnhNSDBsRTlaTHV2?= =?utf-8?B?OXBaR0JWS1c4VjErWU0zR1AzV1ZmZXFzV0lFaXJSeCtBRHNRUUo4M0VGOUpK?= =?utf-8?B?UFh6aFNoRkpGNHZsRFFES0grczAzMFJPVGlWaWFuUloxbm5uR2t4QWwvbmNK?= =?utf-8?B?R0lxR2xyT25Oa0kxYWpkeDJ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utf-8?B?d3JERDQ5UzJiRXNSbFJGMUhkdDYzamhHanQrWXM4T2NnaUR1NFh4R3JEWGE3?= =?utf-8?Q?I3DwytRTGqKzxytKSORxMJQ=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6ed744e0-f5c7-4947-91fe-08d9dff70db7 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 11:37:23.2342 (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: JsUIi3J5rq13C84YeLMTZCZcDV+C8f4Nt09huB9qeK/He8+yQKJfZw5yQp4tBamhTaeKNR+fJMuvusjQ5SefgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3631 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 1/25/2022 9:49 AM, Sean Zhang (Networking SW) wrote: > Hi, > >> -----Original Message----- >> From: Ori Kam >> Sent: Wednesday, January 19, 2022 6:57 PM >> To: NBU-Contact-Thomas Monjalon (EXTERNAL) ; >> Sean Zhang (Networking SW) ; Matan Azrad >> ; Ferruh Yigit >> Cc: Andrew Rybchenko ; dev@dpdk.org >> Subject: RE: [RFC 1/3] ethdev: support GRE optional fields >> >> Hi, >> >>> -----Original Message----- >>> From: Thomas Monjalon >>> Subject: Re: [RFC 1/3] ethdev: support GRE optional fields >>> >>> 19/01/2022 10:53, Ferruh Yigit: >>>> On 12/30/2021 3:08 AM, Sean Zhang wrote: >>>>> --- a/lib/ethdev/rte_flow.h >>>>> +++ b/lib/ethdev/rte_flow.h >>>>> /** >>>>> + * RTE_FLOW_ITEM_TYPE_GRE_OPTION. >>>>> + * >>>>> + * Matches GRE optional fields in header. >>>>> + */ >>>>> +struct rte_gre_hdr_option { >>>>> + rte_be16_t checksum; >>>>> + rte_be32_t key; >>>>> + rte_be32_t sequence; >>>>> +}; >>>>> + >>>> >>>> Hi Ori, Andrew, >>>> >>>> The decision was to have protocol structs in the net library and >>>> flow structs use from there, wasn't it? >>>> (Btw, a deprecation notice is still pending to clear some existing >>>> ones) >>>> >>>> So for the GRE optional fields, what about having a struct in the >> 'rte_gre.h'? >>>> (Also perhaps an GRE extended protocol header can be defined >>>> combining 'rte_gre_hdr' and optional fields struct.) Later flow API >>>> struct can embed that struct. >>> >>> +1 for using librte_net. >>> This addition in rte_flow looks to be a mistake. >>> Please fix the next version. >>> >> Nice idea, >> but my main concern is that the header should have the header is defined. >> Since some of the fields are optional this will look something like this: >> gre_hdr_option_checksum { >> rte_be_16_t checksum; >> } >> >> gre_hdr_option_key { >> rte_be_32_t key; >> } >> >> gre_hdr_option_ sequence { >> rte_be_32_t sequence; >> } >> >> I don't want to have so many rte_flow_items, Has more and more protocols >> have optional data it doesn't make sense to create the item for each. >> >> If I'm looking at it from an ideal place, I would like that the optional fields will >> be part of the original item. >> For example in test pmd I would like to write: >> Eth / ipv4 / udp / gre flags is key & checksum checksum is yyy key is xxx / end >> And not Eth / ipv4 / udp / gre flags is key & checksum / gre_option checksum >> is yyy key is xxx / end This means that the structure will look like this: >> struct rte_flow_item_gre { >> union { >> struct { >> /** >> * Checksum (1b), reserved 0 (12b), version (3b). >> * Refer to RFC 2784. >> */ >> rte_be16_t c_rsvd0_ver; >> rte_be16_t protocol; /**< Protocol type. */ >> } >> struct rte_gre_hdr hdr >> } >> rte_be_16_t checksum; >> rte_be_32_t key; >> rte_be_32_t sequence; >> }; >> The main issue with this is that it breaks ABI, Maybe to solve this we can >> create a new structure gre_ext? >> >> In any way I think we should think how we allow adding members to >> structures without ABI breakage. >> >> Best, >> Ori > > Thanks for the comments and suggestion. > So the acceptable solution is to have new structs define in rte_gre.h? > struct gre_hdr_opt_checksum { > rte_be_16_t checksum; > } > > struct gre_hdr_opt_key { > rte_be_32_t key; > } > > struct gre_hdr_opt_ sequence { > rte_be_32_t sequence; > } > > And to add new struct gre_ext defined in rte_flow.h: > struct gre_ext { > struct rte_gre_hdr hdr; > struct gre_hdr_opt_checkum checksum; > struct rte_hdr_opt_key key; > struct rte_hdr_opt_seq seq; > }; > > And we use struct gre_ext for this new added flow item gre_option. > What about having a struct for 'options' and use in in flow item for options, like: struct gre_hdr_opt { struct gre_hdr_opt_checkum checksum; struct rte_hdr_opt_key key; struct rte_hdr_opt_seq seq; } struct gre_hdr_ext { struct rte_gre_hdr hdr; struct gre_hdr_opt; } struct rte_flow_item_gre_opt { struct gre_hdr_opt hdr; } > Correct me if my understanding is not right. > > Thanks, > Sean > >