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 C672341D32; Tue, 21 Feb 2023 20:03:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67FE742F8A; Tue, 21 Feb 2023 20:02:39 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 7544942D3F for ; Tue, 21 Feb 2023 20:02:27 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id oe18-20020a17090b395200b00236a0d55d3aso6213225pjb.3 for ; Tue, 21 Feb 2023 11:02:27 -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=ATcB2176T80Zh90RL4kLkGf4GBWoOLMF4Wm6dK4wNE1oSB/4tmMeFWAS7gvnCvenQ1 wBKIDJMA2cF7D4hEITxmXZSsflQienwvGviI82508i54KzNS8IeB5XIETuM6kG4k8k5Y xRJW4qZdZiJUFtEbK4oad/WADidmP8oBBXx4YnfpEuoykn4v6oP5vR1b7qO/t7DLEJ4Y YYHwzzSpsdwe6eCZClwConInCeHq4F6qruOkt5a1M54i6aWJWZjAskrHH63i+/C+Ge6e V4KTckam33E+ulO6S0qjneLKuVu2EfJ8yM700OW5Kiq+kkzbkQlIrp3vLAPbqDt9ZwzM GzGQ== 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=UEn/3oLvAKvccjy47ugJGhs7gaBomnYGMEw1/xDt2B2Iu//Xf3VUD90XBY+q8yJw1g pQYkw0yJaLsCd0FeoDDsTQhCfAUXWiidZ/mt4RR2H/f8XICHA8av9m2FgInm78NeuIfo OCiPr4vxEU+lp5hFR4Uq2CSSGmMyClCOfYKcVoCnAQxXIzYyBMjUT0qTdfIucmYz24Cj Y2Ix5qdIpa3jAdi7AH8sW+gftwAjFFrvGBDBgKxCIr8PvY+ciUcg45ugZz8Lh/p71aiv loJTCT9saQedHMe6sBnbiLi5nK55aVrGd+6ltQT2Yi1FrXdA3QuTdfLlt+kc7S4dm4tz VgLA== X-Gm-Message-State: AO0yUKVKvbjQAhcQzui6tPUYI8lhQmEEgL8dc0D4hC0zXL32xJ2+0xU2 Fdwjj8yxCjj2OCuB1C09iM4aQvWb7neJhMrUWTk= X-Google-Smtp-Source: AK7set+sK3Q/dhKePFRuUji21ON4rSFH9icMASEh/9WB2uaWWpsp6Y0gv+C2cR3HvkAxW5vRQ7PZ4A== X-Received: by 2002:a17:903:7c6:b0:19a:a815:2869 with SMTP id ko6-20020a17090307c600b0019aa8152869mr6476830plb.4.1677006146297; Tue, 21 Feb 2023 11:02:26 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jc4-20020a17090325c400b001991e59fde6sm10213018plb.216.2023.02.21.11.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 11:02:25 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Andrew Rybchenko Subject: [PATCH v9 11/22] mempool: replace RTE_LOGTYPE_MEMPOOL with dynamic type Date: Tue, 21 Feb 2023 11:01:57 -0800 Message-Id: <20230221190208.514276-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221190208.514276-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230221190208.514276-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