From patchwork Fri Mar 8 18:10:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 138131 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 523E443C27; Fri, 8 Mar 2024 19:12:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AC2142F9D; Fri, 8 Mar 2024 19:11:52 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id E0BA1402BB for ; Fri, 8 Mar 2024 19:11:49 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6da9c834646so2152546b3a.3 for ; Fri, 08 Mar 2024 10:11:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709921509; x=1710526309; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EStD9EvR6OoecugU86AyTaCTLdlfFyksP+Y5mTQTQRU=; b=GyQieI0V70EnOPu/n4jX7rkV1If5tpwrUdHi14Fx8Sqx8qq+ylKbUqQP0q2qumWOT7 yK7Fu2KS/i77djt9fjQYc7RTnedl0+UpH08szZtSHUIpAV0s/zcFoGOo6CNQnfaJSW/i /zvNiodnUtIlmng0MqpOwQj4kmiNPHePGF2CeQhElmcT/eH+w4MOQdDX0BE6eQGISzax kfBFjvfYpFfsTqA5JuwzJnTOP6rpIVcZPzdx8uhlYtZP6wLGyDVD+EoZiZCjedccwHKh OJSkOiAD7WEksa+BStvAR464wcGCydl8W2MXnYjqDkVztsXFKXQODKGqCNo566eNPdEI hRlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709921509; x=1710526309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EStD9EvR6OoecugU86AyTaCTLdlfFyksP+Y5mTQTQRU=; b=PQAeMGcvcRzS/aCHVhbiWCWrp0tDECy/3evsTZqGBruKOWCIrCNt7c55+c90dgLB71 aefOvA7UWGTHboT78vI78xqn3WEBpeoIP7FaZTywhA73kr67NKKPpp4w34r1x8VGaTA+ whJbL4ASoejBQZNBm7c7FT/Yb5Tg1COwajPcntYcPZD0VkLhAoTsnd8ybKQhfbhnROBy ToA3kGQ8MQ1TbbK9IfcGCwUDUM3jIraLKn0yDKO29IDhfRfU8JLD7ZeOljSNGvGSBETO 631+at5A94xcoOWeTuKWGJBTAaNDt6PjC/YWVyzFdEc18hvQhIBLNs+chzGbnwBKl8wL C6gQ== X-Gm-Message-State: AOJu0Yx0YWO11RInPUlNmy4Lu17OaVEbrdalnIzh/52+PdJ30WgVMjRM X/q6zelGeHuOMkMdaBZGer+ySfH4zu32/YlHMbKCu38w0L7BE5GLE/9Ezy8gp9Zffq0MipDgjYL R//Y= X-Google-Smtp-Source: AGHT+IH9XBnF9oKQJKCl6lK5U2cQVnVg2upVkH78spGNoXUdXYr/Vwmv7FNR7/O/yThSWdvhD984MQ== X-Received: by 2002:a05:6a20:3941:b0:1a1:2f17:b13c with SMTP id r1-20020a056a20394100b001a12f17b13cmr13129856pzg.3.1709921509192; Fri, 08 Mar 2024 10:11:49 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id fn17-20020a056a002fd100b006e2301e702fsm14376020pfb.125.2024.03.08.10.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 10:11:48 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt , Huisong Li , Anatoly Burakov , Sivaprasad Tummala Subject: [PATCH v3 2/3] examples/vm_power_manager: do not use EAL logtype Date: Fri, 8 Mar 2024 10:10:25 -0800 Message-ID: <20240308181137.69855-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240308181137.69855-1-stephen@networkplumber.org> References: <20231211172437.61958-1-stephen@networkplumber.org> <20240308181137.69855-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Be consistent for all the error printouts and use fprintf(). The EAL logtype is reserved for internal use by EAL. Signed-off-by: Stephen Hemminger Acked-by: David Hunt Acked-by: Huisong Li --- examples/vm_power_manager/main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index b159291d77ce..c14138202004 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -425,8 +424,7 @@ main(int argc, char **argv) lcore_id = rte_get_next_lcore(-1, 1, 0); if (lcore_id == RTE_MAX_LCORE) { - RTE_LOG(ERR, EAL, "A minimum of three cores are required to run " - "application\n"); + fprintf(stderr, "A minimum of three cores are required to run application\n"); return 0; } printf("Running channel monitor on lcore id %d\n", lcore_id); @@ -434,16 +432,15 @@ main(int argc, char **argv) lcore_id = rte_get_next_lcore(lcore_id, 1, 0); if (lcore_id == RTE_MAX_LCORE) { - RTE_LOG(ERR, EAL, "A minimum of three cores are required to run " - "application\n"); + fprintf(stderr, "A minimum of three cores are required to run application\n"); return 0; } if (power_manager_init() < 0) { - printf("Unable to initialize power manager\n"); + fprintf(stderr, "Unable to initialize power manager\n"); return -1; } if (channel_manager_init(CHANNEL_MGR_DEFAULT_HV_PATH) < 0) { - printf("Unable to initialize channel manager\n"); + fprintf(stderr, "Unable to initialize channel manager\n"); return -1; }