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 5940341D43; Wed, 22 Feb 2023 22:56:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 721AF431BD; Wed, 22 Feb 2023 22:56:06 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 41B4B4319C for ; Wed, 22 Feb 2023 22:55:57 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id u20so2496664pfm.7 for ; Wed, 22 Feb 2023 13:55:57 -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=DDhY6ADHc6zLTa/gwncoSSEPZj6kN5p+0h90btMEnqA=; b=ZTJyy6qROCQp4ZhV48cyXy08wF9yyEJts7nlTxBujM8rqdGVhg294FI066BtNHXT1i tN5o6loCR9n5TIVbxYxle71gi8uRk7axsjn0PRDN4/yqbzWgc8HQjseDbthgv5slF//Q 3GsJ32JlijVg7Qo4pN9q/bNKaHqKrQDT279b5UfNqeFFyuywAyrzXnnVu4gkTYH80xv5 tADLY6b6QoU5mo2aKfOk8wQpP7YYasFVxz/WKgz3Qjgk3FU43eYJdhEF/MJCm0PupIjq XLEg/SUShn8qiw9VC4d1Kw2O25k+OoaVgM3LWiaetSonivdYyi0qkNSacU1kb2FpkKMP QDMg== 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=DDhY6ADHc6zLTa/gwncoSSEPZj6kN5p+0h90btMEnqA=; b=Um/gOxas5gJc+iqESdC5sts4tgPRGa3EiquouGfRT2N5tP73i68HAd/5VSpkpnqNY/ tJniElFPeXQq+D25tOXnBxCVgCq97AsJfeoICu13VVgARKt5oJR/2tQ1KvkTxLWPofid 8GNZErnvLjf/k9GWRWmVv0DfLDg9qSY5WA/nDlZkdYSLl41M1/qu+mXiw9laGVSESatc zZXXx2FF4nvLdxzua2rgDgjXn9bzEtxMjgoc+NRURATCRnJxLsBKoIF/dGiUBFK4rW/T OkEKbP7A5Bt09mO7gl6nU+cadkJ3WqnGQOHndWdgTtqAcrXuhFj26ECe4eqR+aoho/3M 2RRA== X-Gm-Message-State: AO0yUKV6XnUtZPZof000APGnIZUqAsyLqrM0U5tR/YWNEWaqCOz1ptBj XZeES5CnomIo4JNDfeyGh7rmjmWRPCpnsODOLX0= X-Google-Smtp-Source: AK7set8eHcwY1lelsmZdb9foSuPoA6+BMTjaD+xCfBIefOBLEDA50po0G2oJNwWqXoveqIcly/Zpag== X-Received: by 2002:aa7:96dd:0:b0:5d5:9350:ae05 with SMTP id h29-20020aa796dd000000b005d59350ae05mr3463229pfq.32.1677102956518; Wed, 22 Feb 2023 13:55:56 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id d7-20020aa78147000000b00571cdbd0771sm6400722pfn.102.2023.02.22.13.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:55:56 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt Subject: [PATCH v11 08/22] examples/l3fwd-power: replace use of RTE_LOGTYPE_POWER Date: Wed, 22 Feb 2023 13:55:27 -0800 Message-Id: <20230222215541.158205-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230222215541.158205-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230222215541.158205-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 Acked-by: David Hunt --- 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