From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C232A0487 for ; Tue, 2 Jul 2019 19:38:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 962105F11; Tue, 2 Jul 2019 19:38:19 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id 652ED5689; Tue, 2 Jul 2019 19:38:18 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id DE82F4000A; Tue, 2 Jul 2019 19:38:17 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id CB56940006; Tue, 2 Jul 2019 19:38:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.1 X-Spam-Score: -0.9 Received: from [192.168.1.59] (host-90-232-200-177.mobileonline.telia.com [90.232.200.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id DCC8140003; Tue, 2 Jul 2019 19:38:15 +0200 (CEST) To: Anoob Joseph , Thomas Monjalon , Bruce Richardson Cc: Jerin Jacob Kollanukkaran , "dev@dpdk.org" , Nikhil Rao , Erik Gabriel Carrillo , Abhinandan Gujjar , Pablo de Lara , Narayana Prasad Raju Athreya , Lukas Bartosik , Pavan Nikhilesh Bhagavatula , Hemant Agrawal , Nipun Gupta , Harry van Haaren , Liang Ma , "techboard@dpdk.org" References: <3848960.f2llPjXIeu@xps> From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= Message-ID: <27d46871-fa0c-1144-b7fa-8c57154478b3@ericsson.com> Date: Tue, 2 Jul 2019 19:38:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 00/39] adding eventmode helper library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2019-07-02 18:18, Anoob Joseph wrote: > Hi Thomas, Bruce, > >> For what exactly is being proposed, is there a short version of the suggested approach and the logic behind it? >> I think eventdev should be simple to use and could be added to any example like >> l2fwd. The idea of forking an example, where we should be able to have an >> unified API, is a proof of failure. > > As Mattias had mentioned earlier, eventdev is complicated because of a reason. It exposes lot of configuration which can be used to dynamically load-balance real world traffic. With various adapters like, Rx adapter, Tx adapter, crypto adapter etc getting implemented, applications can better utilize capabilities of event device. But all the existing example applications in DPDK is designed around mbufs and polling of cores on various devices. If an application has to fully leverage capabilities of an event device, it has to setup all these adapters and devices. And, as Mattias had mentioned, this involves lot of configuration. This configuration would be repeated for every application which would need to run in eventmode. Eventmode helper abstracts this. > A question I asked myself when I had a look at the patch set is: does eventmode really abstract processing pipeline configuration, or is it merely making a bunch of assumptions and hard-coding a bunch of configuration parameters. Merely reducing flexibility doesn't qualify as abstraction, I would say. > For an existing application to be moved to eventmode, all it would take is couple of function calls and fine-tuned worker thread. If you want to use eventdev as a very complex implementation of software RSS, sure. If you have a problem which solution requires a multi-stage pipeline, going from a run-to-completion model to a scheduled pipeline is going to have a big impact on your code base, and eventdev configuration will be a relatively minor part of the work, in the typical case, I would expect. > Just to remind, this is the 3rd iteration of submitting patches. The first set of patches were submitted by Sunil Kori from NXP and that involved additions in l3fwd application. It involved addition of lot of code, and Bruce wanted to make the additions common. Jerin suggested to add these in event dev library. > > The second iteration involved additions in l2fwd and introduced eventmode in eventdev library. Then it was up for discussions again and it was decided that for l2fwd, a new application for eventmode would be drafted, but for l3fwd & ipsec-secgw, the original application would get additions. L2fwd-event will be used to finalize the event-mode library before extending to other applications. > > Now this is the third iteration. > What is your point? >> About the helper, I see some command line processing and other things which have nothing to do in a library. >> Actually I fail to understand the global idea of this helper. >> There is no description of what this helper is, and even no name for it. > > All the eventmode configuration need to be user defined. So either every application would need the code duplicated (how the code for lcore-port-queue conf required for eth devs is repeated in every app) or be kept common. Again, that can be kept as a separate header and can be copied around. I don't see any issue, if you are fine with it. > OK, so in real-world applications, duplicating eventdev configuration is not a major concern. You will have very few applications, and if they have a similar structure, you can reuse your proprietary framework. If they don't, no big deal. Just an additional 1% of application code to maintain. For the DPDK example applications, the situation is very different. Many trivial applications with a similar structure. I'm sure solving the framework problem for this subset of applications is easier, but I would expect such a library would have limited value outside the realm of the example directory. Although it might make the DPDK example code base more maintainable, my fear is that it'll just confuse the reader of the example applications. Now they have to understand a framework *and* an application, and not only the example application. Add to this that the framework you just spent time understanding will also not provide - at least not in its current form - a good foundation for non-trivial applications. The DPDK APIs shouldn't be optimized for example applications.