From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4meX55ORaOB9Lq2GaU9BAoTUmCIuhtUMSf40f5UFkBc=; b=KQOSwEMGzGjlT//1CaRRdlby3QKhSPZx7jV8prQv8cVpX0uJg0EFrnfQRGKzRhgvCc Gx2ciE3381jDjpWskRzVturVvYXj6AKL+w6MDPYn5TyrEuxIseJCKkk1gG4khQkk+DfI qB0iT5MaiYgeLoIe8JLFWXPnRtJbrNnS3tera/HAdudQu2ByZOkbJgm15TlQKkl87RhT QZyOd9iJU5ko4hjegTA1Jce/5e1L0+pyUbUpRFhFz84NT118dZv6PZF7lWE5Emr/gWvc XJjNVJYwepcuVzy3KdMynkrRkyfN30ULoRQssKi979XZ1PogvsC3wCXh83jfftFeYP1O mYjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4meX55ORaOB9Lq2GaU9BAoTUmCIuhtUMSf40f5UFkBc=; b=kdmzEZVq6k5yIVhVK9im1y+E+nmZYXaYpFB7h1LGJbRhuEt6Y7QiJUUWf6xmPOzl3Y avlFkb1XfLetxIt/X1v0MGS7JuEcEY6RgSOVr8NHIBCtjMJYq8owwBmFsg+WXcXgrWk5 kkBsb9FrVRIipUR0TB+OxmFKgnLt0q+fUdwuS0FJUPUwvDjcrGxgHVSHS+QdmNZWt2uZ zgM2riOmp5TCKMcl/Wjaf0tIm7GVQUsKGpugAybmY+qy4J9UlZjamhJTXn8bO+PJ1g0S b7PkKh92SbUXW5zRI1X48dnEXK7ZanSxtKLwfL6RLiqpOq/zR8ltnSF1ru+G3JiDcZk+ gAkA== X-Gm-Message-State: ALQs6tCaNcMnGwcucI9aHskIU1lRPibfwYw0t/1NYdAFUftGe9vIvhxg dIg0jZgT2jpin1YmpzYrdbqHlA== X-Google-Smtp-Source: AB8JxZpePJ7IZyhrm6mU3fw4vSn8ouRIKuzmG073xYbVUb9W5JCcA1iI0xaBKu22+I6mCFvUynildA== X-Received: by 2002:a17:902:1665:: with SMTP id g92-v6mr20644671plg.195.1525272348807; Wed, 02 May 2018 07:45:48 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id e87sm32079330pfl.65.2018.05.02.07.45.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 May 2018 07:45:48 -0700 (PDT) Date: Wed, 2 May 2018 07:45:46 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: Thomas Monjalon , dev@dpdk.org Message-ID: <20180502074546.7d2d735f@xeon-e3> In-Reply-To: <2e6566e2-3142-e240-d260-e511c7e7fbf4@intel.com> 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 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: Wed, 02 May 2018 14:45:50 -0000 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.