From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 1/2] ethdev: move log macro to header Date: Wed, 2 May 2018 10:40:08 +0100 Message-ID: <2e6566e2-3142-e240-d260-e511c7e7fbf4@intel.com> References: <20180501172815.214973-1-ferruh.yigit@intel.com> <2051771.Q7AAqi1qgL@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 31EE423C for ; Wed, 2 May 2018 11:40:11 +0200 (CEST) In-Reply-To: <2051771.Q7AAqi1qgL@xps> Content-Language: en-US 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 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.