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 8D1D241D40; Wed, 22 Feb 2023 17:10:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DD9043063; Wed, 22 Feb 2023 17:09:40 +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 DF2A24303B for ; Wed, 22 Feb 2023 17:09:31 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id c1so9536202plg.4 for ; Wed, 22 Feb 2023 08:09:31 -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=70PEYa3Q8U1CBkQElySJC/pChA1cjBx/N2OIZOuPuJE/MlUf/XOwCnailIyVoyCXMk zLSq7501O9Rf9RN++EH8v5V+ztG5S7CWBQa/qXbqLMsc+g4lCOtt3hhJJGk//SbUi/z1 A613Cic4rRcOD4bzR56t/1xMo484hDdJ6CFODPWDBlgxy0NmEXMAMufejhSrY4Tmmr/R rZ9pH09USrf25LkY7Jq8dENx7R1RUVA/uBp6kO6xYywksDI8gpdEEaNszT59UW9FXU/7 mxPNWGsy1uJEdUU8kLKdcaVJvpaoozsCptEeW4ndqwV8RaOfkErDkASpotFm0Q8YQ08p kg+Q== 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=qD40TSv9+Q1zNDOcEvY5wDyyYw+K5LgqsHjPvcOO5k8vX1lz3HJWJKT4j3MxTAkArK o5nri+5lG80EJXoC0e+IrTDMnx8Nx8e/sP8bXIs51yYMoPsBwnHL4rWhKdd+h44FjTc2 rvmHp3JUkzCp1qvrN0GSrkwlkskCFLgJpAJWz65MIzC9Peui2zWN5bIAZ6YhY30Rtwxu 0gAE/tkTBzaXcWaMlm4cCmTVSv6Yw4t5ucBWWbohW8E6by/DATa5yHXXYBxq7dC0stqr WTDk1KEuD3felQ8k8Eo9kZ1K0i05aD56afrn1Ky6zMbyIUwPWFLOQpjBofVwKcZ03xxG oOAA== X-Gm-Message-State: AO0yUKUBVHgPdqrxN+XsrQ5w6iBQp3H2NWgZRokeGEPuXbUt8ovK7oH5 j5hsBvnj/9AOMQucWptd+YxbWcMa755T3hcgsDg= X-Google-Smtp-Source: AK7set9ra65OrqwyINrDstD34BH8Fh/oHOgkZ0NuzSTbKdPsTwcLDFShBlL7WfFP1n6sbNYw85WTQg== X-Received: by 2002:a05:6a20:8f10:b0:cb:a66b:3a88 with SMTP id b16-20020a056a208f1000b000cba66b3a88mr4822457pzk.1.1677082170858; Wed, 22 Feb 2023 08:09:30 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id x24-20020a63db58000000b004fb71d96d78sm5063778pgi.2.2023.02.22.08.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 08:09:30 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt Subject: [PATCH v10 08/22] examples/l3fwd-power: replace use of RTE_LOGTYPE_POWER Date: Wed, 22 Feb 2023 08:07:48 -0800 Message-Id: <20230222160802.123611-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230222160802.123611-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230222160802.123611-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