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 7DA3B41CF1; Tue, 21 Feb 2023 00:36:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C96F4313D; Tue, 21 Feb 2023 00:36:14 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id A292A43120 for ; Tue, 21 Feb 2023 00:36:06 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id n5so1568385pfv.11 for ; Mon, 20 Feb 2023 15:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=OxQp+8uZQnSKb+sm73eA3ffhdHXFMjPJ/H9kv1fBA+U=; b=LsL0K5wTNtx1M22335Kn/Sh3YnUxbNpIYFY+OngT2lx3vkWb23pl8ZDjjdHy6+FVKU +rZtEkqCO56/96yCr0DusNLzlHZgJ0YTNTtdX0iIDeCTxPyA7bgvXaEg0sBBzpON/Yaz 1ROrR3XGqMMurJ5/CouXTqxN0LCaLkPCrMC0a1laFyOM/QS8irSdlqMfTWJYXiP/C60J U6fBHrw2zx5GASmCUZDm3FH8xpHIR8vbswXcuqpkGGJ0sUDG2JY+Cd9D7lAEeNbNJ0UG oEnadYFsiF8pcjnzZpWWIwbEr7o+hpaqk6SXnNmr9QXGTN2LMncyWbwQBjFL1V7hGA48 pdHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OxQp+8uZQnSKb+sm73eA3ffhdHXFMjPJ/H9kv1fBA+U=; b=v5DSmq64bQQ2oXc7ndIR9/v5TEj5z33VjSDpoj5vc5P07EmFOuh0G8/iq+pzITRlB+ NnegmMv4UhmyJdfGFTAawmvxuGxIsnSFN3w8hYXBP9fwjGeph7a2CIRMRYdZPms5yWUw QUnajQxAs6lKiTTbNgCyBJ+zXsMpjetotTxTXNRJusevwrbTXKD4fgHFUM79BFa0mkGg /7ORB/8AmzgXlDDUVYj+9h63PPv+Uo3RkmyQsM/WVHsCEVmctqv2j+i7vX3WKY/N+4sz DQsT5WR2Cj7QoNL8E59T/NKWsR6cB1kKtGnm78LQpeR+jLdT4suiblh+TaTJaiOYtB/d XpFQ== X-Gm-Message-State: AO0yUKVHFOOPsSSEM9MbfQJMUY61DNIE25vtk6AhFEvg+fUc46h5Moy4 NoEjpHy9/WQJTm/5MJs78sjrWyr0bLgoLeikbpo= X-Google-Smtp-Source: AK7set/doi7rHmQGd1WcGI7L4zynXWn8YVreAJGDNirLKYUDJiekKzJOt++XtEr9NfwrCg4DvurfPQ== X-Received: by 2002:aa7:96ee:0:b0:591:3d20:3827 with SMTP id i14-20020aa796ee000000b005913d203827mr1995647pfq.21.1676936165547; Mon, 20 Feb 2023 15:36:05 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q19-20020a62e113000000b005a8dc935ec1sm8215908pfh.62.2023.02.20.15.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 15:36:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v8 08/22] examples/l3fwd-power: replace use of RTE_LOGTYPE_POWER Date: Mon, 20 Feb 2023 15:35:42 -0800 Message-Id: <20230220233556.168553-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220233556.168553-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230220233556.168553-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Convert to using a dynamic logtype for the application. Signed-off-by: Stephen Hemminger --- examples/l3fwd-power/main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index f57c54d2b57c..76b890b76c88 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -51,7 +51,8 @@ #include "perf_core.h" #include "main.h" -#define RTE_LOGTYPE_L3FWD_POWER RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER(l3fwd_power_logtype, l3fwd.power, INFO); +#define RTE_LOGTYPE_L3FWD_POWER l3fwd_power_logtype #define MAX_PKT_BURST 32 @@ -2236,7 +2237,7 @@ init_power_library(void) /* init power management library */ ret = rte_power_init(lcore_id); if (ret) { - RTE_LOG(ERR, POWER, + RTE_LOG(ERR, L3FWD_POWER, "Library initialization failed on core %u\n", lcore_id); return ret; @@ -2245,7 +2246,7 @@ init_power_library(void) env = rte_power_get_env(); if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) { - RTE_LOG(ERR, POWER, + RTE_LOG(ERR, L3FWD_POWER, "Only ACPI and PSTATE mode are supported\n"); return -1; } @@ -2263,7 +2264,7 @@ deinit_power_library(void) /* deinit power management library */ ret = rte_power_exit(lcore_id); if (ret) { - RTE_LOG(ERR, POWER, + RTE_LOG(ERR, L3FWD_POWER, "Library deinitialization failed on core %u\n", lcore_id); return ret; @@ -2332,7 +2333,7 @@ update_telemetry(__rte_unused struct rte_timer *tim, ret = rte_metrics_update_values(RTE_METRICS_GLOBAL, telstats_index, values, RTE_DIM(values)); if (ret < 0) - RTE_LOG(WARNING, POWER, "failed to update metrics\n"); + RTE_LOG(WARNING, L3FWD_POWER, "failed to update metrics\n"); } static int @@ -2381,7 +2382,7 @@ launch_timer(unsigned int lcore_id) rte_get_main_lcore()); } - RTE_LOG(INFO, POWER, "Bring up the Timer\n"); + RTE_LOG(INFO, L3FWD_POWER, "Bring up the Timer\n"); telemetry_setup_timer(); @@ -2397,7 +2398,7 @@ launch_timer(unsigned int lcore_id) } } - RTE_LOG(INFO, POWER, "Timer_subsystem is done\n"); + RTE_LOG(INFO, L3FWD_POWER, "Timer_subsystem is done\n"); return 0; } -- 2.39.1