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 33C4641C99; Tue, 14 Feb 2023 23:48:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4FDA4300A; Tue, 14 Feb 2023 23:48:05 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 273F842FE0 for ; Tue, 14 Feb 2023 23:47:58 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id w20-20020a17090a8a1400b00233d7314c1cso238462pjn.5 for ; Tue, 14 Feb 2023 14:47:58 -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=oO3iVDr4h2M/eS/tybJFSy52r4go6bpNG8ZqgGJ1RVo=; b=x/e9j6vf4zOuWO3UCnjQIVzP93fMAyL6ZbmijjWncESMRJZlUvml8qHc0KqvGLluZc kj1yXjFQR2kgBjpYzn4HChbN65VPXfN+FDipmImBk7uCjxmjAzGC0dVei7KcEauBdcZI WrUFMWFKFf9ezERvqLlvN3w0wxbsZDMjWJRZYnku4T7JVFIAuj8jgBE4VmFrYC4JyzoY /eB0eYouV3fKBAYvxtMEVMTTTVgTihoQJiu+F6y0VIynlbrvUnbGkT8mhz07KDyFDA7V JNXx04yqs4cQT2wCLkkjnKULrBhyvd/LZE7jcJfbXQ4gYk4kl0EfUDVYev0ZsELqKf+q dc9g== 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=oO3iVDr4h2M/eS/tybJFSy52r4go6bpNG8ZqgGJ1RVo=; b=Ha2MsTezhD6p3jrdg1B58ahDsRQzHGyjQIp4x/gsOkS7Por9HdS6ZeAdeFCb3HP5Wk 0dSDgYroHwoLCZLKCna1MYw6m2h31Gshs96bQ2W9RLiGDfF0ckcwB92g5acLn+r1fqlp dZJ/o6VCWyv9uKKopzjAxAZTOTXDM2U7zOMste5ocBWfieYIuLjsjw5wl7NTy353oX8z KNxKirS+YcmpV/cfpjUTQjPcE4NMEjepvt0q4Z5FWRZ0MPBBWTXI1359WOn+WqTTDP8R ZVOoztkOuZaah09SByWWkHTzWIHNueKGn5eVGU2DU0yJHCJQBhtLdmYgt/ky1ES/34y8 O76w== X-Gm-Message-State: AO0yUKXfI7AZCs0/YwqfGElE/Zv8bEcN27kADVNnSFDcydoqzzRT3F3Z VsxIGjEmNcwKs9REt/HC1q8yGgdmCUBcc2X9i4c= X-Google-Smtp-Source: AK7set9anlrPlgbC4ffU8TT/VhF58RAUcztkniRkV8HabQebkfKh/PuJ9vutK+On6mkt/SVpJsRFIw== X-Received: by 2002:a17:902:d4cc:b0:199:16c6:8a24 with SMTP id o12-20020a170902d4cc00b0019916c68a24mr232879plg.61.1676414877095; Tue, 14 Feb 2023 14:47:57 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u9-20020a17090341c900b0019607984a5esm10735785ple.95.2023.02.14.14.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 14:47:56 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt Subject: [PATCH v6 08/22] examples/l3fwd-power: replace use of RTE_LOGTYPE_POWER Date: Tue, 14 Feb 2023 14:47:21 -0800 Message-Id: <20230214224735.1404326-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214224735.1404326-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230214224735.1404326-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 caf26b373e8d..8e094c1bdda5 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -52,7 +52,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 @@ -2445,7 +2446,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; @@ -2454,7 +2455,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; } @@ -2472,7 +2473,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; @@ -2541,7 +2542,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 @@ -2607,7 +2608,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"); if (app_mode == APP_MODE_EMPTY_POLL) empty_poll_setup_timer(); @@ -2626,7 +2627,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