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 97CB442868; Thu, 30 Mar 2023 01:43:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FA0542DA5; Thu, 30 Mar 2023 01:41:31 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id C23D4410F3 for ; Thu, 30 Mar 2023 01:41:24 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id p3-20020a17090a74c300b0023f69bc7a68so17854709pjl.4 for ; Wed, 29 Mar 2023 16:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680133283; 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=3GduaEJO85tMcNb+Ad5gJVBuZLPJOhi/Xoc8mAt2tZU=; b=6xRYHTv29NZk39yhV/1C+hCmlf5wvISAjgmHJgDZQ40LeyjLpB3jY9vzf5uiv2EA7J AOeVQnhaQbIwt6EXvcLXtz4tnAtKrKtNDN2klEkMikmRp0yoIsY+mGw2P6qxp1evTg2u 35ryM2HFP/6f0U6uejdKE4s65AucKWInecyeQkoNvmWMaZdQBKbLS8lOs/Pca+mcqfhh /qHMdTuktNP0K69KnD4VDGo69Sn/d++28enacE9gncc/SqToB2DTLiTfaLfUS29PWKl+ tKTpNP1YLs3VEiUO+4FoP6OvMCeZ1g0k3X6CxUtlVQLF8o4LX8EGAKuCytm81qhN4dXr c1Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680133283; 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=3GduaEJO85tMcNb+Ad5gJVBuZLPJOhi/Xoc8mAt2tZU=; b=aEL4rwKelHTo4W/uvwnvUBQzJO+RPRoNFMLXxjaCKBzRIYApiOGypRfycAstnhGJzs B9+/nYITWTb/Jc9MYz8bnS9C4IDe/WfJVG9vBL8mGeGN/cq6qBDxbpNKPWJ5euUi1oQS Aas4NXocOg6kGFl4kYPtaK5XlPdVV0aMk5AX6TvUJn1chPENacpwb8rQ4+JPUO3YQAdM yS4mmb+918wG1t4mfbXVNT5cdBHkTVrb1issw3ZKlLQKKqyh8/iDsiUGfQfy2r887ypP ZnjW8zbIYbHuYnW2GOOu3tMS14ZjjuwB2a7mN6E8zVbuVF/xEYvX/7SBplr6QgvXZbS7 WcGw== X-Gm-Message-State: AAQBX9ep56OiXIbDlg+8evuc29jpxQs4K+jXExv/nYh4ooMUM0ZCK/PW PXlnFgAn5TlShvZ1UwtVRcdv7EZLlSZQvGQ1hAi5sw== X-Google-Smtp-Source: AKy350bW+yzyle27Vf5qskcWFoDlGkYr7QQDDHCLWtWHhDyxQ6IC/FmLjwBRXAsKRHzcdigfrSL7wA== X-Received: by 2002:a17:903:2803:b0:19e:73df:b0e9 with SMTP id kp3-20020a170903280300b0019e73dfb0e9mr17441904plb.21.1680133283700; Wed, 29 Mar 2023 16:41:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 16:41:23 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v12 22/22] pipeline: convert RTE_LOGTYPE_PIPELINE to dynamic type Date: Wed, 29 Mar 2023 16:40:49 -0700 Message-Id: <20230329234049.11071-23-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 Convert RTE_LOGTYPE_PIPELINE to a dynamic value. Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/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/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 6c2d9bfc1950..704924e822d0 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -350,7 +350,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/eal/include/rte_log.h b/lib/eal/include/rte_log.h index 6418479ee266..29db07881a5a 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/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 ff86c7cf96bf..3b9b083b390d 100644 --- a/lib/pipeline/rte_pipeline.c +++ b/lib/pipeline/rte_pipeline.c @@ -1612,3 +1612,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 3cfb6868f727..ebae08de644f 100644 --- a/lib/pipeline/rte_pipeline.h +++ b/lib/pipeline/rte_pipeline.h @@ -841,6 +841,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