From patchwork Fri Mar 8 22:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 138139 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 6E6AC43C4B; Fri, 8 Mar 2024 23:35:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4F8342F00; Fri, 8 Mar 2024 23:34:54 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id D9DCD42DCE for ; Fri, 8 Mar 2024 23:34:51 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1dd5df90170so16051045ad.0 for ; Fri, 08 Mar 2024 14:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709937291; x=1710542091; 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=GRz5CfsxW1wqYSCdwOimV1uXwr9eMKNXBOlYXpZGHg3QWFu64c6Xu8QWYm7W2icoRk nu2mWTyNjzE1N5WC205j6JOKt45TVfJ+drrh/0xa8bU5QkzatJWf8HA7iATNGq0yPpMV e1QfWlA1m2ancNP5zJKwj378/U7B4DqtqUcjifunbuabVHWvm4gbegjsZvB18srbbcoo RkUE0HStYe9vXlPRDEy4tc8lXqKekAC9nF4f/45BMxZMPJUpPoIreEfD81O4aD/TJCcZ fqfYf6+EVASDGrxoLlSvxQut9yCJonq/vBDi5gtrtEolm9XQn9PIUSvvarls4YWs3/Qy 5aAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709937291; x=1710542091; 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=jbEuNZAmq7XaY8XA8zXL5jJx/I/S5YIFYcj2fJ7E4u/uhPnskedKiGCDlrsoLacKWg BMh1L+7Lw4gl1v/jS1X1hgCIWJiC0fhwrqLa2fdhp4dJaCMbTogRfF2jZHO3PNaoIxcL YOugg/9SlBA9dgPkGSruUoMAfBWfW75MLovGbiOp7xbpon4vRFFEHwIq3rf4WkYQ01V0 OSRLBi9ykzP7y92EO4uPeuYrrQbAxB6DTFsbJM0QZr58CjwE1jRnkuf+ZTRxgwciikBJ RS3LuPjtrZm7JfOWqq0s7Su24JUqnAi47VNkh6xEM4GDLI1y9YGiiVDUzV3eO9VION7x qeUA== X-Gm-Message-State: AOJu0Yye5tfno09FZ3jdadstSi0133eOiWHnRs2sxtqQKGqyQKI9eslY Zs2ydqPnz9+PJn3ua6txuKTmjRqoPxfxCXgdP3G2WLRGuuSZO9XEDinyw4wlzSONZyre3ssOu1b DnDU= X-Google-Smtp-Source: AGHT+IECGISYvwmv98yi6R+gW6U9068JNzwv+tFJpQBU4DyIDUCXPEcurJPjBqNpZMC57/9xmizwmA== X-Received: by 2002:a17:903:2291:b0:1dc:6071:60ad with SMTP id b17-20020a170903229100b001dc607160admr56338plh.24.1709937291042; Fri, 08 Mar 2024 14:34:51 -0800 (PST) Received: from hermes.lan (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id c8-20020a170903234800b001dc3c4e7a12sm145517plh.14.2024.03.08.14.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 14:34:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt , Huisong Li , Anatoly Burakov , Sivaprasad Tummala Subject: [PATCH v4 2/3] examples/vm_power_manager: do not use EAL logtype Date: Fri, 8 Mar 2024 14:33:41 -0800 Message-ID: <20240308223446.215726-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240308223446.215726-1-stephen@networkplumber.org> References: <20231211172437.61958-1-stephen@networkplumber.org> <20240308223446.215726-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; }