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 1E26341D43; Wed, 22 Feb 2023 22:57:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3900A43181; Wed, 22 Feb 2023 22:56:28 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 4D38F431B0 for ; Wed, 22 Feb 2023 22:56:05 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id z10so4917331pgr.8 for ; Wed, 22 Feb 2023 13:56:05 -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=XyBK7Y4Qa7SsWybX079Rpa71uKduJ/PSYw3ilBvphh0=; b=bBtoxibHog8ePOe4RqXtSByixibsRqUhiLD+ZeNvzfwK9YuNCPqAeEjNyjLttdb2He B7C2QxcQ+5KYNrJN4ZLm1Aiwm0mLra3QdBWsy29dJX0amYKVKL3aUDQLVJJ+tOUUVu2z 8T2Xl23Xe32LVNMFN7kLmiHgOpBZn7IOPQH3Je0/s7WBJYETF+wmg+X9HpURD+6gRtbV WqZA9FNFgM09//4b/WOqmKE1kZI/dcPwxmBxtnPMZ4EvtNvQFdy0zSm8QZ3vf1cb9W2S wUnSj4dS866kI/n/Hdak5Sz2qn2N4OgD1GbE0fCYQ7ODDcHmwlYkxXmftfTDXonCzOxx SiZw== 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=XyBK7Y4Qa7SsWybX079Rpa71uKduJ/PSYw3ilBvphh0=; b=5DOqc0itIO0YPuFc5TxKAcb6rrB/kUmLGLgQqG2piusj4jn7nam5x6SCVfkNhnuKwq w1erPd8aF1J0WOUnTicNaHN/GxSbb0Ue8cfloAmB95/04NC6f7HqPUgDvnygcDLps94M tmXZQFglKhTa6qezpytBWWUTpxUyN9zFY6DMbDLteTZ4QUAXNdBHBdK5nuVs7VXw6B0P /uE6I8kC4BsC2rRjzJyfOOoGBcCwGab1RVnVyx5BHqz25TZ4INmEULAQdD2uD9u68Jvl q69r9Lze8nLPfYD9+p+W3wYV1IDmEXZdgUCsKlZPz/OPPjHBRxIlgEog1luuWnMXpd9B h7KQ== X-Gm-Message-State: AO0yUKXccKKK7px1F9LBE/IrQxzwDEuZKweqGYn8quTkwxcH1FQXoW3r uqL7Kq7Nbut/a6aD1Gu37QuQR5tK3oETpPpftOI= X-Google-Smtp-Source: AK7set9z75Wa3xRjUM5za8keY91JYOp09mT+KHinPsKUcuQjglsZK8Sw6H0icdjJoYa3FHdLjBrOXg== X-Received: by 2002:aa7:9d88:0:b0:5db:60b2:6423 with SMTP id f8-20020aa79d88000000b005db60b26423mr532339pfq.29.1677102964601; Wed, 22 Feb 2023 13:56:04 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id d7-20020aa78147000000b00571cdbd0771sm6400722pfn.102.2023.02.22.13.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:56:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v11 16/22] port: replace RTE_LOGTYPE_PORT with dynamic type Date: Wed, 22 Feb 2023 13:55:35 -0800 Message-Id: <20230222215541.158205-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230222215541.158205-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230222215541.158205-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 Split up the single static RTE_LOGTYPE_PORT into separate sub types for each component: port.ethdev, port.evendev, ... Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/rte_log.h | 2 +- lib/port/rte_port_ethdev.c | 3 +++ lib/port/rte_port_eventdev.c | 4 ++++ lib/port/rte_port_fd.c | 3 +++ lib/port/rte_port_frag.c | 3 +++ lib/port/rte_port_kni.c | 3 +++ lib/port/rte_port_ras.c | 3 +++ lib/port/rte_port_ring.c | 3 +++ lib/port/rte_port_sched.c | 3 +++ lib/port/rte_port_source_sink.c | 3 +++ lib/port/rte_port_sym_crypto.c | 3 +++ 12 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index d4b7088b5cbb..7f1d2c8a256d 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_PORT, "lib.port"}, {RTE_LOGTYPE_TABLE, "lib.table"}, {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, {RTE_LOGTYPE_CRYPTODEV, "lib.cryptodev"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index f185fcbc5a94..b11aec69af78 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -39,7 +39,7 @@ extern "C" { /* was RTE_LOGTYPE_POWER */ /* was RTE_LOGTYPE_METER */ /* was RTE_LOGTYPE_SCHED */ -#define RTE_LOGTYPE_PORT 13 /**< Log related to port. */ + /* was RTE_LOGTYPE_PORT */ #define RTE_LOGTYPE_TABLE 14 /**< Log related to table. */ #define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ /* was RTE_LOGTYPE_MBUF */ diff --git a/lib/port/rte_port_ethdev.c b/lib/port/rte_port_ethdev.c index 0da7890261e9..6685d304a6e9 100644 --- a/lib/port/rte_port_ethdev.c +++ b/lib/port/rte_port_ethdev.c @@ -10,6 +10,9 @@ #include "rte_port_ethdev.h" +RTE_LOG_REGISTER_SUFFIX(port_ethdev_logtype, ethdev, INFO); +#define RTE_LOGTYPE_PORT port_ethdev_logtype + /* * Port ETHDEV Reader */ diff --git a/lib/port/rte_port_eventdev.c b/lib/port/rte_port_eventdev.c index fd7dac9a5661..04447bd7f7bc 100644 --- a/lib/port/rte_port_eventdev.c +++ b/lib/port/rte_port_eventdev.c @@ -5,11 +5,15 @@ #include #include +#include #include #include #include "rte_port_eventdev.h" +RTE_LOG_REGISTER_SUFFIX(port_eventdev_logtype, eventdev, INFO); +#define RTE_LOGTYPE_PORT port_eventdev_logtype + /* * Port EVENTDEV Reader */ diff --git a/lib/port/rte_port_fd.c b/lib/port/rte_port_fd.c index 932ecd324e05..b2412e7706ee 100644 --- a/lib/port/rte_port_fd.c +++ b/lib/port/rte_port_fd.c @@ -10,6 +10,9 @@ #include "rte_port_fd.h" +RTE_LOG_REGISTER_SUFFIX(port_fd_logtype, fd, INFO); +#define RTE_LOGTYPE_PORT port_fd_logtype + /* * Port FD Reader */ diff --git a/lib/port/rte_port_frag.c b/lib/port/rte_port_frag.c index e1f1892176c4..9adcbba47da1 100644 --- a/lib/port/rte_port_frag.c +++ b/lib/port/rte_port_frag.c @@ -7,6 +7,9 @@ #include "rte_port_frag.h" +RTE_LOG_REGISTER_SUFFIX(port_frag_logtype, frag, INFO); +#define RTE_LOGTYPE_PORT port_frag_logtype + /* Max number of fragments per packet allowed */ #define RTE_PORT_FRAG_MAX_FRAGS_PER_PACKET 0x80 diff --git a/lib/port/rte_port_kni.c b/lib/port/rte_port_kni.c index 1c7a6cb200ea..d4ac08b4cff0 100644 --- a/lib/port/rte_port_kni.c +++ b/lib/port/rte_port_kni.c @@ -9,6 +9,9 @@ #include "rte_port_kni.h" +RTE_LOG_REGISTER_SUFFIX(port_kni_logtype, kni, INFO); +#define RTE_LOGTYPE_PORT port_kni_logtype + /* * Port KNI Reader */ diff --git a/lib/port/rte_port_ras.c b/lib/port/rte_port_ras.c index e5de57da42ea..5a610b1ba5b5 100644 --- a/lib/port/rte_port_ras.c +++ b/lib/port/rte_port_ras.c @@ -9,6 +9,9 @@ #include "rte_port_ras.h" +RTE_LOG_REGISTER_SUFFIX(port_ras_logtype, ras, INFO); +#define RTE_LOGTYPE_PORT port_ras_logtype + #ifndef RTE_PORT_RAS_N_BUCKETS #define RTE_PORT_RAS_N_BUCKETS 4094 #endif diff --git a/lib/port/rte_port_ring.c b/lib/port/rte_port_ring.c index 52b2d8e557f0..32a90e836579 100644 --- a/lib/port/rte_port_ring.c +++ b/lib/port/rte_port_ring.c @@ -10,6 +10,9 @@ #include "rte_port_ring.h" +RTE_LOG_REGISTER_SUFFIX(port_ring_logtype, ring, INFO); +#define RTE_LOGTYPE_PORT port_ring_logtype + /* * Port RING Reader */ diff --git a/lib/port/rte_port_sched.c b/lib/port/rte_port_sched.c index 8a7d815ef323..6e0a8aba5419 100644 --- a/lib/port/rte_port_sched.c +++ b/lib/port/rte_port_sched.c @@ -7,6 +7,9 @@ #include "rte_port_sched.h" +RTE_LOG_REGISTER_SUFFIX(port_sched_logtype, sched, INFO); +#define RTE_LOGTYPE_PORT port_sched_logtype + /* * Reader */ diff --git a/lib/port/rte_port_source_sink.c b/lib/port/rte_port_source_sink.c index 7d73adc1e79e..e9cdadbceb8f 100644 --- a/lib/port/rte_port_source_sink.c +++ b/lib/port/rte_port_source_sink.c @@ -15,6 +15,9 @@ #include "rte_port_source_sink.h" +RTE_LOG_REGISTER_SUFFIX(port_source_logtype, source, INFO); +#define RTE_LOGTYPE_PORT port_source_logtype + /* * Port SOURCE */ diff --git a/lib/port/rte_port_sym_crypto.c b/lib/port/rte_port_sym_crypto.c index 295984d025cb..77a2f04d65f6 100644 --- a/lib/port/rte_port_sym_crypto.c +++ b/lib/port/rte_port_sym_crypto.c @@ -8,6 +8,9 @@ #include "rte_port_sym_crypto.h" +RTE_LOG_REGISTER_SUFFIX(port_crypto_logtype, crypto, INFO); +#define RTE_LOGTYPE_PORT port_crypto_logtype + /* * Port Crypto Reader */ -- 2.39.1