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 0649841D32; Tue, 21 Feb 2023 20:03:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F7A942DBA; Tue, 21 Feb 2023 20:02:38 +0100 (CET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 60A7C42D3F for ; Tue, 21 Feb 2023 20:02:26 +0100 (CET) Received: by mail-pj1-f49.google.com with SMTP id nt5-20020a17090b248500b00237161e33f4so3860949pjb.4 for ; Tue, 21 Feb 2023 11:02:26 -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=QcHaKovP84y1nMm3RMUaXWjboNrtV5nnMMGJAwWuTvY1qOssXKq8yp29S6bCoMnc4B tQo2lWNVZ28I+Y8UuH3JL0hCAWpfHgOEsrABzUxwM9sEuVPUI08g/FWMwVVTrTCUDPhX opa6jpjRF0EkNEY7UAHLV394ZS0yET6JzFp9BIZpWYLGNnQmEb31eaxO9Vj9P0GhBrSb XwLiyDO2Gn8rgNotZsIx7EZUe6SUB6vFqqmc90EglVs3aFOsDg2q2WrGxXsTmRcfqm/7 kSidJEsPMFSICxvDc1KM24lxqcUn6mWlrfleSLVx5EH9X1gVyxqZ6EX7gyOC4Y+TsA+n +7ug== 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=MWkui+j8CwBZy5Cv0C5rFybLwtmrsPleWyHBkmnYf2zDcR7ykEdJLvk9kFEMBJ71TU NJYThDrc7UHTKsdhBjEroP3JgRgfXzITgbQmnk8H8glqPEUxGgifQRXKkmfNvHj1CN+R 5laETQ3jQn36ZN6dnYUM+6bKxElPVDfusB1mCqx6g0jBl8qk4GIfLOFYrwA4VSV2DUCp JyxOGqxyTyRqEzS+hv7m2DPzEArRlyO01teur2gb43zXgyHCm1zN84i8xoIMHAVTZCxY 3eCW+upLp7tUsD+btjpoS/X1lesmEcSbRMo4T5yNoFYZtH4P7OKoZh7YHptcApnwxd2A w+uw== X-Gm-Message-State: AO0yUKVEhUtfwyThE/4Tt0qBqKGtL90W42Ejth8vKeLG6bivpGuwKttQ g0NUi0kzSPhoB1/LKBOC+MYTbNCZkW60h6FtTfg= X-Google-Smtp-Source: AK7set9bXPbet79Oh0trlNrox9UYY+LZe8nr4V7WqXOwElWrA12W/LKVBZojLvB/3eniS244EGe+kg== X-Received: by 2002:a05:6a20:1441:b0:c7:4bf5:fa0a with SMTP id a1-20020a056a20144100b000c74bf5fa0amr5400743pzi.48.1677006145344; Tue, 21 Feb 2023 11:02:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 11:02:24 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Honnappa Nagarahalli , Konstantin Ananyev Subject: [PATCH v9 10/22] ring: replace RTE_LOGTYPE_RING with dynamic type Date: Tue, 21 Feb 2023 11:01:56 -0800 Message-Id: <20230221190208.514276-11-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 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