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 98B3641CF1; Tue, 21 Feb 2023 00:37:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA2254316A; Tue, 21 Feb 2023 00:36:31 +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 8E40B4313B for ; Tue, 21 Feb 2023 00:36:13 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id x24so1478833pfn.7 for ; Mon, 20 Feb 2023 15:36:13 -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=H8LUagqawTuv042RYGn1LQU7nex2yhxOvow4eDhQkKYNoeewsMO63hnkrI7Sb82l2y QXeeu3qKgvpS2lfe3JUgEDdKKgygPI1/61TbVu+vtwqhVRSoaV0IQTSqv5A30vPkRhyl rE5UaHBB9vZoHy2vZfDne2JwRneCqnfEculf3UiZDQmEZwI+DYdS8gldH6aQbpZq3Z0N 5/1G53hrIxGw5gFFeC/a3AWdTf7WuGLQLs60QYdUBbCBz4igrmuZ053lOGgh1jWLFMoY ApAscyKxnyUwCM8WppQ42/iacUI9jI322rtxGlYwJi0nZg8QWM73NJAOO0J3hmdOUDIR fMCQ== 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=HTFljLdca3HkOoDX2nuLPI6h30218FPYORDxis2xHpNBdx+pW4ACa5BOVeBqD63bKe ndxs7XGKgFrGgiWFQK0LRltqhLVF/PvS4VjMIeFLu0rU9M4KpR8nWWjy3F5ESqNnf/xG omx0eD1tZPlGDSUctVUceUgXBasuVSkUUPFf/zXDk/csSPPtBtDpLIN+oMcjF5CO7YPm 9q+qonoHrFqkVx8F1XQaot8KuXUZeJMT+JBnR3YBvE737x0jQm554pfzJeBFizWzzV+C zh0DMHAn/rZIEjpXDwzpGBMEYJxQCsyrAQqeXXThyq47q4UG6M0KfHTVW7VwUUYFPJaj A26A== X-Gm-Message-State: AO0yUKWUQG5SuBQ1gQHKK16gMbz43tMhswPr2hPQfoDHROZ87p0DTxiz zr6Zwb0NsTeIm/nyN8HijDe2mAg8YP3anXdbVtU= X-Google-Smtp-Source: AK7set+eRs6C9fTKcruK8zBdzeFqO0e7nO6t4PkE7+0mmSONd+P7lIOn5gdURNWNCc6Fo16seJ95sw== X-Received: by 2002:a62:1bd6:0:b0:5a9:cebc:90ee with SMTP id b205-20020a621bd6000000b005a9cebc90eemr3218700pfb.15.1676936172768; Mon, 20 Feb 2023 15:36:12 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 15:36:12 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v8 16/22] port: replace RTE_LOGTYPE_PORT with dynamic type Date: Mon, 20 Feb 2023 15:35:50 -0800 Message-Id: <20230220233556.168553-17-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 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