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 27E9541E0A; Tue, 7 Mar 2023 21:41:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05DB440ED6; Tue, 7 Mar 2023 21:41:18 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) by mails.dpdk.org (Postfix) with ESMTP id AAC2C4067B; Tue, 7 Mar 2023 21:41:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgkihiQ8ZDbYvnAE0RePkMb5uiLbIf2X8i9UKZ19P2EaoEPxyYV6G/q5ND96j9HFHa5O0rWrTLUzroe5tpIlUEdY6jv3jB4Kf9C9vzw68OKbcapaw/9mg3EKAlq7u745+ASyvphGMbWJUW0Hu1KqtnWoH2Qlmgjw8iD5A9nete4G7wH8FYFTrcPk6jVFQVmf7og1Em3DgXmGoovImmjVTtfSTzbrJmaHIimEmcsNJnRMefU7LGT/IMu8p2fd+htPRSrGFooiOo3BiZyCBFyVE7DS7GsoQMMGV8k6wwhBddZeYu1W/C0KCBniCI8I4F2zmKAc6I7+S/VfYL++GY553g== 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=x5AXlcVCAkDR2xKr9N+zxH0jtxqq1trlZVYTeLjde+8=; b=mjY/eQMfH2fqcA3i156NEzhlvOmJNOLseiupoLwMJX+kcoWwKgUQaoakhlbIM9Iq2+5DCGC1yXW4KFGCQcNLGYK2xJoKjI4WC5TapPsdR0P2PPhsvKaGS0vuHAuOpHN2KdOFrPxYQ5/2OGaPORTpMw35lbnILpqUgufQk6hv2XjHHzdbH1YdbWDuL2v19tKOa30OhaUOyw5tK34FE97jlBQELLAapPupSeoLsdGA3+rH3yZnsg9RG7vcX9nv1T7lgGsp5CnKApmVRx7IVyI22zHhUerkTa42ZlRJ+b/f9HAjyaZbvvUHLXpZGiSpAxrlKkcGdSFDpAW/wtpqqSFSNQ== 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=x5AXlcVCAkDR2xKr9N+zxH0jtxqq1trlZVYTeLjde+8=; b=oOLfMy3CDC/oI7KXXtYTzTWlDUh4dKvsMGNDpf8f6RaHJXJbZl7FsyJ6tFoY1CTCymmScQhIwMI+eqQqD4hg+JtUk8+raG2aBT6++Tj1U7eSNeSQ51DP04VkDnN39ITffabtxdX1hg7HfPhsVhX21RuBNIYP7wA3YSklhHGz12A= 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 DS0PR12MB6559.namprd12.prod.outlook.com (2603:10b6:8:d1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.23; Tue, 7 Mar 2023 20:41:14 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6156.029; Tue, 7 Mar 2023 20:41:14 +0000 Message-ID: <47f02b76-d96e-dfb1-b689-53738dfedb0d@amd.com> Date: Tue, 7 Mar 2023 20:41:06 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Honnappa Nagarahalli , =?UTF-8?Q?Morten_Br=c3=b8rup?= , Feifei Wang , "thomas@monjalon.net" , Andrew Rybchenko , "techboard@dpdk.org" Cc: "dev@dpdk.org" , "konstantin.v.ananyev@yandex.ru" , nd , Ruifeng Wang References: <20220420081650.2043183-1-feifei.wang2@arm.com> <20230104073043.1120168-1-feifei.wang2@arm.com> <20230104073043.1120168-2-feifei.wang2@arm.com> <98CBD80474FA8B44BF855DF32C47DC35D8761D@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D877B7@smartserver.smartshare.dk> From: Ferruh Yigit Subject: Re: [PATCH v3 1/3] ethdev: enable direct rearm with separate API In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P302CA0017.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:2c1::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS0PR12MB6559:EE_ X-MS-Office365-Filtering-Correlation-Id: 65aaa7fe-ddeb-4827-1d3c-08db1f4c4ab6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XEkkRFVeXWuRm67UI2/Dc/ibQG5n8ikI4vSoL810Cx8y/BEZiNnYp/hNi62q5N2YNgSN0u2sUt2XGkN2Xp45bqbFNtcDRxb6Q+i9CtvFZUqKha0Rqke3ObeySXF/NVsWLlxa/kKpUEOe4pSdXSuwH/Syr9N/Rcli9u6BTVY6TUrop1ugRRHpsNDogW1g8QMcO2Mg7Tg2BgFhQJgFzeAvkmiyh0AoGK7HksFwbaGCnI9EECYAr4WpapP0OKdHYIg2GYR4tnVXughgqVFEkE5EsThySifBtsBwtM8ODIKPXFaRhb43rc0fwiMzbc7B1MnJKdCjhxwEKvjA307ODIIJhOoHu+QllClrOWV+j6rhjpD/4+4cNrDv7mIxDy0JMSd5OWu28KbvzkD+aZy8oqyii/63uUZ9O38OhEpb0LT/xCETS/OqW3+MfoLBTeTfb8ZYyl/HlJ+qsQMGvQEDQu3XEgo/Jy1awDhS4+jLj2s09XXdciIQxyQqZ/KsMLU192Y+LY8H3jtj0jcPwZHTCgb1Y11dUGf825ai/X6mkzyHRM5NSIA7Jf/GV3ONmbX8u2f9YWE/aiNEs7sBI6iiosFZasvlGEZMb+KNZXhvONVYDPfbVBUMPBQFWeb/TkvOvGtvr/9CgrlQo9XfMpjQLKe7ReOStveSKbqr22tvuo3RWFOFvX29Gp4lh1ivtI0cvtmDeQ506xlOQ5Ply2r+xo/A2AAm8FvToTynhADvyZztmk0= 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)(346002)(136003)(366004)(376002)(39860400002)(451199018)(31686004)(478600001)(66574015)(83380400001)(6666004)(36756003)(316002)(110136005)(38100700002)(54906003)(6506007)(186003)(53546011)(31696002)(6512007)(2616005)(6486002)(8936002)(2906002)(26005)(7416002)(44832011)(86362001)(8676002)(5660300002)(66476007)(66946007)(66556008)(41300700001)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZlhCWU43UmMzQ2w5dXd0SGt0VXF6aDJNNURETi9JODhxdVRNOHBIY3lEb0Zi?= =?utf-8?B?TC9jRWN2NitEdlpzRUpnS1NGclVaKytBTmxmWk16WSs5ZklyV0lJVktWSkl2?= =?utf-8?B?cCtrT1NwTT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?alp2NlJTanpKWEYvUklPYmZhaUVUcHVrTVdOTjhaUjJpdGgvZTVrSkJ4c3Mw?= =?utf-8?B?cGtJcC8wbzlad2hCMFo5ZUtTZHhMODJXbDd2amgrK0RlKzRUMHVOdi82UlRn?= =?utf-8?B?OVh2M2JBN01zNTU1QW5IMmdtZHhUdUpIRDFXNGxiU3hkRk5sbFE4Yjk4ZTlY?= =?utf-8?Q?/KltER+jX1wqLGFiBcCRxSb/t?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65aaa7fe-ddeb-4827-1d3c-08db1f4c4ab6 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2023 20:41:13.9636 (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: mAQTCdWusdErTZiJNgd13l+R/bPXbeHZyMQ9+VvLJRwhrSpW4AEaNnj6lOVKjeAQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6559 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 3/7/2023 6:12 AM, Honnappa Nagarahalli wrote: > > >> >> On 3/6/2023 1:26 PM, Morten Brørup wrote: >>>> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] >>>> Sent: Monday, 6 March 2023 13.49 >>>> >>>> On 1/4/2023 8:21 AM, Morten Brørup wrote: >>>>>> From: Feifei Wang [mailto:feifei.wang2@arm.com] >>>>>> Sent: Wednesday, 4 January 2023 08.31 >>>>>> >>>>>> Add 'tx_fill_sw_ring' and 'rx_flush_descriptor' API into direct >>>>>> rearm mode for separate Rx and Tx Operation. And this can support >>>>>> different multiple sources in direct rearm mode. For examples, Rx >>>>>> driver is ixgbe, and Tx driver is i40e. >>>>>> >>>>>> Suggested-by: Honnappa Nagarahalli >>>>>> Suggested-by: Ruifeng Wang >>>>>> Signed-off-by: Feifei Wang >>>>>> Reviewed-by: Ruifeng Wang >>>>>> Reviewed-by: Honnappa Nagarahalli >>>>>> --- >>>>> >>>>> This feature looks very promising for performance. I am pleased to >>>>> see >>>> progress on it. >>>>> >>>> >>>> Hi Morten, >>>> >>>> Yes it brings some performance, but not to generic use case, only to >>>> specific and constraint use case. >>> >>> I got the impression that the supported use case is a prominent and important >> use case. >>> >> >> Can you please give real life samples for this use case, other than just showing >> better performance number in the test bench? This helps to understand the >> reasoning better. > The very first patch started off with a constrained but prominent use case. Though, DPU based PCIe cards running DPDK applications with 1 or max 2 ports being used in tons of data centers is not a secret anymore and not a small use case that can be ignored. > However, the design of the patch has changed significantly from then. Now the solution can be applied to any generic use case that uses run-to-completion model of DPDK. i.e. the mapping of the RX and TX ports can be done dynamically in the data plane threads. There is no need of static configuration from control plane. > > On the test bench, we need to make up our mind. When we see improvements, we say it is just a test bench. On other occasions when the test bench does not show any improvements (but improvements are shown by other metrics), we say the test bench does not show any improvements. > >> >>> This is the primary argument for considering such a complex non-generic >> feature. > I am not sure what is the complexity here, can you please elaborate? I am considering from user perspective. OK, DPDK is already low level, but ethdev has only a handful of datapath APIs (6 of them), and main ones are easy to comprehend: rte_eth_rx_burst(port_id, queue_id, rx_pkts, nb_pkts); rte_eth_tx_burst(port_id, queue_id, tx_pkts, nb_pkts); They (magically) Rx/Tx buffers, easy to grasp. Maybe rte_eth_tx_prepare() is a little less obvious (why/when to use it), but still I believe simple. Whoever looks to these APIs can figure out how to use in the application. The other three is related to the descriptors and I am not sure about their use-case, I assume they are mostly good for debugging. But now we are adding new datapath APIs: rte_eth_tx_fill_sw_ring(port_id, queue_id, rxq_rearm_data); rte_eth_rx_flush_descriptor(port_id, queue_id, nb_rearm); When you talk about SW ring and re-arming descriptors I believe you will loose most of the users already, driver developers will know what it is, you will know what that is, but people who are not close to the Ethernet HW won't. And these APIs will be very visible, not like one of many control plane dev_ops. So this can confuse users who are not familiar with details. Usage of these APIs comes with restrictions, it is possible that at some percentage of users will miss these restrictions or miss-understand them and will have issues. Or many may be intimidated by them and stay away from using these APIs, leaving them as a burden to maintain, to test, to fix. That is why I think a real life usecase is needed, in that case at least we will know some consumers will fix or let us know when they get broken. It may be possible to hide details under driver and user only set an offload flag, similar to FAST_FREE, but in that case feature will loose flexibility and it will be even more specific, perhaps making it less useful. > I see other patches/designs (ex: proactive error recovery) which are way more complex to understand and comprehend. > >>> >>>> >>>> And changes are relatively invasive comparing the usecase it >>>> supports, like it adds new two inline datapath functions and a new dev_ops. >>>> >>>> I am worried the unnecessary complexity and possible regressions in >>>> the fundamental and simple parts of the project, with a good >>>> intention to gain a few percentage performance in a specific usecase, >>>> can hurt the project. > I agree that we are touching some fundamental parts of the project. But, we also need to realize that those fundamental parts were not developed on architectures that have joined the project way later. Similarly, the use cases have evolved significantly from the original intended use cases. We cannot hold on to those fundamental designs if they affect the performance on other architectures while addressing prominent new use cases. > Please note that this patch does not break any existing features or affect their performance in any negative way. The generic and originally intended use cases can benefit from this feature. > >>>> >>>> >>>> I can see this is compared to MBUF_FAST_FREE feature, but >>>> MBUF_FAST_FREE is just an offload benefiting from existing offload >>>> infrastructure, which requires very small update and logically change >>>> in application and simple to implement in the drivers. So, they are >>>> not same from complexity perspective. >>>> >>>> Briefly, I am not comfortable with this change, I would like to see >>>> an explicit approval and code review from techboard to proceed. >>> >>> I agree that the complexity is very high, and thus requires extra consideration. >> Your suggested techboard review and approval process seems like a good >> solution. > We can add to the agenda for the next Techboard meeting. > >>> >>> And the performance benefit of direct rearm should be compared to the >> performance using the new zero-copy mempool API. >>> >>> -Morten >>>