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 55A2842486; Wed, 25 Jan 2023 14:17:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1BC542D3E; Wed, 25 Jan 2023 14:17:14 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2058.outbound.protection.outlook.com [40.107.220.58]) by mails.dpdk.org (Postfix) with ESMTP id BE79942D31 for ; Wed, 25 Jan 2023 14:17:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JYBtzX1Mciu1m82aKLMYsfiw8W3MM71+/EzSIylVKwFEVLmEP9L5hul9Lg2/69GlWMw3wFyhCZQsKJP1UGSxiy0ZXTzwz6bHxnEcThtsmJZc2/Eo27ynbpQeo6g8DLPffPkTk8yHVnVcYpP0u3NgxA4Rz22j/Zk9BebmgF966LLvDxDBYR90H5MZrNyUmCeekstSRZXBktPtxDQVGJVeHJMne9BdO9+1BXQekTXbbDD2ivnc4gnToShp/ZKEt0dw3PzZCaCbply/M9jX8tTavYL9p+sCszmQbVxAQ0VH/5rHQCFwk1gzPvxENRRRueJ2ALR35ABMIJUS/jGAXw0/mw== 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=DVuV/qIq+8C11dN+kP44ooWidYNp+3MqP40CMPWBWlY=; b=Zf+8Vh0gZGspJX2vkGhkvoRfYTZWuevCdUrU0nQnpR6VRSKD+yyzrqSkunnJVRsMXr40J/HCd+s/8v5l2Der/i1JWyjSStxSRGd/IW2t5gr37m+ZOsf1VVx4kku7VrB9Z/nbu3cDkippZsDWsCtPHE2SKkF+UzuaGP1pAK7XgVogYwmcOdZ5GiF+QZKdqgqn+JyQXqXCTv2Wx2oHo61lqWVDQ/sFJNKf920fs1V1nL7cYiqjhaAT+PSvw3B7GbNCAOCkxqJQphic+1FfA/EorF8XeFqL0qmX+E/QnwKGX8KSHRIrwKV7r7G3g6KU2wlOqofiz6FT4P+Hdqt989/KrQ== 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=DVuV/qIq+8C11dN+kP44ooWidYNp+3MqP40CMPWBWlY=; b=3UjvJI73lcqovRdxt1CRt8xXokJ/bXYc1ipIi25oxkxS/UiQigf/Kle68A9FeCshDDOh7Jdiy+F8rRXfLwZScyttOBnivTf+UByzBrzuGFzGDhaY/J3ldeLIYGMplycv7EjveqAkfp8JBtYSwmeUt0/2NOl+MsIe1rYGdtzitGA= 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 SA1PR12MB8600.namprd12.prod.outlook.com (2603:10b6:806:257::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 13:17:10 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%7]) with mapi id 15.20.6002.033; Wed, 25 Jan 2023 13:17:10 +0000 Message-ID: <1cc09d94-cd90-e60a-27c1-4a0b7a6a3c02@amd.com> Date: Wed, 25 Jan 2023 13:17:03 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: Hanumanth Reddy Pothula , Aman Singh , Yuying Zhang , Ivan Malov , Andrew Rybchenko , Thomas Monjalon Cc: "dev@dpdk.org" , "viacheslavo@nvidia.com" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram References: <20221220200250.2413443-1-hpothula@marvell.com> <20221221020713.2803232-1-hpothula@marvell.com> <20221221020713.2803232-2-hpothula@marvell.com> <11fa3448-7348-09d6-b7e0-321aef1d8953@amd.com> From: Ferruh Yigit Subject: Re: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process Rx metadata negotiation In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0043.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::12) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SA1PR12MB8600:EE_ X-MS-Office365-Filtering-Correlation-Id: 165e4810-f7ad-46c6-eb91-08dafed67723 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 99Z5Gq4xmnlQREfhRkE1x+Zv/692QcqvYaOhmbwv/mer3MM/n7f4J6wscwlnw2VPVZnIa4rtzpJWDqgZdcIyt47VbYBBBO8eNCzFSRYrirEXzC5LCyPNgiyJgI2l5mP/WyYC0f+cxbtL4o6lr3P9QJVtinEJtV+zJW4AAUdrCuFwVSCgHF3MERDtUbH1wtycujf+5KbVSJ0HC8IsXWHyOfYCPFklkYWplLI+GA/QqNv8lT5+eWGLd76oq1xoRmj5HaGibZb36mNwTQwKyitPBd/xTVYgIUP9AIQa4xMeMoyxJQa20QYL5R3WBv+h6JwjujQBWtdgj9//mdoAMIsGgiR+w52BSWOSCeLV0bxlKQ+l5NEe523C2TuZbff4mmMzQMBDjXb6G5kk+xAyJ4SZa+8DbOKR4q7DqXjGieahtFsdvBlhYtklrTxprZuWNf/iHJihQJJnrawEyclrPYGpXfl7B/zaTKenDUqEP8wlYPr5FN2dMnejf5Lgi2ekWV8/OtkGhSc3Vc4vvmJrE8HR8EGS8BmwOSRbsXrkbLbwxh2bcQGLGTpAUqMBY0jpPw7cN061GacfpfO8x6oggGQtIhcDLx9AWScP+kxOmiKRxK7Jq6KNMYiy0MQAONk+p5mb25rQ8Di76Afzl1Xka8Oer7NM8G87/CwTQfUeTZetaGVJqZeUWe+iWXMoVrUpsn0+LBux+/cZ+DFrwiToChpvwu/e3a6xuJzFbADbsMgTIbZclIy3qo5SYIFShszqMiKyMB/lGoBBUj0UvShgjYjOZQ== 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)(396003)(376002)(39860400002)(136003)(346002)(366004)(451199018)(5660300002)(83380400001)(31696002)(86362001)(2906002)(38100700002)(7416002)(44832011)(8936002)(41300700001)(4326008)(54906003)(53546011)(8676002)(186003)(2616005)(6512007)(478600001)(6506007)(6666004)(66946007)(110136005)(6486002)(316002)(66476007)(66556008)(31686004)(26005)(966005)(36756003)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b25ONE9TU3NueDRTTG5qVENzdG15Uit5SW9PMWVmUldQYkEyWEhBNU9teVlP?= =?utf-8?B?ZFQ0NExiMUdjeWNWYWJrZnpqWXgyN3JjcVdpYjZBaHZtelFuMSt6bEs0SjZZ?= =?utf-8?B?ZVRqMGxxRldWS2JjTkRhU2tCZUtrQlVVZGFFSE1VUjB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f-8?B?bFNpRExjOFJIY1hLMVlOeW1BbGtrWG9VZlBDMmZsZ1hUS2k2NE1GMHR5NTRV?= =?utf-8?B?SDFWaW5vUjlqOTVVVWhPVGJzQXA1WjdlWHNxQnZldVFwTGl2TmdZQ3ZFSWx3?= =?utf-8?B?RlhEZ1VOMGhUaTRDaE83OHdZVGFBNFY0Z2kvT1U4QVlkSmkxVkZ0Q3VWWkxa?= =?utf-8?Q?Ex2n48RdYEGBFItk4KatLaY8c?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 165e4810-f7ad-46c6-eb91-08dafed67723 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 13:17:10.4279 (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: Db+jPaw5iKn2k+q6Nnn8w+iRj0E6BIPmQ+Wa4YoTXb8/4epAzjv06m3vz0AeG+fM X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8600 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/2023 9:30 AM, Hanumanth Reddy Pothula wrote: > ++ Ivan Malov and Andrew Rybchenko > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Tuesday, January 24, 2023 11:34 PM >> To: Hanumanth Reddy Pothula ; Aman Singh >> ; Yuying Zhang >> Cc: dev@dpdk.org; andrew.rybchenko@oktetlabs.ru; >> viacheslavo@nvidia.com; Jerin Jacob Kollanukkaran ; >> Nithin Kumar Dabilpuram >> Subject: [EXT] Re: [PATCH v5 2/2] app/testpmd: add command to process >> Rx metadata negotiation >> >> External Email >> >> ---------------------------------------------------------------------- >> On 12/21/2022 2:07 AM, Hanumanth Pothula wrote: >>> Presently, Rx metadata is sent to PMD by default, leading to a >>> performance drop as processing for the same in Rx path takes extra >>> cycles. >>> >>> Hence, add new testpmd command, >>> 'enable port nic_to_pmd_rx_metadata' >>> >>> This command helps in sending Rx metadata to PMD and thereby Rx >>> metadata flow command requests are processed. >>> >>> Signed-off-by: Hanumanth Pothula >> >> Hi Hanumanth, >> >> I agree with Thomas for the patch. >> >> 'eth_rx_metadata_negotiate_mp()' requests all Rx metadata offloads to be >> enabled, but at this stage if there is no flow rule for Rx metadata why it is >> consuming extra cycles? >> >> Can you update driver code to process Rx metadata when it is enabled by >> application (via 'rte_eth_rx_metadata_negotiate()') AND there is at least >> one flow rule for it? > > #1 What is the purpose of rte_eth_rx_metadata_negotiate() API if it is always called by testpmd. > We thought it was added so that when that metadata is not needed, application need not call this > thereby saving cycles/bandwidth. > Purpose looks like to 'negotiate', so it is both ways: a) To learn Rx Meta capability of HW b) To configure Rx Meta feature for HW So it is both to help application to learn what flow rule is supported and to help driver to improve performance. Before this API application assumed all Rx metadata flow rules are supported, so why enabling all causing performance drop, that was the default without this API. But other-way around can be true, to disable some offloads can improve driver performance. Looking again, > #2 We use this API similar to Rx/Tx offload flags so that we can set things up before device is > configured. We thought that is the purpose of having this negotiate API and avoid depleting offload flags. > > #3 Generally any new offloads added to DPDK would be in disabled state in testpmd and we would have > an option to enable it. In this case, testpmd is by default calling this negotiation. > > We can update the driver if the purpose of this API is clear. Hi Hanumanth, After looking the history of the API again, you may be right. One of the previous version commit log describes the intention better [1], because of negative performance impact of enabling Rx metadata offload by default and difficulty to switch configuration dynamically, there is a desire to learn application intention before configuration. Although I have some concerns with this API [2] it is already there as stable API. So it sounds reasonable to make this configurable for a test application, indeed intention of the API is to get this configuration from application and operate based on it. Next question is what should be the default value, I am not sure about it, there are only a few drivers impacted from this overall. For the Thomas' point, it helps to test the feature of its impact if it is enabled by default. Will it work to enable them all by default and add capability to disable it in testpmd, which helps to run performance tests also to verify the impact of the API? Thanks, ferruh [1] https://inbox.dpdk.org/dev/20210902142359.28138-2-ivan.malov@oktetlabs.ru/ [2] API does two things: a) Learn Rx Meta capability of HW b) Configure Rx Meta feature for HW Functionality (a) conflicts with rest of the flow rules that capability checked via `rte_flow_validate()` API. Functionality (b) conflicts with configuring flow actions, this configuration should be controlled by flow rule not with a specific API, although I understand the reasoning behind the API. RSS_HASH offload seems given example in the discussions but it is still controlled via offload flag, there is no specific API to configure RSS hash functionality, same could be done here. [/2]