From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id AF456DD2 for ; Tue, 1 May 2018 20:56:30 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 26D7321B69; Tue, 1 May 2018 14:56:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 01 May 2018 14:56:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=hVr2tHv0Ndrs/JxCrexggOxMlH cdahflLC4gDjXe6nw=; b=ZI9Rd4U2D3uniXb61A8Pcdb7V/2j0O69Wa371sUqJC zH6CfvVNx4NHZe6mLleQjUvCxHUfqjfNLVMux5NgtvXznPwfsSPUOx9q/Nq6+pd6 ZbchxZ8/EkX/B2QEZbHuvV2J4vBV85G2Mf0njGD/54GaJxujsWpVtVLG8wdi7cuB Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hVr2tH v0Ndrs/JxCrexggOxMlHcdahflLC4gDjXe6nw=; b=mgMvAy4oh9/Qj2HGbBx+se 8T6g5ABnYNmj6GmdQ+TjDMB9Yc5Zt9oJKW7d79j21Q/xhLjCZke3ukBOKQMGnbPm 5oUsumO66hhLz7bo24GSPYHecshDTPJjxyHUuRLHrNexBBJ/dd1Nhp//iRKVK8/F YEEpFYJ8f+XyVQR5D/luDhIM1x6sf3Hq0yybJe69Ch9zunlwA8o8WSkGgQT6qrXj 2JC/83ZANrlYz7dEmpG2o+poKK7J29+kvY1BgMB5W+dScHxcDtIOshvnKRZUphVe LC9ZGFsKb1Gxwjf1xz+ZNLXRGwfMvNoBtvxlFU0M3z21dWUGAysvCAf899hA2W2w == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 99167E443C; Tue, 1 May 2018 14:56:29 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org Date: Tue, 01 May 2018 20:56:28 +0200 Message-ID: <2051771.Q7AAqi1qgL@xps> In-Reply-To: <20180501172815.214973-1-ferruh.yigit@intel.com> References: <20180501172815.214973-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: move log macro to header 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: , X-List-Received-Date: Tue, 01 May 2018 18:56:30 -0000 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.