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 741BB41C8C; Mon, 13 Feb 2023 21:00:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30A7042D6D; Mon, 13 Feb 2023 20:59:45 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 6E0A242D44 for ; Mon, 13 Feb 2023 20:59:39 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id v23so14711517plo.1 for ; Mon, 13 Feb 2023 11:59:39 -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=W35+k0/nxGmPH0dP92jKXi26qn3G0Y4hBcnCM7qeAAg=; b=zTdKaacnMigCEy2Ml723sI2T/6jza49S1yFkZTuRfLCL8yxnGFJ4UqrUljrg2MpTep +BFn0ITf743jZC+Fs3t0ZsaTwo0XAEhvKKBjxUuIqChMywmlaPcH03EP3ah88MJjHrbb TdL6OPqXQOMECcY5sRzPWohl9gR7o+aVnvr+hEJVKWtFqBPhXhdAjrdT9IeteHY9/ZRc CSCVqaFyEJRicOE2if8tel+uoBnoXmerzBk2ImSStui3bfh7ZtVgMR5TLVsJQAr2a40E 56ur+abRipDbWOZlM+inKR7c0t5mgLxnhvx5dnoPK0TL9KeullGRBrzgJ3s+6e4k7AZE Yt7w== 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=W35+k0/nxGmPH0dP92jKXi26qn3G0Y4hBcnCM7qeAAg=; b=pic8P0AcqQrGcD5mGoyliQVvK4Leuv8qqXUybnyT2bRRvqHTyCT3izByEs+E2Y68ac 1cRauR7aodlrU44k1M6ZKP86g2AF6aVV22Hbffa1YPejlRFMMd/+1cOHbnxezLEbiauk fDfD3HZQcIq+qrGpZAoFvEnBdyKVlaAFC4ByVHCFk84sCg0QND9w44CMOivoR6XUBeTo do8+n6qxbR1s6EK0UoWpFOCW0/YtexpZkU/CBgOOYero0xomb/ZStpFSJCdXNky8h5kk XJIy4MIGYLhRNR8EzxHbl/CNy49YFN1u3kTWwQwPrTq9hOkyuZmmsXjvd0YfZxp4UFiR 3aFg== X-Gm-Message-State: AO0yUKVUUsLlvd89e7ukOaGAKHD5GmReHeYc7GfFbE1rIbYKB9/EXMSQ 6ZpWMuHgTJvw80eFeYX4WMRRdxSDVd/iHLh5H08= X-Google-Smtp-Source: AK7set/gXDpOR4D1EIkyNLBaq3E4leBzKYRoDrRDV2wJ0tEt23WopwUMNRu2ypUYDbDXc71sou8SlQ== X-Received: by 2002:a17:902:ea0e:b0:196:8db5:fd67 with SMTP id s14-20020a170902ea0e00b001968db5fd67mr161457plg.2.1676318378359; Mon, 13 Feb 2023 11:59:38 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n20-20020a170902d0d400b001994e74c094sm8578911pln.275.2023.02.13.11.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 11:59:37 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Honnappa Nagarahalli , Konstantin Ananyev Subject: [PATCH v4 08/19] ring: replace RTE_LOGTYPE_RING with dynamic type Date: Mon, 13 Feb 2023 11:55:40 -0800 Message-Id: <20230213195551.1146298-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213195551.1146298-1-stephen@networkplumber.org> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230213195551.1146298-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 The logtype for ring only used in library. Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_log.c | 1 - lib/eal/include/rte_log.h | 2 +- lib/ring/rte_ring.c | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c index 39e1e6680dea..5f15e312f15b 100644 --- a/lib/eal/common/eal_common_log.c +++ b/lib/eal/common/eal_common_log.c @@ -349,7 +349,6 @@ struct logtype { static const struct logtype logtype_strings[] = { {RTE_LOGTYPE_EAL, "lib.eal"}, - {RTE_LOGTYPE_RING, "lib.ring"}, {RTE_LOGTYPE_MEMPOOL, "lib.mempool"}, {RTE_LOGTYPE_PMD, "pmd"}, {RTE_LOGTYPE_HASH, "lib.hash"}, diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h index 7d4345acceca..31a2ee2f6b6f 100644 --- a/lib/eal/include/rte_log.h +++ b/lib/eal/include/rte_log.h @@ -28,7 +28,7 @@ extern "C" { /* SDK log type */ #define RTE_LOGTYPE_EAL 0 /**< Log related to eal. */ /* was RTE_LOGTYPE_MALLOC */ -#define RTE_LOGTYPE_RING 2 /**< Log related to ring. */ + /* was RTE_LOGTYPE_RING */ #define RTE_LOGTYPE_MEMPOOL 3 /**< Log related to mempool. */ /* was RTE_LOGTYPE_TIMER */ #define RTE_LOGTYPE_PMD 5 /**< Log related to poll mode driver. */ diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c index cddaf6b2876f..8c5f2575d6ef 100644 --- a/lib/ring/rte_ring.c +++ b/lib/ring/rte_ring.c @@ -26,6 +26,9 @@ #include "rte_ring.h" #include "rte_ring_elem.h" +RTE_LOG_REGISTER_DEFAULT(ring_logtype, INFO); +#define RTE_LOGTYPE_RING ring_logtype + TAILQ_HEAD(rte_ring_list, rte_tailq_entry); static struct rte_tailq_elem rte_ring_tailq = { -- 2.39.1