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 D391541C8C; Mon, 13 Feb 2023 21:00:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CFB142DA4; Mon, 13 Feb 2023 20:59:51 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 5A60D42D64 for ; Mon, 13 Feb 2023 20:59:43 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id f16-20020a17090a9b1000b0023058bbd7b2so13359925pjp.0 for ; Mon, 13 Feb 2023 11:59:43 -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=EBXd7hlidEUeOKZgcvWvewq4rKwneIJHCAR/EMsgr2w=; b=g2I9ckkPgpWX2EX9ESUgBviUsSmEsupoHhK6ojsvZOGKN4SNBKSJjxaOflgwdwCKEZ xKmjjgR8BDLl0Yzhzph7J76lns07LH2R1dy6rEBClDP9g3asH7E8ZVpiMqaoxjHfwRcr wvgk1VTmL8JvQTZ/yWLCP7OfOPo2kGXD6c7taEUdF0d60FCCSoKvX+JMTl8PuxnTON2x 1gE/MMxRmLRSdvii9q6VSqBihmFnTbhk63WWrvqejxXDbM2Fz6lmzBt4hEwLZJOx1W5b p370RP863AUJ53LHF2ApQPLjAaea81NdnSv/H/QRSXECt/JMQOBi/xtVo+pbwgNE+IJh 7wOg== 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=EBXd7hlidEUeOKZgcvWvewq4rKwneIJHCAR/EMsgr2w=; b=7u5PYPC9muAccGzbtPMfpCpflFbLkPKEaHtcCpozjO0hhKTJr34rX9r7435rWuqB1k V/b/R2rTFNtSOG5hvZ1fm2CQm1vQtxXgp1uswzd3XEdeuOIKaOzZW9pUCKUkX6g/c/S5 tBv6R69cL+qH1EVgagTW6gaSPx/Mc6P1tk7dfDSDdyb5K3maoMqOCAMaCtpmVXRxLouD ByOvr8kxIWG3GSv95yJ/MRFOX++EJZOAfk3mZU9TgDCSgzSUTIAfQ6yFv2oNTkHzhV3r ekt4/k32JIpDQ3tacmF0OdScI/ClsnJo31CK8H+ouLtAnWI2Pu6MQOYtFTagfOzVmK+t jvQg== X-Gm-Message-State: AO0yUKXXWLnb8i6BJ9Pgn2DatOJHzGO7FdkoOCchk/zjJQXTZoS2y8pJ +RLVpwrsB2KHytESktdawg3X2ZFrgeFu29uKjXo= X-Google-Smtp-Source: AK7set9keyAvvrMNuZIf8s9K7PyzHzB5ViARbJEDeuCYW7FB8dHdoZPuxyxAMjEPVTUKRhF4aYl8MQ== X-Received: by 2002:a17:902:d2c6:b0:19a:a9ed:f897 with SMTP id n6-20020a170902d2c600b0019aa9edf897mr76337plc.38.1676318382321; Mon, 13 Feb 2023 11:59:42 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n20-20020a170902d0d400b001994e74c094sm8578911pln.275.2023.02.13.11.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 11:59:41 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v4 12/19] sched: replace RTE_LOGTYPE_SCHED with dynamic type Date: Mon, 13 Feb 2023 11:55:44 -0800 Message-Id: <20230213195551.1146298-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213195551.1146298-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230213195551.1146298-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 Also can remove unused RTE_LOGTYPE_METER Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 2 -- lib/eal/include/rte_log.h | 4 ++-- lib/sched/rte_pie.c | 1 + lib/sched/rte_sched.c | 5 +++++ lib/sched/rte_sched_log.h | 4 ++++ 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 lib/sched/rte_sched_log.h diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 70d5bb7b1951..d4b7088b5cbb 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -351,8 +351,6 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EAL, "lib.eal"}, {RTE_LOGTYPE_PMD, "pmd"}, {RTE_LOGTYPE_HASH, "lib.hash"}, - {RTE_LOGTYPE_METER, "lib.meter"}, - {RTE_LOGTYPE_SCHED, "lib.sched"}, {RTE_LOGTYPE_PORT, "lib.port"}, {RTE_LOGTYPE_TABLE, "lib.table"}, {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index dc2454a0d9de..f185fcbc5a94 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -37,8 +37,8 @@ extern "C" { /* was RTE_LOGTYPE_KNI */ /* was RTE_LOGTYPE_ACL */ /* 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. */ + /* was RTE_LOGTYPE_METER */ + /* was RTE_LOGTYPE_SCHED */ #define RTE_LOGTYPE_PORT 13 /**< Log related to port. */ #define RTE_LOGTYPE_TABLE 14 /**< Log related to table. */ #define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ diff --git a/lib/sched/rte_pie.c b/lib/sched/rte_pie.c index 947e2a059f6f..cce0ce762da8 100644 --- a/lib/sched/rte_pie.c +++ b/lib/sched/rte_pie.c @@ -6,6 +6,7 @@ #include #include +#include "rte_sched_log.h" #include "rte_pie.h" #ifdef __INTEL_COMPILER diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c index c91697131d3e..c2bd8c785fcd 100644 --- a/lib/sched/rte_sched.c +++ b/lib/sched/rte_sched.c @@ -16,9 +16,12 @@ #include #include "rte_sched.h" +#include "rte_sched_log.h" #include "rte_sched_common.h" + #include "rte_approx.h" + #ifdef __INTEL_COMPILER #pragma warning(disable:2259) /* conversion may lose significant bits */ #endif @@ -3002,3 +3005,5 @@ rte_sched_port_dequeue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint return count; } + +RTE_LOG_REGISTER_DEFAULT(sched_logtype, INFO); diff --git a/lib/sched/rte_sched_log.h b/lib/sched/rte_sched_log.h new file mode 100644 index 000000000000..fde051f49d62 --- /dev/null +++ b/lib/sched/rte_sched_log.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ + +extern int sched_logtype; +#define RTE_LOGTYPE_SCHED sched_logtype -- 2.39.1