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 1D04641D32; Tue, 21 Feb 2023 20:02:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35D0842D4A; Tue, 21 Feb 2023 20:02:25 +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 A634A40691 for ; Tue, 21 Feb 2023 20:02:20 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id s5so6076398plg.0 for ; Tue, 21 Feb 2023 11:02:20 -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=F0D+hj5Bg0vmf4yNAzBM9EKiuqa4HmHrh/mXAEir/+o=; b=gkp8jJiEZzZpVqxB/FZ44NudMBQb7NX1UxBg0mL1uprnAMLUe4Zb1gfNbwVqiHAmiM 3MmKVtbZYxnDKplBeYxjTMPNgPtflfXCL+l6Aid9NcLaI2ZG557pR0fe3wi/5cZH+Huv 9eR69Hu4iesz+Klis9e2QF4bVpez1eE9/F3rgsRYDvhI+NmNz2bzedBBg4EQyaf1OYXr xA9ozNYdv9iLkG9HkEiY8P0r0vEpTrZcRgCMRsF4Lp8Zs6Qbt7a6dtWmETbnzIHq6uyY fgx7NgcTO3Ne3EjumVw+HfDfFEKJnVGeZJVM61wEde13PiblxOj+xlrZebIKLXxsFMCC SHsQ== 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=F0D+hj5Bg0vmf4yNAzBM9EKiuqa4HmHrh/mXAEir/+o=; b=p2E+++2wjl9JadS6VvcwrQ/3x+KjKHKrIzsii4oRP3P9Lu9ySPfo+NASeF9jxM15dx bvWbet3asmHUc5cpUR8bp86rDoJRVFopSrKj/1No+6l+nNFoeEX0vynUds1N+9qqZMpQ 8ENYZrLSHUNMATGksiay7LlmaJleXcM6EAhoM4kxddBs7a1ElFkil3TLMLfl17EqbzXD bja3gMphCwD2Viu5fhTPQtWutXfkqwIqt4DBV0dejdD74EctH0vKTsukj8lbQjCpRZJD 2LC+ooDVPUgD306WPpwS0mPK1+YsCGdjGe7MYE+lbR4XRnSdRoe58vazlmAuywDslR9C +Neg== X-Gm-Message-State: AO0yUKWzw82GOJ+yvNF/3rmlQ2NE9PzlB2y7lC9jlqKE1Ek2bN2VF0dP 1htzLo8XrfysukxXd1z+y6wRcMOKSgJlUhtbCsc= X-Google-Smtp-Source: AK7set81pTYMQh0/2J9yx3uRiQ/w1RCT9GBzt0hKSolkxG2amZdBHjIm2J36gQh1/9qunTv975rOFA== X-Received: by 2002:a17:902:d482:b0:19c:356f:e98f with SMTP id c2-20020a170902d48200b0019c356fe98fmr7633428plg.60.1677006139599; Tue, 21 Feb 2023 11:02:19 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jc4-20020a17090325c400b001991e59fde6sm10213018plb.216.2023.02.21.11.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 11:02:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Byron Marohn , Yipeng Wang Subject: [PATCH v9 04/22] efd: replace RTE_LOGTYPE_EFD with dynamic type Date: Tue, 21 Feb 2023 11:01:50 -0800 Message-Id: <20230221190208.514276-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221190208.514276-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230221190208.514276-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 Replace all uses of the global logtype with a dynamic log type. Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/rte_log.h | 2 +- lib/efd/rte_efd.c | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 5421da008f5b..25bb17938cc1 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -365,7 +365,6 @@ static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_PIPELINE, "lib.pipeline"}, {RTE_LOGTYPE_MBUF, "lib.mbuf"}, {RTE_LOGTYPE_CRYPTODEV, "lib.cryptodev"}, - {RTE_LOGTYPE_EFD, "lib.efd"}, {RTE_LOGTYPE_EVENTDEV, "lib.eventdev"}, {RTE_LOGTYPE_USER1, "user1"}, {RTE_LOGTYPE_USER2, "user2"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index 16d6ea31583d..0b39795b4d06 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -44,7 +44,7 @@ extern "C" { #define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */ #define RTE_LOGTYPE_MBUF 16 /**< Log related to mbuf. */ #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */ -#define RTE_LOGTYPE_EFD 18 /**< Log related to EFD. */ + /* was RTE_LOGTYPE_EFD */ #define RTE_LOGTYPE_EVENTDEV 19 /**< Log related to eventdev. */ /* was RTE_LOGTYPE_GSO */ diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c index 686a13775742..9edb11799c89 100644 --- a/lib/efd/rte_efd.c +++ b/lib/efd/rte_efd.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -28,6 +29,9 @@ #include "rte_efd_arm64.h" #endif +RTE_LOG_REGISTER_DEFAULT(efd_logtype, INFO); +#define RTE_LOGTYPE_EFD efd_logtype + #define EFD_KEY(key_idx, table) (table->keys + ((key_idx) * table->key_len)) /** Hash function used to determine chunk_id and bin_id for a group */ #define EFD_HASH(key, table) \ -- 2.39.1