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 C353141D40; Wed, 22 Feb 2023 17:11:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 455BC430B1; Wed, 22 Feb 2023 17:10:01 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id E2CAD4305E for ; Wed, 22 Feb 2023 17:09:40 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id s5so9220794plg.0 for ; Wed, 22 Feb 2023 08:09:40 -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=oVUrp0GCMkTK1yUJ+jrtCRyLKPkzZ/+SmyGcwBFg3qM=; b=2LgAWuUujnsT6QyoZ1/4kAOxfahiz9G4OaGEGZn7QvF7Vklr6o1hlkWgTS2Q8sr0ts w+0jE4AO//xC9bO7crL3ROq6/v/zbIrewbGMDGU5eEnPtvl51QQdu5JmQEBiuslbxM81 S3cgeuStyNzciN6r13lR1Iki1WldFyungMAnHix09T9XyhZ8Q4LUIejSImUR/SnRiuTD F1JW/OxQK+YcX9KwwG86G9b6l/Csgmy8cCFu2IAEbqw714YpSHMSrv5uSGVVMxQmxAKO deCqN0Ivnq96m/QbGRgXsuOrI5OttkSXbHydLxD3OJG2BebHM7+nL3xFct2xSWe/4hGz MsIg== 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=oVUrp0GCMkTK1yUJ+jrtCRyLKPkzZ/+SmyGcwBFg3qM=; b=dzfCak1hvNC6eQc1R3jGjNLxKdaALmpX00dys0XOHp8ocofpYjGlpwHwTZz/N0JJ0G F5nMQcZNvUPPW5JXYuExDpDDffaEYXBm2W1OPC7KRrFxRrRQpvT9EbRKNgDMf6wm2w6Z 9X87Hmfv+qzoWpLNLO0xjmESiUsfTyXjdU/JqqIskppsBnpFj65Jaoolqw88oeiqn8XA b9Mo2g7t04G9XiPwsNaAG2VakQJ5X74LF8PkymU01qcNXTUjlnUSB8iucrXZ8K8AIq6K meBjTkLIhfSa9zWR5nzJaL9FO7hVr7q+ugVsRYHJAlQ8Wbc5Fs5zgT6oMFaJc6jonE6p x2CQ== X-Gm-Message-State: AO0yUKXIfuy0nONba/IVB2KX5LdeSdSpGxN08IDjd1dsUFTMtUlKpcN/ thnq3dmHusEe3xoeyMMr3sKYFhI4AVACvWo/hq0= X-Google-Smtp-Source: AK7set+BpRLItBbxtzmi2U8gdzuYeeE4+HGNU5B6yPrl5GTE1mLtSAFFL5PQ2GTnpKvEOpRMAMCZbA== X-Received: by 2002:a05:6a20:429a:b0:c0:c9b8:64 with SMTP id o26-20020a056a20429a00b000c0c9b80064mr11323031pzj.17.1677082179881; Wed, 22 Feb 2023 08:09:39 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 08:09:39 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v10 17/22] table: convert RTE_LOGTYPE_TABLE to dynamic logtype Date: Wed, 22 Feb 2023 08:07:57 -0800 Message-Id: <20230222160802.123611-18-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 Use logtype suffixes for various components of this library. Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/rte_log.h | 2 +- lib/table/rte_table_acl.c | 3 +++ lib/table/rte_table_array.c | 3 +++ lib/table/rte_table_hash_cuckoo.c | 3 +++ lib/table/rte_table_hash_ext.c | 3 +++ lib/table/rte_table_hash_key16.c | 3 +++ lib/table/rte_table_hash_key32.c | 5 ++++- lib/table/rte_table_hash_key8.c | 5 ++++- lib/table/rte_table_hash_lru.c | 3 +++ lib/table/rte_table_lpm.c | 3 +++ lib/table/rte_table_lpm_ipv6.c | 3 +++ lib/table/rte_table_stub.c | 3 +++ 13 files changed, 36 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 7f1d2c8a256d..d640ed3c88b9 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -351,7 +351,6 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EAL, "lib.eal"}, {RTE_LOGTYPE_PMD, "pmd"}, {RTE_LOGTYPE_HASH, "lib.hash"}, - {RTE_LOGTYPE_TABLE, "lib.table"}, {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, {RTE_LOGTYPE_CRYPTODEV, "lib.cryptodev"}, {RTE_LOGTYPE_EVENTDEV, "lib.eventdev"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index b11aec69af78..934bddff9dfa 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -40,7 +40,7 @@ extern "C" { /* was RTE_LOGTYPE_METER */ /* was RTE_LOGTYPE_SCHED */ /* was RTE_LOGTYPE_PORT */ -#define RTE_LOGTYPE_TABLE 14 /**< Log related to table. */ + /* was RTE_LOGTYPE_TABLE */ #define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ /* was RTE_LOGTYPE_MBUF */ #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */ diff --git a/lib/table/rte_table_acl.c b/lib/table/rte_table_acl.c index 53fd5c66adb5..f44a25a89405 100644 --- a/lib/table/rte_table_acl.c +++ b/lib/table/rte_table_acl.c @@ -11,6 +11,9 @@ #include "rte_table_acl.h" +RTE_LOG_REGISTER_SUFFIX(table_acl_logtype, acl, INFO); +#define RTE_LOGTYPE_TABLE table_acl_logtype + #ifdef RTE_TABLE_STATS_COLLECT #define RTE_TABLE_ACL_STATS_PKTS_IN_ADD(table, val) \ diff --git a/lib/table/rte_table_array.c b/lib/table/rte_table_array.c index 54a0c42f7dd2..a7849beaecd6 100644 --- a/lib/table/rte_table_array.c +++ b/lib/table/rte_table_array.c @@ -11,6 +11,9 @@ #include "rte_table_array.h" +RTE_LOG_REGISTER_SUFFIX(table_array_logtype, array, INFO); +#define RTE_LOGTYPE_TABLE table_array_logtype + #ifdef RTE_TABLE_STATS_COLLECT #define RTE_TABLE_ARRAY_STATS_PKTS_IN_ADD(table, val) \ diff --git a/lib/table/rte_table_hash_cuckoo.c b/lib/table/rte_table_hash_cuckoo.c index c77eccf52722..12db0b84142f 100644 --- a/lib/table/rte_table_hash_cuckoo.c +++ b/lib/table/rte_table_hash_cuckoo.c @@ -10,6 +10,9 @@ #include "rte_table_hash_cuckoo.h" +RTE_LOG_REGISTER_SUFFIX(table_hash_logtype, hash, INFO); +#define RTE_LOGTYPE_TABLE table_hash_logtype + #ifdef RTE_TABLE_STATS_COLLECT #define RTE_TABLE_HASH_CUCKOO_STATS_PKTS_IN_ADD(table, val) \ diff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c index 70ea84fa2e51..147ecdf082cb 100644 --- a/lib/table/rte_table_hash_ext.c +++ b/lib/table/rte_table_hash_ext.c @@ -11,6 +11,9 @@ #include "rte_table_hash.h" +RTE_LOG_REGISTER_SUFFIX(table_hash_ext_logtype, hash.ext, INFO); +#define RTE_LOGTYPE_TABLE table_hash_ext_logtype + #define KEYS_PER_BUCKET 4 struct bucket { diff --git a/lib/table/rte_table_hash_key16.c b/lib/table/rte_table_hash_key16.c index 04d7fd64bd97..09fef5f14ce7 100644 --- a/lib/table/rte_table_hash_key16.c +++ b/lib/table/rte_table_hash_key16.c @@ -11,6 +11,9 @@ #include "rte_table_hash.h" #include "rte_lru.h" +RTE_LOG_REGISTER_SUFFIX(table_hash16_logtype, hash16, INFO); +#define RTE_LOGTYPE_TABLE table_hash16_logtype + #define KEY_SIZE 16 #define KEYS_PER_BUCKET 4 diff --git a/lib/table/rte_table_hash_key32.c b/lib/table/rte_table_hash_key32.c index 88d8f69c72ed..1abc459eee87 100644 --- a/lib/table/rte_table_hash_key32.c +++ b/lib/table/rte_table_hash_key32.c @@ -11,7 +11,10 @@ #include "rte_table_hash.h" #include "rte_lru.h" -#define KEY_SIZE 32 +RTE_LOG_REGISTER_SUFFIX(table_hash32_logtype, hash32, INFO); +#define RTE_LOGTYPE_TABLE table_hash32_logtype + +#define KEY_SIZE 32 #define KEYS_PER_BUCKET 4 diff --git a/lib/table/rte_table_hash_key8.c b/lib/table/rte_table_hash_key8.c index 035d24276946..d4ccccbcdf9e 100644 --- a/lib/table/rte_table_hash_key8.c +++ b/lib/table/rte_table_hash_key8.c @@ -11,7 +11,10 @@ #include "rte_table_hash.h" #include "rte_lru.h" -#define KEY_SIZE 8 +RTE_LOG_REGISTER_SUFFIX(table_hash8_logtype, hash8, INFO); +#define RTE_LOGTYPE_TABLE table_hash8_logtype + +#define KEY_SIZE 8 #define KEYS_PER_BUCKET 4 diff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c index c31acc11cf23..d0d2c8ba44df 100644 --- a/lib/table/rte_table_hash_lru.c +++ b/lib/table/rte_table_hash_lru.c @@ -14,6 +14,9 @@ #define KEYS_PER_BUCKET 4 +RTE_LOG_REGISTER_SUFFIX(table_hash_lru_logtype, hash_lru, INFO); +#define RTE_LOGTYPE_TABLE table_hash_lru_logtype + #ifdef RTE_TABLE_STATS_COLLECT #define RTE_TABLE_HASH_LRU_STATS_PKTS_IN_ADD(table, val) \ diff --git a/lib/table/rte_table_lpm.c b/lib/table/rte_table_lpm.c index 9de9e8a20d77..4a5c4a343c77 100644 --- a/lib/table/rte_table_lpm.c +++ b/lib/table/rte_table_lpm.c @@ -13,6 +13,9 @@ #include "rte_table_lpm.h" +RTE_LOG_REGISTER_SUFFIX(table_lpm_logtype, lpm, INFO); +#define RTE_LOGTYPE_TABLE table_lpm_logtype + #ifndef RTE_TABLE_LPM_MAX_NEXT_HOPS #define RTE_TABLE_LPM_MAX_NEXT_HOPS 65536 #endif diff --git a/lib/table/rte_table_lpm_ipv6.c b/lib/table/rte_table_lpm_ipv6.c index 8fde2c012f7c..236eac4238d9 100644 --- a/lib/table/rte_table_lpm_ipv6.c +++ b/lib/table/rte_table_lpm_ipv6.c @@ -12,6 +12,9 @@ #include "rte_table_lpm_ipv6.h" +RTE_LOG_REGISTER_SUFFIX(table_lpm6_logtype, lpm6, INFO); +#define RTE_LOGTYPE_TABLE table_lpm6_logtype + #define RTE_TABLE_LPM_MAX_NEXT_HOPS 256 #ifdef RTE_TABLE_STATS_COLLECT diff --git a/lib/table/rte_table_stub.c b/lib/table/rte_table_stub.c index 23d0de5c79b0..e74044032f7d 100644 --- a/lib/table/rte_table_stub.c +++ b/lib/table/rte_table_stub.c @@ -8,6 +8,9 @@ #include "rte_table_stub.h" +RTE_LOG_REGISTER_SUFFIX(table_stub_logtype, stub, INFO); +#define RTE_LOGTYPE_TABLE table_stub_logtype + #ifdef RTE_TABLE_STATS_COLLECT #define RTE_TABLE_LPM_STATS_PKTS_IN_ADD(table, val) \ -- 2.39.1