From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by dpdk.org (Postfix) with ESMTP id B6B052BA6 for ; Thu, 13 Oct 2016 22:03:44 +0200 (CEST) Received: by mail-lf0-f45.google.com with SMTP id b81so150571167lfe.1 for ; Thu, 13 Oct 2016 13:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=2akEVSNsBLDqh5XCkvpUY5CJGOvIADoPHRIr23QvZyY=; b=a65Jz6Rk+ThFa6vGrRrvViORFqPjwG44rRdgOobxggG5ZDfa3Osx/8RCA/cSJZ6NBA ad/JXa4lindW1W6dBVEjf50IA1KqoJFbHRBVyyelKHenmaTZayyey9aBY9F9fC2i2dQy MQiZyfjw2N0zgWKftqiD9TXT8kPqKGQNSD0ttw2Bfeql1RYHI08u/hyxiK0LLWCfWA0H JsIpGV95hm7QppzPf/7ZUqYl9sVshuReiM/pg/vZkpoOqgw1U8uqQY/bhvjhGhAEICFM b4TvBthzeM7JxrsgnWC4gugtLyAwgd4VNupUECwXVkOs96vxoaqPM5w/W5gkkJ80thhi IfuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=2akEVSNsBLDqh5XCkvpUY5CJGOvIADoPHRIr23QvZyY=; b=WVqD8DTzCb7JLJ8Wpamte3lGSBoIDHev5csOrWkK64wNq0+F+mXsDEsGBWvRzLXuG4 FbUSbIt6/i83gZfSx4lGGCE0F/oblgocl2RKWeiPZeGO1TUKPbUTw7aJTmiam7W1TGk2 Cirg5qPwp1UMb9UByHyI2re6T3EBuh7txvQKN2g/BBPGT70dsXvNfLqY9MKFFyaLhPpm 6oQIPzRIadUPRqnIxIOms3aKlFt/VzW+NLRaE3sHvYVx844r0utOgk3M9/Epqkc+hT8/ JRcQidRG7XSxB1D1BaHIQJQ4KCXrdOI9R6OEkJq8BQkYPnE/mmSNJHWFeM3mBzew6fuF Xw+A== X-Gm-Message-State: AA6/9RnARqLaw3Fx8gD006IKYA9gUQot0QfeIxEo0hp1tpLf18mc+hncOHZHW85t3vJCE0UH X-Received: by 10.28.206.195 with SMTP id e186mr3210845wmg.27.1476389022934; Thu, 13 Oct 2016 13:03:42 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id a1sm25282961wjl.28.2016.10.13.13.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 13:03:42 -0700 (PDT) From: Thomas Monjalon To: John Ousterhout Cc: dev@dpdk.org Date: Thu, 13 Oct 2016 22:03:39 +0200 Message-ID: <6204069.cm9KbzbHpo@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20161012193832.5016-1-ouster@cs.stanford.edu> References: <20160928204244.8288-1-ouster@cs.stanford.edu> <20161012193832.5016-1-ouster@cs.stanford.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] log: respect rte_openlog_stream calls before rte_eal_init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2016 20:03:45 -0000 2016-10-12 12:38, John Ousterhout: > Before this patch, application-specific loggers could not be > installed before rte_eal_init completed (the initialization process > called rte_openlog_stream, overwriting any previously installed > logger). This made it impossible for an application to capture the > initial log messages generated during rte_eal_init. This patch changes > initialization so that information from a previous call to > rte_openlog_stream is not lost. Specifically: > * The default log stream is now maintained separately from an > application-specific log stream installed with rte_openlog_stream. > * rte_eal_common_log_init has been renamed to eal_log_set_default, > since this is all it does. It no longer invokes rte_openlog_stream; it > just updates the default stream. Also, this method now returns void, > rather than int, since there are no errors. > > This patch also removes the "early log" mechanism and cleans up the > log initialization mechanism: > * The default log stream defaults to stderr on all platforms if > eal_log_set_default hasn't been invoked (Linux used to use stdout > during the first part of initialization). > * Removed rte_eal_log_early_init; all of the desired functionality can > be achieved by calling eal_log_set_default. > * Removed lib/librte_eal/bsdapp/eal/eal_log.c: it contained only one > function, rte_eal_log_init, which is not needed or invoked for BSD. > * Removed declaration for eal_default_log_stream in rte_log.h (it's now > private to eal_common_log.c). > * Moved call to rte_eal_log_init earlier in rte_eal_init for Linux, so > that it starts using the preferrred log ASAP. > > Signed-off-by: John Ousterhout Applied, thanks