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 22E8C41D32; Tue, 21 Feb 2023 20:03:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2C3342D86; Tue, 21 Feb 2023 20:02:35 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 3F25542D46 for ; Tue, 21 Feb 2023 20:02:24 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id ky4so7323591plb.3 for ; Tue, 21 Feb 2023 11:02:24 -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=sXU7tvX5tudbSZDZRRni0P7D5nK2fGSqEfBBHboccY3qXsZhtIaKv0EKPRrlTUnjVz fYJlfElCEsRziHG4b5xdpZeaBTue61hrIEMjSdaCT/c9HjxH4bBX930yQo5SI6oMv1QY Wg73dmA1acV3ikzyy3ZBKJcLD1jOMRNK0bUR0N8wFoeG0ut7u2ibT2Ry9gaAOJ5ZNpcN bKbshn1rQABl7iwDQ5kDwA/XhQ7wQZ06GIu3Doio+y470fObDoWanesN1V8JSdpOGZjO Ur6wa++mwaabQsSIvkPHnu157Lj9xAio21dvF3+6hW+qDRXZCgfyHl91uuRMshWlB5pJ oJsA== 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=6Vf3EfcJjwXFx4n4dTtQ9ZP3Te4wXTnTJvD0pcuJc+zlr9tYAs5FOdL2Z5tYtHyTKT 20Mac6BNEaP4HqVUT71yOhu2JaDSqD8uUEMcf95/NssUxSCOp/B/6O5uL/iTvLR+CT7g HBXpn0DYenybnN9ov3ze/0wggIoeJhLRLU467oXqtpurpDRR4lKo+akijsxejgq9NQuB xmbEn4vVFG2GfKiFSZOZu4n0Icle7FbA9zbTqCLHja7qIgyBTEWd5gVrcnUoWqnvzrEk BCAlncfN5uI491fIBbj4b5JxBfYU3ssmMvfTKVcEAa+xEtAp/Jcjg7ZRM58ZGsGeWMUj 7Wkg== X-Gm-Message-State: AO0yUKWY9cuUVYkQAj1q7P22s7b1GcsOjeMGzFAElGBE1ZYOBO2/6Byf SE/1kEi9fA8exobT7PbwlndG/JaEOsT+qNqqU2k= X-Google-Smtp-Source: AK7set+3GrK68JjGApnnWJe1MVAx4kG4N/wNutwxT1MePNvdsN/ZO0LvLMSgcPvh6zDhbMxIkSqmfw== X-Received: by 2002:a17:902:da8e:b0:199:1e42:2983 with SMTP id j14-20020a170902da8e00b001991e422983mr7621116plx.34.1677006143418; Tue, 21 Feb 2023 11:02:23 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jc4-20020a17090325c400b001991e59fde6sm10213018plb.216.2023.02.21.11.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 11:02:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt Subject: [PATCH v9 08/22] examples/l3fwd-power: replace use of RTE_LOGTYPE_POWER Date: Tue, 21 Feb 2023 11:01:54 -0800 Message-Id: <20230221190208.514276-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221190208.514276-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230221190208.514276-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