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 71B35A04B0; Sun, 18 Oct 2020 10:57:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D392C8DA; Sun, 18 Oct 2020 10:57:36 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 3CBE9BB00 for ; Sun, 18 Oct 2020 10:57:34 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id k25so9412711ioh.7 for ; Sun, 18 Oct 2020 01:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I0OpC/C33fE9iNlxt10sdS5MUT/DbQ+oJNr4nWYdFCs=; b=CfS3r85lnKUenTsNOS/T3L+vqxBVy+pPuEWAj4b3GWoqB7jerekYNCXJAJWlN4atzq AOj5h0iWso4oQzYGBgVZYFMD5yGFGgITLsNlAn0SAjSOVevfrW4GMCTSfJAPpH6121RS 78GX/mbjXCC5F5eP9xNP01FaGaPuYrEk/Owm+i3k2KgzF9Y8SmcvXsO4SES5Lxv78qly GY9hZLVScgZY+/DT76oOiZTEvSRrrtPcHoTpoYNLoH4gj5TGeV0CvQeDz74LolsaTnne CgcyuFt9CWfjPdo8asgwK+KoGgsEtgnN4YZV+/Cln0roFABvX9Y1hWc07qfkMdp6ljME 1qVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I0OpC/C33fE9iNlxt10sdS5MUT/DbQ+oJNr4nWYdFCs=; b=Ww0NGkdJIjqbgeH5JiyGWO3jvg0VW0HBV4AVqXCGpgLC2YZkbN/OeOB/qmeAdYF+QG 1QXAYLOHTpW6s5FbCtbTfRQXgRplYSVqg7ljCb3/Zh/K7Ywrp7fPJrtdAElOKjt6dcHd N+NYXvrU2wGE7/A5H7CthjKexpr85fETYnaN+wGWT29CQkM7t55F44DeLta13OOLGAid fOgnl58fwI7Ygz+t/t8/KiJQAcV/ALIuQUCGvgIt0bC+1oqn9vDkPB1YLQsfp7oWv1pI EhL/lI9dNzYBiyBVhf4AmiYExZGaDDpIumwpqafLoGoBFNacFgi5OShz39Y6gAcuuI94 06EQ== X-Gm-Message-State: AOAM530UQm8BDEHjdJd6IkDJXw5SX0Z7KJH2j8m+HmxPmsY78ld0gC+Z pnsM3UwmBgoDF6Op3eiilEgvblkCiSlTkhAirAc= X-Google-Smtp-Source: ABdhPJzGyjk9pb/is7aVwS2oshJqLfAWK/T74W8B1S0boD2Mlxy9XVVJInX/wKPmAiu8gltAlZoOJRor9+vycFsf4gk= X-Received: by 2002:a5d:9615:: with SMTP id w21mr7642410iol.59.1603011452560; Sun, 18 Oct 2020 01:57:32 -0700 (PDT) MIME-Version: 1.0 References: <1599855987-25976-2-git-send-email-timothy.mcdaniel@intel.com> <1602958879-8558-1-git-send-email-timothy.mcdaniel@intel.com> <1602958879-8558-3-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1602958879-8558-3-git-send-email-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Sun, 18 Oct 2020 14:27:16 +0530 Message-ID: To: Timothy McDaniel Cc: dpdk-dev , Erik Gabriel Carrillo , Gage Eads , "Van Haaren, Harry" , Jerin Jacob Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 02/22] event/dlb2: 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" On Sat, Oct 17, 2020 at 11:50 PM Timothy McDaniel wrote: > > This commit adds base support for dynamic logging. > The default log level is NOTICE. Dynamic logging > is used exclusively throughout this patchset. > > Signed-off-by: Timothy McDaniel > Reviewed-by: Gage Eads > --- > drivers/event/dlb2/dlb2_log.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 drivers/event/dlb2/dlb2_log.h > > diff --git a/drivers/event/dlb2/dlb2_log.h b/drivers/event/dlb2/dlb2_log.h > new file mode 100644 > index 0000000..dc1481e > --- /dev/null > +++ b/drivers/event/dlb2/dlb2_log.h > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2016-2020 Intel Corporation > + */ > + > +#ifndef _DLB2_EVDEV_LOG_H_ > +#define _DLB2_EVDEV_LOG_H_ > + > +extern int eventdev_dlb2_log_level; Move rte_log_register() calling part to this patch. Without registration this patch is incomplete. > +/* Dynamic logging */ > +#define DLB2_LOG_IMPL(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, eventdev_dlb2_log_level, "%s" fmt "\n", \ > + __func__, ##args) > + > +#define DLB2_LOG_INFO(fmt, args...) \ > + DLB2_LOG_IMPL(INFO, fmt, ## args) > + > +#define DLB2_LOG_ERR(fmt, args...) \ > + DLB2_LOG_IMPL(ERR, fmt, ## args) > + > +/* remove debug logs at compile time unless actually debugging */ > +#define DLB2_LOG_DBG(fmt, args...) \ > + RTE_LOG_DP(DEBUG, PMD, fmt, ## args) > + > +#endif /* _DLB2_EVDEV_LOG_H_ */ > -- > 2.6.4 >