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 22BAE42868; Thu, 30 Mar 2023 01:42:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9CC942D6D; Thu, 30 Mar 2023 01:41:17 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id CC53D42D56 for ; Thu, 30 Mar 2023 01:41:13 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id w4so16464097plg.9 for ; Wed, 29 Mar 2023 16:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680133273; 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=44dZ4ytCFbB15xyOjr93d/NjqhAyDXFKhUkhvIwHcpk=; b=S/EglSGSV1h3qTJV7ZEoBkOwculocGnqF3sacUXZhBE8WqlmpibNBnUtpX1qbAszV5 nDhuzW9fvsSC44FKQcSoP+VbSpj14r2TJr1Fa44rbvpr8Fqo899eMaC15hY6Wk/RYvaq ikVKoJn6zc8HQSPs2j8xcDS9C+kmBhGI9zKEP1nU1oScXg2h4IGhLvIhzlRE94C+77ot 8O4unK63bSi+0AT1q9iVzBLpz1yyF50BjQGL1bZ2nfTdUJQJL11xTSgxiHAAbm3z4r/M C/LxpYJmtx84mMSXctSC311l8YFdYh1wOZdbEBvpKb+Xzw/Z+HjqFXsn7rSHyq4lkJPe qyKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680133273; 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=44dZ4ytCFbB15xyOjr93d/NjqhAyDXFKhUkhvIwHcpk=; b=Ioe/W++Bz/cffPMspIHjmvPHURRn5Pq5ZaBKfTd65t8AOpyX6qLrOy2BYqt2X/WV47 9/Ol7fUrtLG4zAde+QG2GUlFED54RCk6+/DkB58TyB9Dwde2n+pbsiXMa5BWihyCtdgG WKz1hOTc1ol38Rm9Tafhh2FZqRRZj7TYLWMQWyTV+hPyKj5HVSg9GjnXGN/t/55sUfIP NqZmf3K7Chg3ayUhRRJnx3oQHRiJluU8G5F/uaK7DdyvaF7xm96n83O8EDs89VDCOlji IGBZTAQ5EzxJQuxpaVzhn04gRvnnLmE/+2r8BvA9hT21fJVQVdFrlQLn1nUsPmBU541X PUnw== X-Gm-Message-State: AAQBX9escV9MeKzAtctcZcWuJJDwEamhIiBxMCtrqRenpv3ZAXc/fgKu uwOYDLrhFBx/skK2/kEge0u/J04De0c2ls1yAXWtEg== X-Google-Smtp-Source: AKy350Zb9ivDug4h0z6viz6RJdWCG6HeluqxqVj3k7+BWebtbSOYp3I8S8X3hkSruReERtZto0OO+A== X-Received: by 2002:a17:902:f684:b0:1a1:b238:d1a5 with SMTP id l4-20020a170902f68400b001a1b238d1a5mr24443961plg.4.1680133272704; Wed, 29 Mar 2023 16:41:12 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id f10-20020a17090274ca00b0019c2b1c4db1sm23360095plt.239.2023.03.29.16.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 16:41:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v12 14/22] sched: convert RTE_LOGTYPE_SCHED to dynamic type Date: Wed, 29 Mar 2023 16:40:41 -0700 Message-Id: <20230329234049.11071-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329234049.11071-1-stephen@networkplumber.org> References: <20230329234049.11071-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 19768d8c38b0..27e98e46df7a 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.2