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 F367441CEE; Mon, 20 Feb 2023 19:50:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6952B430C7; Mon, 20 Feb 2023 19:50:10 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 0686F430CE for ; Mon, 20 Feb 2023 19:50:07 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id q5so2527295plh.9 for ; Mon, 20 Feb 2023 10:50:06 -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=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=POQh+xWuqpUXbMcPrJ/1iAbi7UhfAQsjm018q36mDC8mL/c4xJ5dX8eqdalV7/1jyg HbbvwAR/34HBRtb/ik6ZwjW26lc7FyKsqyOsekcb/+X5J+lZWwVrOwg1PdE85iOF+zUM SvrdF7dUBCCn2uMZKW2oE2rmoSm/v+S54tVHvhObEEC7Q8bKZzw0tNfSeGuFy1cWICzs q7/VQYgbCjRr57fF3O94qeBHAFYxrEubWvBL/1+Xv0AOtfH1ZUm5IzzN3c4AZERUil/R VgJxJpcc/bIs8jog/m8k1efhFT0DA6RxSl9OSW8WCcDADPX3i9t9CSJuoScfNYpXl9B2 UVaA== 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=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=f4Zi+p5ElJGT/MZusYpoNuLPOBkJT3dLMvBkjxpf9ZhCCaUmlGaor28XbqmL3PTxQM VyAjZ8dZFB2RpcnKToA78eWVfwEX2ZEFtn/DcCzdW0URk56fnGTo9yGjh/H5JJQJmFqH ShWMYZEvJtij6VOwvl4QRrfwpCYswMFVXClfiy7oIa3ejMm613UsGXaBljgklWzl0o7q GuhdwTDLEAwRk9R07+2dNsfOVAh4xrxaXywrzrv6lJxuqR2gjjghtFqKxHgvq2qqCYPi uA2PNedNiS2iXzlONDpwYu3u0QYAzmDl+P+wdGimMsW0rmXCqHEacHwJlFSfff3P67cu hZvw== X-Gm-Message-State: AO0yUKVHY9pv3K67quA8lx8husNZNcwaKawyCpAArZClgTMVnNKegTP4 bVkJk55v94NWU5BiVZfSfXf9mMW7JKZFKO2fQLg= X-Google-Smtp-Source: AK7set/oAs6GSaL3qiqE9Z+7YYtsSiPZoRU91O+9+anBf9Ov4NgpUyzjFhPcVpDAztbgBdcqg5me0A== X-Received: by 2002:a17:902:ea11:b0:19a:b6b1:ca82 with SMTP id s17-20020a170902ea1100b0019ab6b1ca82mr2914322plg.10.1676919005853; Mon, 20 Feb 2023 10:50:05 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id n21-20020a170902969500b0019607547f29sm2020798plp.304.2023.02.20.10.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:50:05 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , reshma.pattan@intel.com Subject: [PATCH v6 3/5] latencystats: use dynamic logtype Date: Mon, 20 Feb 2023 10:49:59 -0800 Message-Id: <20230220185001.50714-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220185001.50714-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230220185001.50714-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 Libraries should not reuse RTE_LOGTYPE_USER1 for their logging. Instead they should register their own type. Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats") Cc: reshma.pattan@intel.com Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 8985a377db4e..f3c1746cca00 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -26,7 +26,8 @@ latencystat_cycles_per_ns(void) } /* Macros for printing using RTE_LOG */ -#define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_DEFAULT(latencystat_logtype, INFO); +#define RTE_LOGTYPE_LATENCY_STATS latencystat_logtype static uint64_t timestamp_dynflag; static int timestamp_dynfield_offset = -1; -- 2.39.1