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 540DE41CA8; Wed, 15 Feb 2023 18:25:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B71D342DB3; Wed, 15 Feb 2023 18:24:18 +0100 (CET) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id D35A242D41 for ; Wed, 15 Feb 2023 18:24:05 +0100 (CET) Received: by mail-pg1-f178.google.com with SMTP id a23so13037712pga.13 for ; Wed, 15 Feb 2023 09:24: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=f20kc70ggXNLFwe8FuRqrf+/I0t4mEzpcfAc1w5Mhta8MPh31lTnugowEXW4a3bYnn vJhJ4crBkv5ZoXxCKcoAmYt4QsC9G3r8egpO9bPqeS8utsj5IeFYCAZkULOVys9oED6F AT+hjrx3EBeuZL+bKXx48ODEaY/sXbokFGI6tNQymL2idD98b+cYcsxCaRq/nhng1a/z yzdBni/+blOhNzQAdBOUlrr1802h4u7jI3YqaCiV/yhVHNAuAAEmBIsq3Vf6qTOBMI6q KGvgqFWg1Aj30nFho1wRdqzgmBgM4mFKOCzKQmr3IXild7ZAqGQbio9LTVnWUkDBZlyG P0IQ== 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=4Xnow12cho/S7InDkshhLMRF2CCkoNJpvW0vp33O6XoFi3JRknyFOO2xhsf6+XsYdS AcgFOfKt1y7rrHDlIgGVXSnBVsqKvwHcfP6+J3RsnVGZh8DW3zdDDMiPi2FcwMg9/5tV Yk7zoDt1pc0QKzWRNosFtP2nd1YlPeieZWTGVrQPElvb6BGbWfy6Dyk0frROZpUqbKoO p4rUfAm+D58CVZXyBrI7nO93GrAaAL+97ipVU5pGAhWwicaKLGbH+YAxGD1b7lFV7EcN exAWOSyzAk3Zd5muDJmBhvve3iXipSFUejrUkMjwq8trX+bGao/yki9S3as6+UCLeWiH HCHg== X-Gm-Message-State: AO0yUKUHvGypTLUOjcZp57sVJNuu66wqvVJ5KAbWsZToZhZHQLygLEDY /wm5xIrpJMGeeMtkGfyvvEn092D3S5/5wO82av9S1Q== X-Google-Smtp-Source: AK7set+4wngyFfNm3yLmOlGrByQqPYY9zI0IQLN7Mbr4rYCS3VBc0ecsa3iysxPM970HT9qP3e28PQ== X-Received: by 2002:a05:6a00:24ca:b0:5a8:cc39:fc58 with SMTP id d10-20020a056a0024ca00b005a8cc39fc58mr212531pfv.6.1676481844794; Wed, 15 Feb 2023 09:24:04 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id m7-20020aa79007000000b005a8da960fa8sm3705304pfo.144.2023.02.15.09.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 09:24:04 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v7 16/22] port: replace RTE_LOGTYPE_PORT with dynamic type Date: Wed, 15 Feb 2023 09:23:35 -0800 Message-Id: <20230215172341.1525320-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215172341.1525320-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230215172341.1525320-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