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 6AD2341D40; Wed, 22 Feb 2023 17:35:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C0E6430FE; Wed, 22 Feb 2023 17:35:48 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 44281430AD for ; Wed, 22 Feb 2023 17:35:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677083746; x=1708619746; h=message-id:date:subject:to:references:from:in-reply-to: content-transfer-encoding:mime-version; bh=qFH4nGWDov/hQTCAFnPXRBFnuYP6VgGB1Q4leA3Sw+E=; b=CONDqDdtzgoQvf7OcBzI0rMiKoh+6dazTNgEQJdJDIRmau66dyFvWjPX TCxQsCoflukdruHZ54pKM82ls5uvysvH2aEpiXXugk2rKXdLzJfZWO8IF wMlmfnGMxq3g18VOA6FHH04GWVpN0M13/gYowZDg2HQWzMbsGqmuS0C+p wS2+asGe9DRmG3SYnznl/jNZwFYkhdhIIITCG+Elq3g7Lo/hbKkT+UTTF t/pstICL/fVVln4ac/0pBvSXBW4BVbKcB4ezGjydUJPK0i+lK8RWmHe9B zlIzkrHZ0HxS7E7HK7SZYCP78foGdTrzZ2rvqTcem4REqo0jDxFlJmufc w==; X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="395452415" X-IronPort-AV: E=Sophos;i="5.97,319,1669104000"; d="scan'208";a="395452415" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2023 08:35:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="674169235" X-IronPort-AV: E=Sophos;i="5.97,319,1669104000"; d="scan'208";a="674169235" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 22 Feb 2023 08:35:44 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 22 Feb 2023 08:35:44 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 22 Feb 2023 08:35:44 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 22 Feb 2023 08:35:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDtwBdhY5O9HlMNUCaJunn3vm1jOwkmBdJ8O1UEgeKC6wRznbmas/iQmAQPcyd525JWI8e1xGT/lbaQlQC58B5urPUdB4I4dtX4P07x5tyc4V8+QLZT+h+Rq0apwQ8XnkOfuTUV8UMNXkCQQ6Z96MzDl6G0B85U3E0HIQyzaFKjFFIEvAuLw0ttElqofqCU42rrSHgfH+mGX2BqZqwpenSAmFeIn9b+9luuBtYFO/NcdmcvnLbO9RXFHE1vxc186BJPcCzTjTuZOMuntDyARkGOmNxQwPv7QKO4Re4Sw/qKTVVfCzsEscVjqFnFsAx5mSVC8yMTd4LjC6hEhOw0elA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MTUPivkqICUh+cQhS8D5MEOzne3G0V+Nb24/dAOT8nA=; b=KHPiisKfqvDLauCJXXHxbfzt3ry2uQwjz2GpptEqnZC2QVVmLNg1NgAonRZpdldw3/hQrBX6bh9i5K0lTHvHeCrEWjtwve0mx0fZAIfV9H+D0169MVxPC1ljKZsWQubY04NpUeJT/hjuW6YvhgEfP1D40wSmnXQpjZWH6CpResHgwLzPYMuvLGL3iMcJqrqOmbGhUZp9lCJb9KSFnl9d9z7at3FJl6Cxw6hzWDaE65jIgWSdYvIbMqcZRrww3xbtx2sLZYZ5sCxcrAG1O+i1TfEVv7wHMlrcAa4TUA45FSpr7R7sgl51azp56UKsMp/KdW1MWJQxcZh/nLBQUA3Y2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) by DS0PR11MB8206.namprd11.prod.outlook.com (2603:10b6:8:166::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.18; Wed, 22 Feb 2023 16:35:41 +0000 Received: from BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::4242:36e2:5a81:ff49]) by BYAPR11MB3799.namprd11.prod.outlook.com ([fe80::4242:36e2:5a81:ff49%7]) with mapi id 15.20.6111.021; Wed, 22 Feb 2023 16:35:41 +0000 Message-ID: <00e00432-0489-bd69-c0d1-6a1fdd1011f7@intel.com> Date: Wed, 22 Feb 2023 16:35:36 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v10 09/22] power: replace RTE_LOGTYPE_POWER with dynamic type Content-Language: en-US To: Stephen Hemminger , References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230222160802.123611-1-stephen@networkplumber.org> <20230222160802.123611-10-stephen@networkplumber.org> From: "Hunt, David" In-Reply-To: <20230222160802.123611-10-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0572.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:276::22) To BYAPR11MB3799.namprd11.prod.outlook.com (2603:10b6:a03:fb::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB3799:EE_|DS0PR11MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: d6d46ee8-6af8-4aaf-1b51-08db14f2d65f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gP8eEDN+rH0dHjgvp+K2tgEip9ITPp0KVTcdxG4d5Oz5tknTtTIF2xKOTxEGiWL9cmNHbZs11pXCWpxQvS1h/fFoJruCi4r/294bQcSJVysLV+FZWVSosDYap/qGvxvwDc1srb/0pDtCzr2QPrs0o2Dlp6f7jhlaeCVYFu+z63ViVbpBXfoYlwLzPTGcPRIkWIyg+Bq+6L0dXizv02e0mjF1cJWtu21pQk6MZ6FCmmnIK4oNhmw6Bn9LaqfOEJbeUA7puLexZHKbRphiOkRm1dMvDkZUV51L9p4k5OQ5zYculpgcdlgc49yatyP+WaJ1iVr45X7i8VBztq6ZKCa7bStoHWdADtavdUCzb3Oi1DOKmWrSyZM3kvoYJz3RyWtoaYs5GIfr6VPeNiyNwedw1nZnxxXVW1n2hJzQaHbXbtfPkjt7kPU4ZVg++hmZoeYvRH9gVegbP2VttxC+qPHzShNG0H9aYPjny3h5jGl9k9Ma56vdP9rT1KPkoGT3k5ad+swFVGu0yW4BF08QM2Zs5Hx3WX//M57Gjdrj+F6YLT0X0WQOmRhrzvsxGk0/CityO8h+ZaY5mX3hCKnXgaDOzRZdq95B07YQur9lbVUqUr/wm/Xzp3EonKtd94LaAQGMXMoRoryXf/9a1ZLzdF408xcVPYMoDrnyC+gxtKvWqXVpoxHC9ZfL5oEAvdrOl+u46iREQU6bLxwdyQgXhlTu3Yz3B6smU64v+ybSed6QOic= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3799.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(136003)(366004)(39860400002)(346002)(376002)(396003)(451199018)(316002)(478600001)(66556008)(66946007)(66476007)(31686004)(8936002)(8676002)(6486002)(5660300002)(41300700001)(38100700002)(6512007)(82960400001)(2906002)(31696002)(36756003)(26005)(186003)(83380400001)(6506007)(6666004)(86362001)(53546011)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T1poUE5lcWNPcGJtLy9iWVhUMXJmK0NhK3MrU25DT3ZuQlFZTXloZ3VQVzlG?= =?utf-8?B?TjdOWjVLM0JrWHhJNFpSU1Blb0N4YTkzSldHSldKWHRsU2ZNTURwRUVLcVpj?= =?utf-8?B?RFU0TTZYVi85a2VNRWcwQW00STR5b3lBTEF0Sm9qVFdIdFBwNHplQ3hXa2ZH?= =?utf-8?B?cWZHOXV4VnlGUHNzOHJncGU5R0dKVk5DZHJYRWpMR1BsUXVaK3p2cXpCbkJL?= =?utf-8?B?ckpBZlhaRUdQbUh2ZEF1Sk84ZG9sT0RpQzc0L1VZS1MySUQzNzdEWVA1cTF3?= =?utf-8?B?bzYzUE4yRENPdlcvcGZ0RS9DcmtMcC9vMlFyRW44Yllpc2NDQzVNbmIyNkVX?= =?utf-8?B?MFVPMGR0c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VEh0UGRCS1cvMzhXVkhWbXhxSjY3Q3dqL1VObzVpZWNp?= =?utf-8?B?TWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: d6d46ee8-6af8-4aaf-1b51-08db14f2d65f X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3799.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 16:35:41.7380 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ldaz0EAzMyvGTWX6BW+wYlpLXRb5RN9EWwE0C2J3f/uYoDeqFgSukMxibjpqgfqGxKgW/mkzcayVNWsjI+MBCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8206 X-OriginatorOrg: intel.com 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 On 22/02/2023 16:07, Stephen Hemminger wrote: > Use dynamic log type for power library. > Also replace use of RTE_LOGTYPE_USER1 with lib.power.guest. > > Signed-off-by: Stephen Hemminger > --- > lib/eal/common/eal_common_log.c | 1 - > lib/eal/include/rte_log.h | 2 +- > lib/power/guest_channel.c | 3 ++- > lib/power/power_common.c | 2 ++ > lib/power/power_common.h | 3 ++- > lib/power/power_kvm_vm.c | 1 + > lib/power/rte_power.c | 1 + > 7 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c > index 9e853addb717..39e1e6680dea 100644 > --- a/lib/eal/common/eal_common_log.c > +++ b/lib/eal/common/eal_common_log.c > @@ -355,7 +355,6 @@ static const struct logtype logtype_strings[] = { > {RTE_LOGTYPE_HASH, "lib.hash"}, > {RTE_LOGTYPE_LPM, "lib.lpm"}, > {RTE_LOGTYPE_KNI, "lib.kni"}, > - {RTE_LOGTYPE_POWER, "lib.power"}, > {RTE_LOGTYPE_METER, "lib.meter"}, > {RTE_LOGTYPE_SCHED, "lib.sched"}, > {RTE_LOGTYPE_PORT, "lib.port"}, > diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h > index 1408722b2c2f..7d4345acceca 100644 > --- a/lib/eal/include/rte_log.h > +++ b/lib/eal/include/rte_log.h > @@ -36,7 +36,7 @@ extern "C" { > #define RTE_LOGTYPE_LPM 7 /**< Log related to LPM. */ > #define RTE_LOGTYPE_KNI 8 /**< Log related to KNI. */ > /* was RTE_LOGTYPE_ACL */ > -#define RTE_LOGTYPE_POWER 10 /**< Log related to power. */ > + /* was RTE_LOGTYPE_POWER */ > #define RTE_LOGTYPE_METER 11 /**< Log related to QoS meter. */ > #define RTE_LOGTYPE_SCHED 12 /**< Log related to QoS port scheduler. */ > #define RTE_LOGTYPE_PORT 13 /**< Log related to port. */ > diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c > index 969a9e5aaa06..efc326d520ca 100644 > --- a/lib/power/guest_channel.c > +++ b/lib/power/guest_channel.c > @@ -17,7 +17,8 @@ > > #include "guest_channel.h" > > -#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1 > +RTE_LOG_REGISTER_SUFFIX(guest_channel_logtype, guest, INFO); > +#define RTE_LOGTYPE_GUEST_CHANNEL guest_channel_logtype > > /* Timeout for incoming message in milliseconds. */ > #define TIMEOUT 10 > diff --git a/lib/power/power_common.c b/lib/power/power_common.c > index 1e09facb863f..bf77eafa886b 100644 > --- a/lib/power/power_common.c > +++ b/lib/power/power_common.c > @@ -12,6 +12,8 @@ > > #include "power_common.h" > > +RTE_LOG_REGISTER_DEFAULT(power_logtype, INFO); > + > #define POWER_SYSFILE_SCALING_DRIVER \ > "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_driver" > #define POWER_SYSFILE_GOVERNOR \ > diff --git a/lib/power/power_common.h b/lib/power/power_common.h > index c1c713927621..63a3a443509e 100644 > --- a/lib/power/power_common.h > +++ b/lib/power/power_common.h > @@ -5,11 +5,12 @@ > #ifndef _POWER_COMMON_H_ > #define _POWER_COMMON_H_ > > - > #include > > #define RTE_POWER_INVALID_FREQ_INDEX (~0) > > +extern int power_logtype; > +#define RTE_LOGTYPE_POWER power_logtype > > #ifdef RTE_LIBRTE_POWER_DEBUG > #define POWER_DEBUG_TRACE(fmt, args...) \ > diff --git a/lib/power/power_kvm_vm.c b/lib/power/power_kvm_vm.c > index 6a8109d44959..db031f43105a 100644 > --- a/lib/power/power_kvm_vm.c > +++ b/lib/power/power_kvm_vm.c > @@ -8,6 +8,7 @@ > > #include "rte_power_guest_channel.h" > #include "guest_channel.h" > +#include "power_common.h" > #include "power_kvm_vm.h" > > #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent" > diff --git a/lib/power/rte_power.c b/lib/power/rte_power.c > index 63a43bd8f5ae..db0e7705a9ef 100644 > --- a/lib/power/rte_power.c > +++ b/lib/power/rte_power.c > @@ -10,6 +10,7 @@ > #include "rte_power.h" > #include "power_acpi_cpufreq.h" > #include "power_cppc_cpufreq.h" > +#include "power_common.h" > #include "power_kvm_vm.h" > #include "power_pstate_cpufreq.h" Acked-by: David Hunt >