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 8E8D541CF1; Tue, 21 Feb 2023 00:37:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD18B43150; Tue, 21 Feb 2023 00:36:25 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 04FA24312B for ; Tue, 21 Feb 2023 00:36:09 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id n20so1396549pfu.12 for ; Mon, 20 Feb 2023 15:36:08 -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=zmfGoKHvyZ/LrfCWuy7u8YvmYLMomfT2+wYYCL6MaHgOEpsarPXd1hdIT5W1xOphnr JMoc/k9ynuZMIl5H/s0F0jzu8VHtT8OKaG+HFd9dsIiTi6YaZFMRrWYuiO2TlHzBU/eR xxSrhSWKk9emqv7UpWcZpAnn1PGOhwDvKzYgqfUUxk5bxWL8q+5iGj8HdX15pPFUj91/ jZcRcB2K/PjHYajo/mil3zC2EqEeBlPKN/7Q1+nn0HIEHl26p5ByTHg3QrwFw1ByP7mu ICdNyEK/YR4LRZ/XUjMHAmSB9bvf2OZ8NRBtJgNVbFzPqvp3zhwe572lQgDG3XadzPlQ 6b5A== 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=fCpRURnrN44nTXE6Szr4Z8EbTDoGRgSvZ3RtxrDUyR5DkGYgwmagNjhD4gpbYDc+E9 7t8lUct+92GUEL8wFgvv8PXw3chntFaUTylmdwizt8U4wUFI2zovANv6MFGUj7pOJ2bF CnJNhTfJi9/vYRgcGJyueytWdpW3CXC4xqIA1OrxXzEYSKLSwLgdXF48m7R+jbZZjYZ8 jJVUfVGvJ3WBKo9J8HXAxInsHAzmivTPW8yUwXpxn/lTmP919Ine2x9+E6sZUruSlpIJ jnpVjkNlDykWusXATwo01bFITFD3fbK/9X6OSkYWrb8j0dlN88meKRbdnaqtPaTw7v6X iNcg== X-Gm-Message-State: AO0yUKWxpVz2fEOYOxLdbdwFreSalXWjIHX+1VPqxGghYt4kIOLfiLcA 2dD1fUxl4Aods39Tlusip88+936oICAQVgggMqg= X-Google-Smtp-Source: AK7set+pxauaDKIt7mVVCGZR2kJsTzsES0oFcoXbGWDroWrFay/4x9cC+2GlIPzaVb7yIQntpCHJdA== X-Received: by 2002:a05:6a00:51:b0:5ad:9f47:8ae1 with SMTP id i17-20020a056a00005100b005ad9f478ae1mr2599807pfk.3.1676936168236; Mon, 20 Feb 2023 15:36:08 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q19-20020a62e113000000b005a8dc935ec1sm8215908pfh.62.2023.02.20.15.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 15:36:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v8 11/22] mempool: replace RTE_LOGTYPE_MEMPOOL with dynamic type Date: Mon, 20 Feb 2023 15:35:45 -0800 Message-Id: <20230220233556.168553-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220233556.168553-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230220233556.168553-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