From patchwork Thu Jul 30 19:49:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy McDaniel X-Patchwork-Id: 75056 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40F87A052B; Thu, 30 Jul 2020 21:53:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C049F1C0B0; Thu, 30 Jul 2020 21:53:14 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9C6DB1C044 for ; Thu, 30 Jul 2020 21:53:09 +0200 (CEST) IronPort-SDR: o2E/gbC9H1wuznMk4z3nbJs7eheAxHBUTk81UWIfmXpH82p48FjBJrGzdh8sMfk2pX3ulsnWun DioeOwNhy4Kg== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="139672295" X-IronPort-AV: E=Sophos;i="5.75,415,1589266800"; d="scan'208";a="139672295" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2020 12:53:08 -0700 IronPort-SDR: FkpCKxV5jRQKo8tbGr8LN1bYBeIibCjtlCHESLEfpwCrzoHlM4wVuNAr+86JYpS8C8+K7OB5sh WtsCzpJ5v3lA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,415,1589266800"; d="scan'208";a="465378086" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by orsmga005.jf.intel.com with ESMTP; 30 Jul 2020 12:53:07 -0700 From: "McDaniel, Timothy" To: jerinj@marvell.com Cc: mattias.ronnblom@ericsson.com, dev@dpdk.org, gage.eads@intel.com, harry.van.haaren@intel.com, "McDaniel, Timothy" Date: Thu, 30 Jul 2020 14:49:53 -0500 Message-Id: <1596138614-17409-7-git-send-email-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1596138614-17409-1-git-send-email-timothy.mcdaniel@intel.com> References: <1593232671-5690-0-git-send-email-timothy.mcdaniel@intel.com> <1596138614-17409-1-git-send-email-timothy.mcdaniel@intel.com> 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" From: "McDaniel, Timothy" Signed-off-by: McDaniel, Timothy --- drivers/event/dlb/dlb_log.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 0000000..c69c9e5 --- /dev/null +++ b/drivers/event/dlb/dlb_log.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2016-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_ERR(fmt, args...) \ + DLB_LOG_IMPL(ERR, fmt, ## args) + +/* remove debug logs at compile time unless actually debugging */ +#define DLB_LOG_DBG(fmt, args...) \ + RTE_LOG_DP(DEBUG, PMD, fmt, ## args) + +#endif /* _DLB_EVDEV_LOG_H_ */