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 8029D41C99; Tue, 14 Feb 2023 23:49:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 456B543008; Tue, 14 Feb 2023 23:48:18 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 0572943013 for ; Tue, 14 Feb 2023 23:48:07 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id z14-20020a17090abd8e00b00233bb9d6bdcso220190pjr.4 for ; Tue, 14 Feb 2023 14:48:06 -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=nTDFgTHwRHpsw3e12DxcrmGFKDmMV5Zat9oFlTzZS6Fm/80IhovU7QQOg7NuD0fMPX I02dkCamc8MgIcdeTPOdyeqow1kBPz/IJajDGuZo3hGnl3RPSW1T7XCcpCoHRQ6dkYnL Nbf/oJf94Pz0A0f5ER+NLBPk+xiD4RGjkpt+m3IJ1PCkCuO+MRvd+FwQ6Bdy6qlBwzy1 8gKHWxI4Es/1igTAMES+eajFcxtNF14ee4+F1t+Vr4wxshNUwCT2LTP/ia/zDd+OFH0j pcIqRL7T0n2V/Ki39wDqQhtUXCAYsYb3TJgIhNi61xSyQXjuTjEm55Qeo8I2r4jFFV8n 6x8Q== 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=ZsyJ2tgBrvTW+BoFCi0AnWpT7l5bM24PHfylNj58JHIy6xksP/8Q4niOsYSFo553ba GKgLeHaMCFC/1Beav1C92Kdr1/DQN4N9rX+t4f34S8rmPKdBLxaaYwKgUk5W83je7q8d YTJ7Z5MEqEIKRVGfLWoG02QdUPRHcukHntzluPrMROWhoXr/Bv3+JGRMCy2gUkprS6rF QpWdVifj444Tk0zg4Wd0jcrahfc9ubZWqvJBF4xafMBMSua0p4g+NxNQ/qn8FfoeRL0b c4ZuRtmSTwlm7C+A+I9WPEOh6im+6i8IEBiTNVvGSGnOzVHTIf6ANNrtsBrq75obo0hL 7g2A== X-Gm-Message-State: AO0yUKXdDWb+pXOXd1WzaFOC1ashw9Y+isbmxRhjrrTMyGd4tXgMGhuv 2SDT6cTNO90nmBABwpLvQTz1R2q1GffWcJJ4mxY= X-Google-Smtp-Source: AK7set/ndv91rmr7mYba/JIASoxlsYVTnUENWqWFmV7iUusH4h26X0K+QWLqrkgOqAkt/ZAnorBSew== X-Received: by 2002:a17:902:fa0c:b0:199:11c3:cc4f with SMTP id la12-20020a170902fa0c00b0019911c3cc4fmr281583plb.44.1676414886237; Tue, 14 Feb 2023 14:48:06 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u9-20020a17090341c900b0019607984a5esm10735785ple.95.2023.02.14.14.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 14:48:05 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v6 17/22] table: convert RTE_LOGTYPE_TABLE to dynamic logtype Date: Tue, 14 Feb 2023 14:47:30 -0800 Message-Id: <20230214224735.1404326-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214224735.1404326-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230214224735.1404326-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