From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3894AA00BE; Fri, 12 Jun 2020 23:27:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8F0361BF98; Fri, 12 Jun 2020 23:26:29 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id EE6081BF87 for ; Fri, 12 Jun 2020 23:26:24 +0200 (CEST) IronPort-SDR: Zh12kHbCPJn2O0LAWWeBlxsqE3vafdbnaU7KaqSU4dpu1ogxprgPrrsF0yeAfpEIlDLxKI87vf zaCEM7X6eUbg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 14:26:23 -0700 IronPort-SDR: KR9ruiN67T+hG16bnerac2Osr5fgSiJtZ2jNWN97VlGnmmFtU9lQRqpSA3KFmVwgUmog5Lf/m3 WEdtfyAYNcRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,504,1583222400"; d="scan'208";a="272035798" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by orsmga003.jf.intel.com with ESMTP; 12 Jun 2020 14:26:22 -0700 From: "McDaniel, Timothy" To: jerinj@marvell.com Cc: dev@dpdk.org, gage.eads@intel.com, harry.van.haaren@intel.com Date: Fri, 12 Jun 2020 16:24:13 -0500 Message-Id: <20200612212434.6852-7-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200612212434.6852-1-timothy.mcdaniel@intel.com> References: <20200612212434.6852-1-timothy.mcdaniel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 06/27] event/dlb: add dynamic logging X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Change-Id: I7698d9b8eea2e681ea6ff237d1f93b0ece7f4704 Signed-off-by: McDaniel, Timothy --- drivers/event/dlb/dlb_log.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 drivers/event/dlb/dlb_log.h diff --git a/drivers/event/dlb/dlb_log.h b/drivers/event/dlb/dlb_log.h new file mode 100644 index 000000000..b8f4ba5cf --- /dev/null +++ b/drivers/event/dlb/dlb_log.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2020 Intel Corporation + */ + +#ifndef _DLB_EVDEV_LOG_H_ +#define _DLB_EVDEV_LOG_H_ + +extern int eventdev_dlb_log_level; + +/* Dynamic logging */ +#define DLB_LOG_IMPL(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, eventdev_dlb_log_level, "%s" fmt "\n", \ + __func__, ##args) + +#define DLB_LOG_INFO(fmt, args...) \ + DLB_LOG_IMPL(INFO, fmt, ## args) + +#define DLB_LOG_DBG(fmt, args...) \ + DLB_LOG_IMPL(DEBUG, fmt, ## args) + +#define DLB_LOG_ERR(fmt, args...) \ + DLB_LOG_IMPL(ERR, fmt, ## args) + +#endif /* _DLB_EVDEV_LOG_H_ */ -- 2.13.6