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 417BA42825; Thu, 23 Mar 2023 13:55:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14F6E40A84; Thu, 23 Mar 2023 13:55:25 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2045.outbound.protection.outlook.com [40.107.237.45]) by mails.dpdk.org (Postfix) with ESMTP id 90EE340A84 for ; Thu, 23 Mar 2023 13:55:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bv8nSADlteMhF8seBpqLDAsZ1HN+ScaFYEWNl0/KYm6NJ9YWum6f6FrReKs+i1wKl1yoeL33pOBSiGel/SKNPLEp+hz/poZqQF9K/pLIprJHiEwaUGvERBo47/HfPdyoL+6n/6QdoR3uRk+gdjY8dY67rCMvNZIpv6v2t0jHmxUiSl5dZs6Y3b/7Rle+X8hLxB/04LgpgMJ/HrcvyKwlp0F6Qu37+UtTnOTYwsaP9tz73ZL+aEKQwc6XfKziZ2cUff6vUt3ZTwS4tKnsffezfxVHtw/9mgsrJ72xaTKLvFi/IJXHh89qMuvB/D5b35oDDqKtI3B1447OLaSyNrSTyQ== 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=50g3nzA2yzMJrTDtfOTPrOzlK6I2MIHoqgnk+jJb3PU=; b=LRSzG900m/yxJ/kb1iVkSrMKUwRAt9FqEVwkexOQz38xZikQjqbgXjg//nB1aGQVdJ0NY28gSz3dEK928rvHHXptBlKiym3o1W025JMGt8V16+hboW2QdDqW3kM3jRP+UDRvZ7Z9dB5329z9AhEL8HixTJ178uxwiRRtLmCd707JTwrojcXmF7mimxhFhWmFdCoTtAa/w9BnPiqgdgOa5dq20kTESWcBw+f1IY7UEtFUFMlKollPkOKgk8PCw8iI+blRh5Vlt6Rlmxp8XCl0vEkgQBptb1FQB8uMc5XZ96YEvFYtN0YNzyZMP0MAcE8rIfvNzRJ31t6XvS5b9893BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=50g3nzA2yzMJrTDtfOTPrOzlK6I2MIHoqgnk+jJb3PU=; b=5urdhzSzzqhRDCSyjdHdcNT/Ci9zNmRhtYNHQ4jMVdvN4cGdr70e18finLvg1n27jx3D+/ZUJeC3Zl9r6gUPjMaYE/YguxzQ0I6ROGiSV69DopqXKKojyq5fIaYxIqDE4K2Pjiq+qnuGvrSUO+0cmeb3jNYvDizgXikACU1r7Mw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH3PR12MB8850.namprd12.prod.outlook.com (2603:10b6:610:167::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 12:55:20 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%5]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 12:55:20 +0000 Message-ID: <6650c893-47fc-2207-f291-e57110a5e7cb@amd.com> Date: Thu, 23 Mar 2023 12:54:39 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: Ori Kam , Andrew Rybchenko , Ivan Malov , "dev@dpdk.org" , Aman Singh Cc: NBU-Contact-Thomas Monjalon , Ferruh Yigit , Ray Kinsella , Neil Horman , Eli Britstein , Ilya Maximets References: <20210527082504.3495-1-ivan.malov@oktetlabs.ru> <6175cb60-5d9a-832a-fa07-32326018661c@oktetlabs.ru> <81191eb5-7a74-2bd3-00e2-0250ef9ee689@oktetlabs.ru> From: Ferruh Yigit Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR1P264CA0077.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2cc::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB8850:EE_ X-MS-Office365-Filtering-Correlation-Id: d8600118-2414-4b72-c9e9-08db2b9ddb8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0KyNl4MIUpaoSyQ32fdv06ENDBlnRIXFZgOph8PShLl/mduHNEZlilMeHNR1imhO9C2qJn8ajQZwhBxgJA8iD86YelK0giGqo6iH9zoEgzgUTvsKmci6SiUfC4qdHeM/B1UfLBocktSrkfuQNhavmHnnmG88GRxVE/OsZKtoZkCDjaLvly+GSTB+9vN+BqjmIXQSEtgN3FobR8bCPmJAGCgAKLrHkI2igL2Eyo3a4rknviZgydjASJVmepExMZA6feQE79tvhmPFIjEaa2uioEbnSSgYFr3RV0SCgq12yXAnvRdAFlQPj9QjPGvrCCDAYm4g/p9mno7RFK4UyhWmToWoEITSRZR6WPbh34ftmtFZPx6b/OAxdiOjwvrqfE3pRmjpSuPkbjjLm/krATLjK3fN9v1PgpG9HDhHaI+LbBW4FYYxlKxJvV0j2yfFEgQZ45/lGk+bVHWHwGGpP9EuT8VZQAury3K0bCpu6PeDefQ+RHVNbO2m7YYGF+1e2mFWTEZ5tWIiXBAKrD0WbT3tNT2gjE3HE6U0i1eYnICwVi0+gu1ne57YYgV7/fdwyM+2sTyF1Ero0Z1OBbYCnhrqSy2O2+STvQsq3XuGCu/rJfmLbYwTmZrlzgoPXsuizI2wG073eogHPY+BlkcLTXaGAc02ZVF75sEIhVSukIkKcdj22/VqQVBSlOqZbpJ40jbhwV6O1Jqy8rei+rHboBOUEp850lO3aRATGcnhfB6E3IA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(396003)(346002)(376002)(366004)(451199018)(478600001)(2616005)(186003)(966005)(6486002)(66556008)(66476007)(8676002)(4326008)(110136005)(316002)(54906003)(53546011)(26005)(6512007)(6506007)(6666004)(31686004)(66946007)(83380400001)(41300700001)(8936002)(2906002)(7416002)(5660300002)(44832011)(38100700002)(86362001)(31696002)(36756003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UHBCcE5aMlZUakpSdWJsNGNIQlRWZG1PTHpDenlQZFdrR0VzUDBZbzJjcHFs?= =?utf-8?B?ZUUvSWlSTWJ4WVdCa1BtWVJ3Nkpxb3ZvWWQvUXo2THVwYmY3OUxzRjR3amFx?= =?utf-8?B?MEw5bFphaVcyMHZYVG1qNGF5UGdPVGYxY29aNTFvWEIrMGUzeGZBcEQ0U25u?= =?utf-8?B?V2pvbW9YdW4vaTVPdG54UmJpZThhb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TXVsUXdm?= =?utf-8?B?U0VRZHljNlB6NHowM2t0ZVc0NVJQa0ZpT3JMd0VTb2lMSTFjNmpzQ2Rubmlw?= =?utf-8?B?eEs0QkNHWElUSEQyS0VhMnJMTWlGVTdaVGd3R0lmOVlJS0hjbFZ2MlV3dUpa?= =?utf-8?Q?1XiJjuW/9VjBTwCuEBn7+HDD2?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8600118-2414-4b72-c9e9-08db2b9ddb8e X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 12:55:20.2109 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Dm3OxwpLSIaYUKwuryNwJ2BR/AV5JNdFh9fUeSkcGjzsyrC9ia4I5mjqeDXHhmI3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8850 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 6/3/2021 10:27 AM, Ori Kam wrote: > Hi Andrew, > >> -----Original Message----- >> From: Andrew Rybchenko >> >> Hi Ori, >> >> Cc Eli and Ilya since I think OvS could be interested in the feature. >> >> On 6/3/21 11:25 AM, Ori Kam wrote: >>> Hi Andrew, >>> >>>> -----Original Message----- >>>> From: Andrew Rybchenko >>>> >>>> Hi Ori, >>>> >>>> On 6/2/21 4:32 PM, Ori Kam wrote: >>>>> Hi Ivan, >>>>> >>>>>> -----Original Message----- >>>>>> From: Ivan Malov >>>>>> >>>>>> Hi Ori, >>>>>> >>>>>> Your review efforts are much appreciated. I understand your concern >>>>>> about the partial item/action coverage, but there are some points >>>>>> to be considered when addressing it: >>>>>> - It's anyway hardly possible to use the printed flow directly in >>>>>> testpmd if it contains "opaque", or "PMD-specific", items/actions >>>>>> in terms of the tunnel offload model. These items/actions have to >>>>>> be omitted when printing the flow, and their absence in the >>>>>> resulting string means that copy/pasting the flow to testpmd isn't >>>>>> helpful in this particular case. >>>>> I fully agree with you that some of the rules can't be printed. That is why. >>>>> I'm not sure having partial solution is the way to go. >>>> >>>> Sorry, I disagree that possibility to cover 99% and impossibility to >>>> cover just 1% is the reason to discard. >>>> >>> >>> I agree with you that 99% is better than 0 😊 but is this patch 99%? >>> maybe we can agree even if it is 70% it is good for this patch. >> >> Hold on. Here we're talking about a theoretical possibility to cover 99%. >> Coverage in this patch is discussed below in terms of "the most basic >> commands". > > I know that that is why I said 70%. > >> . >> >>>>> If OVS for example cares about >>>>> some of the item/action, maybe this log should be on their part. >>>> >>>> OvS does and as far as I can see already has bugs there. >>>> Of course, nobody says that it is testpmd-complient format, but it >>>> definitely looks so. >>>> >>>> Anyway, it sounds strange do duplicate the functionality in many-many >>>> DPDK apps. Of course, it removes the headache from DPDK maintainers, >>>> but it is hardly friendly to DPDK community in general. >>>> >>> >>> Fully agree with you that if some feature is used by number of >>> applications, then it is better or at least nicer to have it in DPDK, >>> but my question is that, the current patch is for the OVS use case >>> from my understanding and not considering any other application. So, in this >> case do we want it in DPDK? >> >> The primary goal, in fact, is our testing harness :) OvS is just an open source >> example. We could easily add it to our code but decided that it would be useful >> in DPDK since seen such messages in OvS logs. >> > Private application are also good examples from my point of view. > >>>>>> - There's action ENCAP which also can't be fully represented by the >>>>>> tool in question, simply because it has no parameters. In tespmd, >>>>>> one first has to issue "set vxlan" command to configure the encap. >>>>>> header, whilst "vxlan" token in the flow rule string just refers to >>>>>> the previously set encap. parameters. The suggested flow print >>>>>> helper can't reliably print these two components ("set vxlan" and >>>>>> the flow rule itself) as they belong to different testpmd command strings. >>>>>> >>>>> Again, I agree with you but like my above answer, do we want a >>>>> partial solution in DPDK? >>>> >>>> My answer is YES. >>>> >>> >>> I can live with such decision but like I said above it depends on the >>> use case and how partial it is. >> >> See above. >> >>>>>> As you might see, completeness of the solution wouldn't necessarily >>>>>> be reachable, even if full item/action coverage was provided. >>>>>> >>>>>> As for the item/action coverage itself, it's rather controversial. >>>>>> On the one hand, yes, we should probably try to cover more items >>>>>> and actions in the suggested patch, to the extent allowed by our >>>>>> current priorities. But on the other hand, the existing coverage >>>>>> might not be that poor: it's fairly elaborate and at least allows >>>>>> to print the most common flow rules. >>>>>> >>>>> That is my main issue you are going to push something that is good >>>>> for you and maybe some other cases, but it can't be used by all >>>>> application, even with the most basic commands like encap. >>>> >>>> Isn't it fair: if one wants to use something, be ready to help and >>>> extend it. No pain, no gain :) Jokes aside - we're ready to support >>>> "the most basic commands", just list it, but do not say everything is >>>> basic. "everything" will delay the feature and simply unfair to demand >> (IMHO). >>>> >>>> IMHO, the feature would make flow API more friendly and easier to >>>> debug, report bugs etc. >>>> >>> I fully agree that if someone wants functionality, he should work for it. >>> But as a developer of rte_flow and maintainer I need to ask who will >>> add the new features/missing features? Should we enforce that each >>> developer when coding a new item/action will add it to the print? >>> Or just users that care about such log will add it? >> >> It is a good and valid questions. First of all we can help with (or just completely >> take it) to maintain the file. > > The issue is not the maintaining of the file is the extra work required for each new feature. > and what do we do with features that are hard to print for example encap data? > >> Second basically any option from above is OK for me. >> My personal preference would be to require implementation for new RTE flow >> features. In fact, testpmd may start to use it to list created rules etc. >> We'll try to make it easier to add new items and actions support. >> > I also think that the best is that all new features will be added to this print > but the requirement is that adding new this code will not have high overhead. > If we can find and easy way to do it, I think this will be perfect. > >>> To summarize. >>> I think the following question must be answer before deciding: >>> 1. how many apps are going to use this feature? >> >> I'll keep OvS maintainers to answer if OvS would like to use it. We'll definitely >> use it (either from DPDK or from internal code base if it is not accepted), but I >> guess not open source projects may be not taken into account. >> > Agree lets see the application programmers view point on this. > >>> 2. it the coverage sufficient? >> >> I hope yes, since it tries to warn about not supported features. I.e. it does not lie >> simply skipping not supported bits. >> > > But then you can't copy paste it to testpmd and test, which I think is a very good > why to debug issues that costumers may find. > >>> 3. who is responsible to update it? (each developer/the interested >>> party member?) >> >> See above. >> >> I hope to see more answers here. >> > +1 > > Best, > Ori > This is an old patch still active in patchwork [1], lets try to conclude it. Patch is to help debugging flow API, by printing flow API rule in testpmd syntax so that issue can be reproduced/tested using testpmd. This support comes with some amount of code and I agree with Ori that it is a question who will add relevant code for future flow rules, and if it worth the overhead it brings. Also I have additional concern that how correct to associate this kind of support to testpmd syntax which can change or go away easily, and add code to ethdev library that has (logical) dependency to test application. Considering patch is sitting without update for a while and concerns above, I am rejecting this patch. But Aman has a good suggestion in other thread, why not record flow rule, and later parse it with a separate tool. This tool can generate output in testpmd syntax as well as any other format desired. With this ethdev code becomes very small and fixed size, and parsing code (tool) decoupled from ethdev library. If this is interesting to you, please start another thread to discuss or send another RFC for it. Thanks, ferruh [1] https://patches.dpdk.org/project/dpdk/patch/20210527082504.3495-1-ivan.malov@oktetlabs.ru/