From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/2] ethdev: move log macro to header Date: Wed, 2 May 2018 07:45:46 -0700 Message-ID: <20180502074546.7d2d735f@xeon-e3> References: <20180501172815.214973-1-ferruh.yigit@intel.com> <2051771.Q7AAqi1qgL@xps> <2e6566e2-3142-e240-d260-e511c7e7fbf4@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Thomas Monjalon , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id B2260126B for ; Wed, 2 May 2018 16:45:49 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id i194-v6so10806590pgd.0 for ; Wed, 02 May 2018 07:45:49 -0700 (PDT) In-Reply-To: <2e6566e2-3142-e240-d260-e511c7e7fbf4@intel.com> 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 Wed, 2 May 2018 10:40:08 +0100 Ferruh Yigit wrote: > On 5/1/2018 7:56 PM, Thomas Monjalon wrote: > > 01/05/2018 19:28, Ferruh Yigit: > >> --- a/lib/librte_ethdev/rte_ethdev.c > >> +++ b/lib/librte_ethdev/rte_ethdev.c > >> -static int ethdev_logtype; > >> - > >> -#define ethdev_log(level, fmt, ...) \ > >> - rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__) > >> +int ethdev_logtype; > >> > > [...] > >> --- a/lib/librte_ethdev/rte_ethdev.h > >> +++ b/lib/librte_ethdev/rte_ethdev.h > >> +extern int ethdev_logtype; > >> + > >> +#define RTE_ETHDEV_LOG(level, fmt, ...) \ > >> + rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__) > > > > Why moving this macro in the header file? For using it in inline functions? > > Probably worth an explanation in the commit message. > > Yes mainly for RTE_PMD_DEBUG_TRACE usage in header file. The ones in > RTE_ETH_VALID_PORTID_... macros and inline functions, which I didn't update in > this set. > > I will update the commit log. It would be great to eliminate all usage of PMD log level (and maybe even EAL) in a future release.