From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 831DE23B for ; Tue, 21 Nov 2017 14:19:33 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E6DD1208E5; Tue, 21 Nov 2017 08:19:32 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:19:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=wsMzMCnv17Hi8b08r 1ESihKXTiUZwvV/6QSIib2ImNo=; b=L4cnNo8eSLVHGrEdUVJJ6n/8/OYn7ZlcW vk+Iv2dGjSXNjwld9hLoOSUlXFOZjM/bMrDZdXIQGgJw3RWJajjwoDClxpwpEKMq cYgVIgG+ebXUkJW4vHrf8sB83BI+9noFfNorQF5LPokZ/aO9jea/R1G6Rx+A7IKT HXWlScOhCxcqibmiZ6TUsPAPLOCq+28xaLudd2ltrvvsJBmWuFu066ZmhGq9CV/W VdWccifHk0UAmv62LIKtJsZ3EDpS9dLkU7dYZXzJiBBy2w3hOG7y2Kx1/NyXwYi/ XLyEiXdpBPULzi8jjvTEQfBjFYERcTO12Poc78/9r8P87QhVsD2tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=wsMzMCnv17Hi8b08r1ESihKXTiUZwvV/6QSIib2ImNo=; b=FkoJehKN ep0Zm5DIeqi8EGM+Ebrq2oTGlr/pn/4tr1HV9hpCKdDOsNtfdxE1iS9YLEbvmppP kdKQq1ext6+mobdfNgmi8qvm5/bYSb2tQ0UE0nb3ruZa5kIu/2LfCT3qTTcizz1D jQ/KrElNULfrIBUWezcye3Lm6Q+fH+DliQBkhBWa8BRY0VrsfTMc/ZCgC+JNPXFH D736CVRC7UHadjrSj6iAvcOa4aXF1eaoM9AL/86kkGzzh+K1A1A2utFgVskO2vc8 5aSWHyfBNh6ZK5RW1sDou7WVbAPA1pJOmr+FQyaZBAIPZ8YoZ2czBe/zFbTWSWnQ WwS/uDPbDDC0/A== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 7F83B247A9; Tue, 21 Nov 2017 08:19:30 -0500 (EST) From: Yuanhan Liu To: Stephen Hemminger Cc: Stephen Hemminger , dpdk stable Date: Tue, 21 Nov 2017 21:15:45 +0800 Message-Id: <1511270333-31002-3-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'eal: initialize logging before bus' has been queued to stable release 17.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 13:19:33 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 67423d8347b8c68fa9a24e7d468dde9b9f03ef1b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 28 Aug 2017 11:13:31 -0700 Subject: [PATCH] eal: initialize logging before bus [ upstream commit f0dab530f41689651192cebd7683cddbfc9991e2 ] Any log messages during bus initialization maybe lost because the bus registration constructor is called before the logging constructor. Fixes: a97725791eec ("bus: introduce bus abstraction") Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/eal_common_log.c | 3 ++- lib/librte_eal/common/include/rte_bus.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 0e3b932..b62b0a6 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -289,7 +289,8 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_USER8, "user8"} }; -RTE_INIT(rte_log_init); +/* Logging should be first initialzer (before drivers and bus) */ +RTE_INIT_PRIO(rte_log_init, 101); static void rte_log_init(void) { diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index c79368d..8f8b099 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -285,7 +285,7 @@ struct rte_bus *rte_bus_find_by_name(const char *busname); * The constructor has higher priority than PMD constructors. */ #define RTE_REGISTER_BUS(nm, bus) \ -RTE_INIT_PRIO(businitfn_ ##nm, 101); \ +RTE_INIT_PRIO(businitfn_ ##nm, 110); \ static void businitfn_ ##nm(void) \ {\ (bus).name = RTE_STR(nm);\ -- 2.7.4