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 83932430C3; Mon, 21 Aug 2023 18:12:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B9E9432C8; Mon, 21 Aug 2023 18:10:21 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id F403A4325F for ; Mon, 21 Aug 2023 18:10:14 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1bbff6b2679so20706955ad.1 for ; Mon, 21 Aug 2023 09:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692634214; x=1693239014; 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=5QpS2aq7y2KYjYCTgCBECHh7W/wSiiYmqYOUGkUrWko=; b=uOw/ZNgcT6bXUzBFAI3swtix/EFonWtdF4iDVhKmyFpPwW3WKLcjhXs9ROL+Oceu2e GQagGs/DWOECccvi81SHL9JJ7w3Bhqxc1NZNdx2iWbB/Rf4ZGY6WBYQCWbs9Q1ohZ5pb s6rYUm22bJ+vs/O7MLpgrWL4gJlOr+ZZZ/f4cPNLG66UE0kcxAkWk02cliAGnYez4wGy eRk3xGorGlB+sIquRWxhJqfvxRsKqNdp13fxBiAHrSE8WRDczH3s+jdRz0OD7CmwlTLV I6wBkDFG/d1cbjoMNAmxfDu7gV/wBGYAg7g9qmzzJgEaiz6bPZns6h526nOkww/G84D8 ONew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634214; x=1693239014; 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=5QpS2aq7y2KYjYCTgCBECHh7W/wSiiYmqYOUGkUrWko=; b=FV1ASIiZ2pBrFs6XTrQR6akfnHyHxtoRSNiTKbHuq1h8Gz9FRuzglY1gNWuViG+rni qUScCDy+oPx/ZNy1irHEruhAhWovyNW0l47mZQMQbDlb7ixZUk57G+hww5/y7GvfuaP5 4u+Ld7SPNhRrz1l25J4h6Jc7KBiIINxIWoRRAgn6XP11KrUZ+fKrKM+HT9SctX18O0tj UnXdSP5mJ+pb8GZsMBMGGHf//q2Lpb8iFCEDI4HWHWs6l6CaveLaJTCVUfet5885S/UO AIMXx2fDEuW14VmC8EUgXjjmqkYfvOZtC8qdbZK9JRqkf5Hdj6lIUGu2qPJM6+R6Spy1 Tfig== X-Gm-Message-State: AOJu0Yx1OpiYpyJgyuiKdVIkGdYcpmkbO1to6Gent54GEftQsasXoQY/ mTKOyaLoMsa5bZcCthKiUuC7HFV0ha/llb02QB+JGovq X-Google-Smtp-Source: AGHT+IHTG8bXrVowM1XrnlT4HHhThFxCXWimidiSIkzDuIMPhLr7E8oQSiUOdfP6KYQ+CMnduG5TEg== X-Received: by 2002:a17:902:6bc5:b0:1bb:9bc8:d22d with SMTP id m5-20020a1709026bc500b001bb9bc8d22dmr4494700plt.16.1692634214016; Mon, 21 Aug 2023 09:10:14 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id i1-20020a17090332c100b001bf2dcfe352sm7208159plr.234.2023.08.21.09.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:10:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v13 21/21] pipeline: convert RTE_LOGTYPE_PIPELINE to dynamic type Date: Mon, 21 Aug 2023 09:09:21 -0700 Message-Id: <20230821160921.383832-22-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230821160921.383832-1-stephen@networkplumber.org> References: <20230329234049.11071-1-stephen@networkplumber.org> <20230821160921.383832-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 RTE_LOGTYPE_PIPELINE to a dynamic value. Signed-off-by: Stephen Hemminger --- lib/log/log.c | 1 - lib/log/rte_log.h | 2 +- lib/pipeline/rte_pipeline.c | 2 ++ lib/pipeline/rte_pipeline.h | 5 +++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/log/log.c b/lib/log/log.c index 1ad2f80e67cc..f58e40e6a9f8 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -353,7 +353,6 @@ struct logtype { static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EAL, "lib.eal"}, {RTE_LOGTYPE_PMD, "pmd"}, - {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, {RTE_LOGTYPE_CRYPTODEV, "lib.cryptodev"}, {RTE_LOGTYPE_EVENTDEV, "lib.eventdev"}, {RTE_LOGTYPE_USER1, "user1"}, diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h index 6418479ee266..29db07881a5a 100644 --- a/lib/log/rte_log.h +++ b/lib/log/rte_log.h @@ -41,7 +41,7 @@ extern "C" { /* was RTE_LOGTYPE_SCHED */ /* was RTE_LOGTYPE_PORT */ /* was RTE_LOGTYPE_TABLE */ -#define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ + /* was RTE_LOGTYPE_PIPELINE */ /* was RTE_LOGTYPE_MBUF */ #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */ /* was RTE_LOGTYPE_EFD */ diff --git a/lib/pipeline/rte_pipeline.c b/lib/pipeline/rte_pipeline.c index 1fa9f9c47eda..6b937cf782ac 100644 --- a/lib/pipeline/rte_pipeline.c +++ b/lib/pipeline/rte_pipeline.c @@ -1608,3 +1608,5 @@ int rte_pipeline_table_stats_read(struct rte_pipeline *p, uint32_t table_id, return 0; } + +RTE_LOG_REGISTER_DEFAULT(pipeline_logtype, INFO); diff --git a/lib/pipeline/rte_pipeline.h b/lib/pipeline/rte_pipeline.h index ec51b9bfaadd..9fd40566a80f 100644 --- a/lib/pipeline/rte_pipeline.h +++ b/lib/pipeline/rte_pipeline.h @@ -833,6 +833,11 @@ int rte_pipeline_ah_packet_hijack(struct rte_pipeline *p, int rte_pipeline_ah_packet_drop(struct rte_pipeline *p, uint64_t pkts_mask); + +/** Internal Logtype used */ +extern int pipeline_logtype; +#define RTE_LOGTYPE_PIPELINE pipeline_logtype + #ifdef __cplusplus } #endif -- 2.39.2