From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com
 [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 67B8B2BDF
 for <dev@dpdk.org>; Tue, 27 Mar 2018 22:20:56 +0200 (CEST)
Received: by mail-wr0-f170.google.com with SMTP id y55so164981wry.3
 for <dev@dpdk.org>; Tue, 27 Mar 2018 13:20:56 -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=HIBm6dvd0ggyiOWSbTFNo7fi2DeVx0mjdxDMmijGqAM=;
 b=YulCBdnM/ypHB0rqJhhphP+Qjn8AONPHyD5zNTwqjBiVx+XcITrtjlHGzJsM2o5k1R
 Lxy2kwdiLB24L7tZjMZGKjRL3EaiYGbcPFRztONSE2g6Wu6Tz2p3YqzrD1IYnyy/zchO
 uBKVUop3r6viozPr6iFFVCJALhHuVXdeW1TVonDmYyRF7Bm2ndIEvkCw5ezaJRv4P6oi
 n7q13YiX5MG87n/cnmDavCQVNSgyPCCTuoPMj/LXfCwJphPXzqgH308DnKcPhXNbJKHj
 L2zBRIdNpaF/hSZJ2+LZ/iPMRO8PlW+itolPMCtmvHbaSSuq7IOs9MBsaLcH3i8i4IhJ
 KThw==
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=HIBm6dvd0ggyiOWSbTFNo7fi2DeVx0mjdxDMmijGqAM=;
 b=or2vlOG4MB9GCYOvYm1yZcI/D7K1MxSacF7+YpimMIiu8sIyJHlVf6ZSs3e9O4hpaY
 fIU1j9d5Mir2jVREjRWecnk4cGkTVGlXWaBeRYfqlxa/fifeh/ebQuXB1Y8/FoZVIjMG
 P8vYhRt9G3jYQE+GtQMzz6EOZd0QA8B7AkZ4/G3u7yZMt/mHJd83O8/+9oQPYajnN8K5
 uL7knjha6UknjNq1t/CwO+p275yPO1WX1T30lWeMIS5cB5tzO88KUPMA08ZIG2/uj3it
 0OtBWTK+XD2Nz+USWgUcojwJy3wllD60GV+8p48eib9YR+tFDr9FLISfOOLV/xjXb3d/
 ZtTA==
X-Gm-Message-State: AElRT7GSzUuFQ0t9wmmQm85AJyU5VlQxVfLKddEsyOmS328ZOzyfYPxG
 AlnbPr2ezzNMuB/mrCAOooBH5w==
X-Google-Smtp-Source: AIpwx4+KSgWW/PpRV2Cye4RVxDEqxEe1LgHc2Fv3Uf4aNX87ZWH5Bt8yN51poiRBI9VPhdkdI8yPpw==
X-Received: by 10.223.136.67 with SMTP id e3mr629284wre.250.1522182055953;
 Tue, 27 Mar 2018 13:20:55 -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 v9sm1951480wre.96.2018.03.27.13.20.53
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 27 Mar 2018 13:20:54 -0700 (PDT)
Date: Tue, 27 Mar 2018 22:20:40 +0200
From: =?iso-8859-1?Q?Ga=EBtan?= Rivet <gaetan.rivet@6wind.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: dev@dpdk.org, "Wiles, Keith" <keith.wiles@intel.com>
Message-ID: <20180327202040.rd3yixr67c3jbx4p@bidouze.vm.6wind.com>
References: <cover.1522105876.git.gaetan.rivet@6wind.com>
 <f7f7115526378e8d83e03cf5e6bc3bead6571f24.1522105876.git.gaetan.rivet@6wind.com>
 <20180327114750.GA30585@hmswarspite.think-freely.org>
 <20180327124000.6n63hpng53tm3bil@bidouze.vm.6wind.com>
 <20180327182633.GC30585@hmswarspite.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: <20180327182633.GC30585@hmswarspite.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 <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Mar 2018 20:20:57 -0000

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 <nhorman@tuxdriver.com>
> > > > Cc: "Wiles, Keith" <keith.wiles@intel.com>
> > > > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > > > ---
> > > > 
> > > > 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.

I know Keith and Bruce discussed a few months back the possibility of
having an initial linking pass. Personally I am still against this kind of
solution, hiding design issues under the rug.

-- 
Gaëtan Rivet
6WIND