From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9E9E45CB1; Fri, 8 Nov 2024 09:57:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8388843302; Fri, 8 Nov 2024 09:57:45 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4160D43312 for ; Fri, 8 Nov 2024 09:57:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731056263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0uAFU2Oi5rJDINWGomYhP5wJObldwAaFuErffP/luIU=; b=LWWUwGFpxAAebk7TnE/ckdncE2ibF19RgMK62VRWiPmJua1zktei5znAD6CLhYIIkeB3PL GfVG1Lp2eUOROFsJkrc3nwEcPntJy/NIUulODayQ8dIp2e3pFwwv7pBN1i6F6ywNAu6i2E pnp6g6JEngru3GBgcJapQSC2HdbfEK4= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-144-MLhif_Z5PSGiBOlfAs51YQ-1; Fri, 08 Nov 2024 03:57:40 -0500 X-MC-Unique: MLhif_Z5PSGiBOlfAs51YQ-1 X-Mimecast-MFC-AGG-ID: MLhif_Z5PSGiBOlfAs51YQ Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 17F85195608D; Fri, 8 Nov 2024 08:57:39 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.57]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2383E1956054; Fri, 8 Nov 2024 08:57:35 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Bruce Richardson , Chengwen Feng , Dmitry Kozlyuk Subject: [PATCH v32 04/12] eal: do not log init failure twice Date: Fri, 8 Nov 2024 09:57:01 +0100 Message-ID: <20241108085710.2943741-5-david.marchand@redhat.com> In-Reply-To: <20241108085710.2943741-1-david.marchand@redhat.com> References: <20200814173441.23086-1-stephen@networkplumber.org> <20241108085710.2943741-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: T5Psh7VTzZIYI5Uupdu1d3SfLzlTt66_z_XUN3I97dA_1731056259 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Stephen Hemminger The message already goes through logging, and does not need to be printed on stderr. Message level should be ALERT to match function name. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff Acked-by: Morten Brørup Acked-by: Bruce Richardson Acked-by: Chengwen Feng --- lib/eal/freebsd/eal.c | 3 +-- lib/eal/linux/eal.c | 3 +-- lib/eal/windows/eal.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index 16b1c67cca..c84983ac3f 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -530,8 +530,7 @@ rte_eal_iopl_init(void) static void rte_eal_init_alert(const char *msg) { - fprintf(stderr, "EAL: FATAL: %s\n", msg); - EAL_LOG(ERR, "%s", msg); + EAL_LOG(ALERT, "%s", msg); } /* Launch threads, called at application init(). */ diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 49a88cfbd5..3915cdb838 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -831,8 +831,7 @@ rte_eal_iopl_init(void) static void rte_eal_init_alert(const char *msg) { - fprintf(stderr, "EAL: FATAL: %s\n", msg); - EAL_LOG(ERR, "%s", msg); + EAL_LOG(ALERT, "%s", msg); } /* diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c index f77053eb7e..a3eb15ce00 100644 --- a/lib/eal/windows/eal.c +++ b/lib/eal/windows/eal.c @@ -182,8 +182,7 @@ sync_func(void *arg __rte_unused) static void rte_eal_init_alert(const char *msg) { - fprintf(stderr, "EAL: FATAL: %s\n", msg); - EAL_LOG(ERR, "%s", msg); + EAL_LOG(ALERT, "%s", msg); } /* Stubs to enable EAL trace point compilation -- 2.47.0