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 183FC41D40; Wed, 22 Feb 2023 17:10:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4F794307E; Wed, 22 Feb 2023 17:09:43 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 2F20D40689 for ; Wed, 22 Feb 2023 17:09:35 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id z2so9437425plf.12 for ; Wed, 22 Feb 2023 08:09:35 -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=UMIvo3eH3gIf7bmSK7HiVVxlasm2kXrm7AwYySPnJ8E=; b=1hyWcbxsEh5X34kjp8cclxtt0dKamZVhef9QyJ2uvH0xwoq+GpaCHUr6iBTE3q5OwH R8JX5T3Jz78CQQaXC4TFPNG9OX552MJ7Bx6i0lhu787YkSU4mw2QXCoj6t8NU+qsxC75 8QbjOSoHPXjsxz1XzySejCArJV9sxQGUcvYmoZBvCBEMlZAaT/NSemyZZ+irO1ncz9zS VAl6gxpcZkrCLL5h5//I6txKBI+RzHoRa5279GCv9kq4EqDeLN82H/C/fs87fEhHbeNV f0JC5nhFx+j6w5CgLGh6oYAA16p1I9y7t7gvFcmaNmHFoFGNcVP5K8AMx5txap+7mNcp QuVg== 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=UMIvo3eH3gIf7bmSK7HiVVxlasm2kXrm7AwYySPnJ8E=; b=Qgi9W/m5+APDqUiI8EnSAEwWpgEE0aWhU4CfezhqyxNCNl9GnTrTfapWGwZQmSWNp4 RKJZ4qRoswGwknddlVXx+MDBhq4mixbbsSOrSlW4ervBQAXtOE6KZfkiVsbwFOFaC17M n6EiByt8SSbaq5fGk7bWqaQjuIZgRpGr6QjCn6qsFdcJPdrOAFNc8vu+GR2Y+6LzUc2a +uwsUBgM0571J2mcFw7BSF3renXFaSgDG45r3rjlw6SfDHEff93zH4Kb1A3mRnICBpoB BwiQcB3d/uwVDtmitltC1R+ghVDgUViTwy0FqcgQ3a3nVQWqqUoD5Cu7YQk7c7gh32XT b5Rw== X-Gm-Message-State: AO0yUKXTqYoRA8caVoDebOFuvt4aqRjawiU8xnkaVxYiKnyM9ky6hWPu +gVVhJlm624sJC5GJleOQwscWG77Z31nSs/lJ/o= X-Google-Smtp-Source: AK7set8EliEVElMocevpcgn+omqmZzINgk82b9Ct5kJh7N4YXgl8KTNVOXl0qENXnRB/TcA7TOHEHg== X-Received: by 2002:a05:6a20:3a96:b0:c0:1faa:9b69 with SMTP id d22-20020a056a203a9600b000c01faa9b69mr616330pzh.58.1677082173790; Wed, 22 Feb 2023 08:09:33 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id x24-20020a63db58000000b004fb71d96d78sm5063778pgi.2.2023.02.22.08.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 08:09:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Andrew Rybchenko Subject: [PATCH v10 11/22] mempool: replace RTE_LOGTYPE_MEMPOOL with dynamic type Date: Wed, 22 Feb 2023 08:07:51 -0800 Message-Id: <20230222160802.123611-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230222160802.123611-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230222160802.123611-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 from RTE_LOGTYPE_MEMPOOL to logtype_mempool. Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/rte_log.h | 2 +- lib/mempool/rte_mempool.c | 2 ++ lib/mempool/rte_mempool.h | 8 ++++++++ lib/mempool/version.map | 3 +++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 5f15e312f15b..4025d2039d55 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -349,7 +349,6 @@ struct logtype { static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EAL, "lib.eal"}, - {RTE_LOGTYPE_MEMPOOL, "lib.mempool"}, {RTE_LOGTYPE_PMD, "pmd"}, {RTE_LOGTYPE_HASH, "lib.hash"}, {RTE_LOGTYPE_LPM, "lib.lpm"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index 31a2ee2f6b6f..9f86bfdd0198 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -29,7 +29,7 @@ extern "C" { #define RTE_LOGTYPE_EAL 0 /**< Log related to eal. */ /* was RTE_LOGTYPE_MALLOC */ /* was RTE_LOGTYPE_RING */ -#define RTE_LOGTYPE_MEMPOOL 3 /**< Log related to mempool. */ + /* was RTE_LOGTYPE_MEMPOOL */ /* was RTE_LOGTYPE_TIMER */ #define RTE_LOGTYPE_PMD 5 /**< Log related to poll mode driver. */ #define RTE_LOGTYPE_HASH 6 /**< Log related to hash table. */ diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index cf5dea2304a7..b609a94fdf9d 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -31,6 +31,8 @@ #include "mempool_trace.h" #include "rte_mempool.h" +RTE_LOG_REGISTER_DEFAULT(rte_mempool_logtype, INFO); + TAILQ_HEAD(rte_mempool_list, rte_tailq_entry); static struct rte_tailq_elem rte_mempool_tailq = { diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index 9f530db24ba1..db01acc19b02 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -175,6 +176,13 @@ struct rte_mempool_objtlr { #endif + +/** + * @internal Logtype used for mempool related messages. + */ +extern int rte_mempool_logtype; +#define RTE_LOGTYPE_MEMPOOL rte_mempool_logtype + /** * A list of memory where objects are stored */ diff --git a/lib/mempool/version.map b/lib/mempool/version.map index dff2d1cb5555..eb2c12127560 100644 --- a/lib/mempool/version.map +++ b/lib/mempool/version.map @@ -57,4 +57,7 @@ INTERNAL { # added in 21.11 rte_mempool_event_callback_register; rte_mempool_event_callback_unregister; + + # added in 23.07 + rte_mempool_logtype; }; -- 2.39.1