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 B7A7645CA4; Thu, 7 Nov 2024 21:52:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0101432F4; Thu, 7 Nov 2024 21:52:28 +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 E23534331A for ; Thu, 7 Nov 2024 21:52:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731012747; 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=3d5FQyirAHPYBlRtpLcvP4B4po9yWk/G/NUe0i/cIZw=; b=OotAaTjYTfGFFdNzj+oLrvtAX0Qi4uXdJ6bq2wXTMqyW7JdPRPVt834bDMpGPwRTmr1AsP S7uyd3/9CkVvPmd4kImtzPdKcjXX7TX0f3xYrc5ON6ds/oShmJePCH4iJshLUnN+RgEmzR mS377gJeq1mYIghFDV1wDUaibjahboo= Received: from mx-prod-mc-02.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-206-3LE26GgfOTuP6t4kASOOjw-1; Thu, 07 Nov 2024 15:52:24 -0500 X-MC-Unique: 3LE26GgfOTuP6t4kASOOjw-1 X-Mimecast-MFC-AGG-ID: 3LE26GgfOTuP6t4kASOOjw Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CFBA71955EEA; Thu, 7 Nov 2024 20:52:22 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.57]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0D2B4195E480; Thu, 7 Nov 2024 20:52:19 +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 v31 04/12] eal: do not log init failure twice Date: Thu, 7 Nov 2024 21:51:36 +0100 Message-ID: <20241107205145.2424871-5-david.marchand@redhat.com> In-Reply-To: <20241107205145.2424871-1-david.marchand@redhat.com> References: <20200814173441.23086-1-stephen@networkplumber.org> <20241107205145.2424871-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CeewCn3olzFl6gbV0TCOuTHl6-HZrnhaPl4E30mjCeY_1731012743 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 8563ef1156..11b305dc08 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -529,8 +529,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 9ac52ea500..a6ca679cba 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -830,8 +830,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 69d367fb8e..ad02f6a6d1 100644 --- a/lib/eal/windows/eal.c +++ b/lib/eal/windows/eal.c @@ -181,8 +181,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