From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by dpdk.org (Postfix) with ESMTP id 78E241B19 for ; Wed, 28 Mar 2018 10:10:22 +0200 (CEST) Received: by mail-wr0-f173.google.com with SMTP id z73so1349844wrb.0 for ; Wed, 28 Mar 2018 01:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dgVEUt+imN0r5JpiMkcnsE/harlxG+sMZnep4z4Wkek=; b=0uk3Uz/MR1VlGIXhZhkAfhmznac4NoLed71cVT6JyoJm56NM5kKoJfrXw0TRghUbv2 JAGbiLDSx47uRZArDMl6K9WW8oUo6Gdapv2wd5f9uf2nOauBYH/JiYJ9W6ntsAPmuDO9 vsANjT7ewijYez1HTtHAb4n/l1CnW/F0y5j4DWRiAjBlvR7/glwjvS1suFt7SO0N72DX NORR+bV+awQ3tfzTMcj2uZnsJXgrVke7bRze2J8BCtFZJNROJ9HYgkcKnwPOXpOHohgk Bur3XHTkHCn6Xz+RRRKI4C3gtA3bX1SDvFnB78354WHQHt0MpdaUWFL+O/kedXkRObHy c9gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=dgVEUt+imN0r5JpiMkcnsE/harlxG+sMZnep4z4Wkek=; b=BtrrIo/QBr7d87WyndlImMvSOYIHzK4lpVYDtEvK4Bd8z+/JmaHyoWzH6WGfZtQFms pog6MfKAy9wJq+UzHqTbh8Zb8B3sXxsvQ04eNAtQdtVUT0tbbpptaGjW+H01ysD/CBgL yxsnGVlp6JEmGhDkiniFUw7EPNLvTzngF1Bi92cTOCo0hyfDNUkfOtldRg0+1DFsnXAT Ix6/QHw9sLYNJ04wBzDGTgtnTIMl7RVlqtDucIBpz4s4UbvR3JeW8rXfiZUvwN1q3J4d Q7EONCt3am0EzaLXFCb45HPIAL43Bxk9jCcZ1TMowFCOMtELiINNkIGsQGyA3GEwKIOi o0XQ== X-Gm-Message-State: AElRT7E9l4XHs6lHU5Ysyk1li4TOkf97ytSfTj/DF5PO1fhBPV58+wGo O++MqAz2696UG/4mURY5tbFqIw== X-Google-Smtp-Source: AIpwx490p6evG3gePpqxEjkqIBIJznt+JOFx7rimy8OWjL9J0g/ZWUmlItvye+9866O9EdPxn50/zg== X-Received: by 10.223.182.132 with SMTP id j4mr2014340wre.66.1522224621934; Wed, 28 Mar 2018 01:10:21 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t196sm3837783wme.35.2018.03.28.01.10.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 01:10:21 -0700 (PDT) Date: Wed, 28 Mar 2018 10:10:07 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Neil Horman Cc: "Richardson, Bruce" , "dev@dpdk.org" , "Wiles, Keith" Message-ID: <20180328081007.balvfgy5cwnxdd7k@bidouze.vm.6wind.com> References: <20180327114750.GA30585@hmswarspite.think-freely.org> <20180327124000.6n63hpng53tm3bil@bidouze.vm.6wind.com> <20180327182633.GC30585@hmswarspite.think-freely.org> <20180327202040.rd3yixr67c3jbx4p@bidouze.vm.6wind.com> <20180327202807.GB16780@bricha3-MOBL.ger.corp.intel.com> <20180327203513.ubgyukhsqjqg7s7y@bidouze.vm.6wind.com> <59AF69C657FD0841A61C55336867B5B07226BF75@IRSMSX103.ger.corp.intel.com> <20180327235346.GB16505@neilslaptop.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180327235346.GB16505@neilslaptop.think-freely.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 10/20] eal/dev: implement device iteration initialization 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: , X-List-Received-Date: Wed, 28 Mar 2018 08:10:22 -0000 On Tue, Mar 27, 2018 at 07:53:46PM -0400, Neil Horman wrote: > On Tue, Mar 27, 2018 at 08:48:01PM +0000, Richardson, Bruce wrote: > > > > > > > -----Original Message----- > > > From: Gaëtan Rivet [mailto:gaetan.rivet@6wind.com] > > > Sent: Tuesday, March 27, 2018 9:35 PM > > > To: Richardson, Bruce > > > Cc: Neil Horman ; dev@dpdk.org; Wiles, Keith > > > > > > Subject: Re: [dpdk-dev] [PATCH v3 10/20] eal/dev: implement device > > > iteration initialization > > > > > > On Tue, Mar 27, 2018 at 09:28:07PM +0100, Bruce Richardson wrote: > > > > On Tue, Mar 27, 2018 at 10:20:40PM +0200, Gaëtan Rivet wrote: > > > > > On Tue, Mar 27, 2018 at 02:26:33PM -0400, Neil Horman wrote: > > > > > > On Tue, Mar 27, 2018 at 02:40:00PM +0200, Gaëtan Rivet wrote: > > > > > > > On Tue, Mar 27, 2018 at 07:47:50AM -0400, Neil Horman wrote: > > > > > > > > On Tue, Mar 27, 2018 at 01:18:34AM +0200, Gaetan Rivet wrote: > > > > > > > > > Parse a device description. > > > > > > > > > Split this description in their relevant part for each layers. > > > > > > > > > No dynamic allocation is performed. > > > > > > > > > > > > > > > > > > Cc: Neil Horman > > > > > > > > > Cc: "Wiles, Keith" > > > > > > > > > Signed-off-by: Gaetan Rivet > > > > > > > > > --- > > > > > > > > > > > > > > > > > > This version uses librte_kvargs. > > > > > > > > > > > > > > > > > > > > > > > > > Otherwise, this looks pretty good to me > > > > > > > > > > > > > > Please look into the librte_kvargs compatibility patch as well > > > > > > > (quite short). I'm very unhappy about the logging hack. > > > > > > > There is always the solution of setting a function pointer on > > > > > > > rte_log with the proper loglevels and so on. > > > > > > > Ideally rte_log could be made independent (starting skimming EAL > > > > > > > from all the fat), but this is much less trivial. > > > > > > > > > > > > > just posted about that. I agree with Keith, I don't think you > > > > > > should need that patch. RTE_LOG just calls rte_vlog which contains > > > this code: > > > > > > > > > > > > if (f == NULL) { > > > > > > f = default_log_stream; > > > > > > if (f == NULL) { > > > > > > /* > > > > > > * Grab the current value of stderr here, > > > rather than > > > > > > * just initializing default_log_stream to > > > stderr. This > > > > > > * ensures that we will always use the > > > current value > > > > > > * of stderr, even if the application closes > > > and > > > > > > * reopens it. > > > > > > */ > > > > > > f = stderr; > > > > > > } > > > > > > } > > > > > > } > > > > > > > > > > > > Which I read as saying that the logging library should back off to > > > > > > stderr if its not initialized yet. If you've encountered a > > > > > > problem that made you need that logging patch, it seems like you > > > > > > should be able to drop it, and we need to fix the logging library. > > > Can you elaborate on what you ran into here? > > > > > > > > > > > > Neil > > > > > > > > > > Neat. The issue is that rte_log.h is not symlink-ed until librte_eal > > > > > is processed. rte_log cannot be included. > > > > > > > > > Sure it can - just pass -I/path/to/eal as a cflag. > > > > > > > > /Bruce > > > > > > When you put it this way... :) > > > > > > Sure, this is a solution, of which early symlink was a genericization. > > > I'm just not a fan of having co-dependent libraries. > > > > > > But this will probably come to that. > > > > > > > The other alternative is what was done with rte_compat.h - create a new lib > > just with a single header file in it. Works ok too, and may seem less hacky > > to some folks. > > > > /Bruce > > > This seems like a good alternative to me. I'm not entirely sure why the logging > functions are integrated to EAL anyway. > > Neil > As I said earlier: > > > > > > > Ideally rte_log could be made independent (starting skimming EAL > > > > > > > from all the fat), but this is much less trivial. rte_log could certainly stand on its own. I quickly attempted to make it a library, but this is too much work at this point. I think the EAL should be broken down, it is too monolithic. Problem is that many other libraries / applications, now relies on parts of the EAL that would need to be moved. So any effort in this direction will be difficult to undertake (and badly received by the community, with good reasons), especially when the workaround is an additional -I cflag. -- Gaëtan Rivet 6WIND