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 0B59441B9F; Wed, 1 Feb 2023 15:50:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E08D74021D; Wed, 1 Feb 2023 15:50:49 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2069.outbound.protection.outlook.com [40.107.94.69]) by mails.dpdk.org (Postfix) with ESMTP id C56E340141 for ; Wed, 1 Feb 2023 15:50:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j1VDsrVYrTd23shKKksZaFfDLWQLqubaIjhR1+Rh33iTIkM54wl9ZiLOO/35EYmxLyi9Sne14gxVPCVhwise87powRbhZoaGTuVu8CIgpOHImn+bzRBx2qC+V1tFMCnx7LB+QUyVGglCbHbRqfqvo82YvHElVFP4bdl1P4Dsmt88VBJSBD2Cstu3jNXem3el5u5KHqTzjZdytVZlv6YVRT0z4eg65+AF1EIHE16kCZBpY1Ap3r+NhV0tcjuE6m3/R6/d3Z0ye7PyU4yc3GpVXGQECfsn9KMmGTSJ35Oi9ADKPJMxoA94FicMUfm/qbciG4pDC3v78dPKfWSsAthV6w== 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=aWMN98tNDzueNjMbiiqw5/uNGmecANzp+Jke/nMKIjc=; b=i3ef7hZ1jgnhh4gQ1GbB1mdRrF3uh29DnLZbXhSE/Ww8dx/iyqMGChw1cPqf4soBE7moO8lEINowyzWE693uRCW3A20ii2008WqwPsG3bszQKsPAGapZCJCbevlGK1mDarvcAKKWILFujffvzCCGGJg391FioNcg/hCRqEiEGKfq9GO5qxkwP9zDQ/soqrEHab/21Wum0FwKjs7ucw7s11z79jBjTPffIkq9vPQAW/VrTAt5hCR5PzJgwAwSSo6AfyYJ4qss+1XpsJuBvrJKTOuxLwDWyu26WrcAA55NeS65VfAWYv71aJYfqKMFnG4X5nOAgLBY3AiwtrfaV9nv9g== 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=aWMN98tNDzueNjMbiiqw5/uNGmecANzp+Jke/nMKIjc=; b=c5ciAxcS8Y1QujjuNHovMzd8IP0p1TQUZNLWUruj3Dwsbh1xE76YKTIANi5tSEOcM/swO4mKuR5b2s5rsrLptQROAiv1rTxPTKdiCFqJ0kZziKccRxqFO3MTQ6JnTpuYDAisgcwy7oZ9Rr8WX0RsKz45qUG5tssonmGfVnonT18= 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 DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 14:50:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6064.024; Wed, 1 Feb 2023 14:50:46 +0000 Message-ID: <01d3b455-3f3e-2658-db51-4da7cfc3cdeb@amd.com> Date: Wed, 1 Feb 2023 14:50:39 +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: Jerin Jacob Cc: Thomas Monjalon , Andrew Rybchenko , Ori Kam , Ivan Malov , Nithin Kumar Dabilpuram , Aman Singh , Yuying Zhang , "dev@dpdk.org" , Hanumanth Reddy Pothula , Slava Ovsiienko , Jerin Jacob Kollanukkaran , "david.marchand@redhat.com" References: <20221220200250.2413443-1-hpothula@marvell.com> <98a80c20-a5e4-deea-f7dc-c6aa5d52800b@oktetlabs.ru> <2490780.4XsnlVU6TS@thomas> <22a65100-bee8-1726-6e27-14b9028a29d4@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: LO2P265CA0246.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::18) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS7PR12MB6048:EE_ X-MS-Office365-Filtering-Correlation-Id: 67f923e4-ac24-4fe7-29d2-08db0463b35d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ySqdmbHvZL/tM5F8JiONfZOjyEVK77Q93I004sq1GFcZYG1ZgHryvFL0eK5OoHI2bGTXG3+RBfaLh5/iPbudTgInwEbRP0wn8BeO9d0+BNz/SyCPCR2L4O6pFTRLlvcvcj1UGpVyXc8teMh6lgFn8v2kdm/DwfTb2qXOC2zO0KVlxo1RtRztNMtNkPJRXLkWi8aiATsBSsM5FndUzV4P/D6InX5icY9sFP8MvGbUc6wYCUvlGVyGDthhr1Rvm2Bxv7ZlMhYioyyvEav/ajPtu/O3fAiY7t6y7qumyXIjdGy/lsclECsXeQ0QhjM2xTQSTyMIcYfAcItkuUDnU3KI60v0SLz6ghl0//hSQ0ykdrBCm20qX8gjB0RmKkUP0aNwLEOJrbKvwhkMk/xKTADSqxUw8/0i6sMJjx5TyQkKV85QSrqII/qn5Y9oDFkiVD5+elmgQrjusD1mNAiJa/t10sUjo1dlXVyvG4Y3tHyPbmTb3y5TN49sLMt9LNWPEgJMmLTjDC2fC2yOkXO8hsFZCv3fjmCJctTyzZlj3FTjJvPtisYyPPLaxnBvGd+pCqsPEkB6KYv3Md9+/L/L0LfgkinEqlyh+SJ7cP5IEerS+njDYwg/n+3M1ts3kkhmhezEet6AcVy5IrM8VyiHJE2ytD2DHf9uZssj5F1X9T9bzxtMzOQY753jt32iN9sdxyMS7w/iIt6avvtEooQVi4aUiNSHXjn4YsgWZTXD4UDtni8= 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)(366004)(396003)(376002)(136003)(346002)(39860400002)(451199018)(6486002)(66476007)(4326008)(6506007)(478600001)(6916009)(2906002)(53546011)(8676002)(8936002)(41300700001)(26005)(66556008)(186003)(66946007)(44832011)(6666004)(83380400001)(316002)(7416002)(54906003)(5660300002)(38100700002)(36756003)(86362001)(31696002)(6512007)(2616005)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VVFic1FUSUplQ0lHSGtaTWpZaWp2Rlc1UXZXcDh6OW1mZi83c0ZSZ2Z1UzBS?= =?utf-8?B?TlNVaG9wbVBXMENiMHMvT0lDeDcrUDFNZmtFRHErWlVTOUdSelJxV2p4ODBP?= =?utf-8?B?UnVmR3dsaEp5NnpKZnVJNHhKQ2EzNTB5WW5oOGVtb0hlS2VkRjFuS2ZaSmNy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N1dkMWNORVhDME8wcTVWa3ZCOVVOZzQ1Mm4z?= =?utf-8?B?Z1dMRnB2dnRVVDBCV2pMZEFGT01QNTA4SDhtbGxuWFpJeGFjakR3VU1MeDh4?= =?utf-8?B?N1ZvQzhHRkRPU3djeDlkRnZ4dkgyKzVneEkxN25iZTE3bHZ3ZEdIVkY2eDVW?= =?utf-8?Q?SGjtoZ8I6pm+6Rrqe/9QyUJ0n?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67f923e4-ac24-4fe7-29d2-08db0463b35d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 14:50:46.3994 (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: edImce0JBM+AEhQYJZ9pZQfFsNE8zx9N+Kl4r5CDxQMexdSV6HYfWAPlmS0H6bK+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6048 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/2023 1:48 PM, Jerin Jacob wrote: > On Wed, Feb 1, 2023 at 5:06 PM Ferruh Yigit wrote: >> >> On 2/1/2023 11:15 AM, Jerin Jacob wrote: >>> On Wed, Feb 1, 2023 at 4:35 PM Thomas Monjalon wrote: >>>> >>>> 01/02/2023 11:58, Andrew Rybchenko: >>>>> On 2/1/23 13:48, Jerin Jacob wrote: >>>>>> On Wed, Feb 1, 2023 at 2:59 PM Andrew Rybchenko >>>>>> wrote: >>>>>>> Frankly speaking I don't understand why default value is so >>>>>>> important if we have a way to change it. Reasons should be >>>>>>> really strong to change existing defaults. >>>>>> >>>>>> The only reason is, typically testpmd will be used performance >>>>>> benchmarking as an industry standard. It is difficult to tell/educate >>>>>> the QA or customers >>>>>> that, "BTW if you need to get better performance add more flag to >>>>>> testpmd command line". >>>> >>>> I disagree. >>>> When you do performance benchmark, you tune settings accordingly. >>> >>> IMO, We tune the system resources like queue depth not the disabling >>> features for raw performance. >>> queue depth etc people know to tune so it is obvious. What is not >>> obvious is, testpmd only >>> negotiated some features by default.I am not using that feature, hence >>> I need to explicitly >>> disable it. >>> >> >> When 'rte_eth_rx_metadata_negotiate()' API is NOT used at all, and I >> believe that is the case for almost all applications since API is a >> relatively new one, PMD default behavior should be to enable Rx metadata >> flow rules, in case user requests them later. >> >> So, enabling all in application is same with not calling the API at all. >> >> In this perspective, disabling Rx metadata is additional >> optimization/tuning that application can do if it is sure that Rx >> metadata flow rules won't be used at all. >> And API is more meaningful when it is used to disable Rx metadata. >> >> I think it is reasonable to enable all Rx metadata by default in testpmd >> with a capability to disable it when wanted. >> >> OR >> >> May be we don't call 'rte_eth_rx_metadata_negotiate()' API by default in >> testpmd, it is only called when it is requested explicitly from user, >> enable or disable. > > Second option looks good to me. > When > 1) user request for action which is needed negotiate(), > AND > 2) rte_eth_rx_metadata_negotiate() != ENOSUP > then, testpmd print a warning that need to enable > rte_eth_rx_metadata_negotiate(). > We are not suggesting same thing. What you described above assumes PMD disabled Rx metadata flow rule support by default, and it needs to be enabled explicitly by 'rte_eth_rx_metadata_negotiate()' API. This API becomes mandatory for functionality. As far as I understand PMD wants to disable this flow rule by default because of performance concerns. But this creates inconsistency between PMDs, because rest of them will enable this flow rule by default (if it is supported) and be ready to use it when proper flow rule created. With this approach some PMDs will need 'rte_eth_rx_metadata_negotiate()' to enable Rx metadata flow rules, some won't. This can be confusing for applications that *some* PMDs require double enabling with specific API call. Instead what I was trying to suggest is reverse, all PMDs enable the Rx metadata flow rule by default, and don't require double enabling. But if application knows that it won't use Rx metadata flow rule, it can disable it to optimize the performance. This makes 'rte_eth_rx_metadata_negotiate()' functionally optional, and for testpmd context it can be called via a command on demand by user for optimization purpose. > >>> >>>> >>>>>> To make that worst, only some PMD needs to give the additional >>>>>> parameter to get better number. >>>>>> And also, testpmd usage will be treated as application modeling. >>>>>> >>>>>> Since this feature only used on sfc and cnxk driver, What is the >>>>>> situation with sfc driver? >>>>>> Keeping it as negotiated and not use the feature, will impact the per >>>>>> core performance of sfc or >>>>>> is it just PCI bandwidth thing which really dont show any difference in testpmd? >>>>> >>>>> Yes, sfc could run faster if no Rx metadata are negotiated. So, >>>>> it is better to negotiate nothing by default. But it is always >>>>> painful to change defaults. You need to explain that now you >>>>> need to negotiate Rx metadata to use mark, flag and tunnel offloads. >>>>> Yes, it will be required on sfc and cnxk only. >>>>> As an sfc maintainer I don't mind to change testpmd defaults. >>>> >>>> If we change testpmd defaults to "do nothing", >>>> then we should disable MBUF_FAST_FREE as well. >>> >>> if you see MBUF_FAST_FREE, it does nothing. Actually, >>> !MBUF_FAST_FREE is doing more work. >>> >>> >>>> >>>> >>