From patchwork Thu Sep 19 13:31:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 59465 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3AC5D1EF40; Thu, 19 Sep 2019 15:31:14 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 5C3EB1EF37 for ; Thu, 19 Sep 2019 15:31:12 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id i16so4545663wmd.3 for ; Thu, 19 Sep 2019 06:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SzKGvEy9VvTVHcrOPOLO/CYfgstxPdk4+IyvFUsLw3o=; b=oAOFxd9NtjadBBXmujH53noyXgr2s4rfHW2NdWOZaeXJKxas5KYwzBSG2KwM+WL7UH m3JnyitHUGAz9A6rTjkebc7i9k8MvumcmJox6E+QSlZuL7p98RhQ6Yw1kzeRoA5zA1wp Zvnt9+mB1GMktCq3qzxk9Lmk9m1/BPMtrZHrqWdqGqoIDyN8jV/xTIX1k2ReNNy0RqiT TDauOYmZiF7el/4TWRIx67SuKaBuZAc7unKr4yfNqYRwqA/N0TNILxNWoB55vaYZJUCx V/0QHC49HaR7YbJmD+tIzIzGXgMLV79x7jMYYW/LUgJS/D1znr6LMBtR8LEri0SJ5ZC+ MDzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SzKGvEy9VvTVHcrOPOLO/CYfgstxPdk4+IyvFUsLw3o=; b=Wx3rsCY/xSTU/RIDhmTTPrJ3aszB5jEgquESJqU2DXBesdRS08Za76Y7VTgycdKfFI dJH0DHnj3L03cmXU7WvieXGJAVAO2O53Osy1JbkgylNcO1Dfqp2gZTxDm2JpFQOH1v6q 16nAAPJvI/qz64o1sB1c7tKrbWNFay6uPaz1AYTwzdO+d3L2h9tHNWTNyBIoVF/Cdciq kmk32Jbo1i3b4uXvqe/8e5T3sCSnFw4iSc2rwACLmXEJXQCKytNN2UEwiRKppDZgncb5 r+FWTwFgmVnihSjjDlBHJBCTsxAZ5nKyyB5U2Hy/j8bjSxKQio416HsqAxjRv85looGc KbyA== X-Gm-Message-State: APjAAAVHEMVSoPGoq31WmZaQEAzDcKLJ/76CI1iWQtfajk+T9L+BCV8X gdn4/v84OAJyKQDRst0bUGXzQPQjuO2nZg== X-Google-Smtp-Source: APXvYqxZDs/ypYDOgD9wfgcAxie4Ve3NB305DgqHYLg/zqJDydrYL61pRwf4OJpvjC6Xn2UW+fMtaQ== X-Received: by 2002:a1c:ed02:: with SMTP id l2mr2818319wmh.155.1568899871422; Thu, 19 Sep 2019 06:31:11 -0700 (PDT) Received: from localhost.localdomain (lmontsouris-657-1-167-187.w82-127.abo.wanadoo.fr. [82.127.205.187]) by smtp.gmail.com with ESMTPSA id x6sm8151895wmf.38.2019.09.19.06.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 06:31:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 19 Sep 2019 15:31:07 +0200 Message-Id: <20190919133107.14147-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820233330.27474-1-stephen@networkplumber.org> References: <20190820233330.27474-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2] eal: don't call RTE_LOG before init 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" rte_init_alert is called before rte_log is initialized. Therefore RTE_LOG() should not be used (only stderr). For VFIO, it is initialized after rte_log_init therefore, use RTE_LOG. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linux/eal/eal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index 946222ccdb7a..6f54a8b2133f 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -950,7 +950,6 @@ static int rte_eal_vfio_setup(void) static void rte_eal_init_alert(const char *msg) { fprintf(stderr, "EAL: FATAL: %s\n", msg); - RTE_LOG(ERR, EAL, "%s\n", msg); } /* @@ -1175,7 +1174,7 @@ rte_eal_init(int argc, char **argv) #ifdef VFIO_PRESENT if (rte_eal_vfio_setup() < 0) { - rte_eal_init_alert("Cannot init VFIO"); + RTE_LOG(ERR, EAL, "Cannot init VFIO\n"); rte_errno = EAGAIN; rte_atomic32_clear(&run_once); return -1;