From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C3D2D7260 for ; Mon, 22 Jan 2018 13:23:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 04:23:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,396,1511856000"; d="scan'208";a="21599690" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2018 04:23:49 -0800 To: Ajit Khaparde , dev@dpdk.org References: <20180122062046.81908-1-ajit.khaparde@broadcom.com> <20180122062046.81908-3-ajit.khaparde@broadcom.com> From: Ferruh Yigit Message-ID: <4e127fe7-7351-31b5-40d4-37d850c5fb12@intel.com> Date: Mon, 22 Jan 2018 12:23:49 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180122062046.81908-3-ajit.khaparde@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 2/5] net/bnxt: use driver specific dynamic log type 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: Mon, 22 Jan 2018 12:23:52 -0000 On 1/22/2018 6:20 AM, Ajit Khaparde wrote: > This patch implements driver specific log type doing away with > usage of RTE_LOG() for logging. > Signed-off-by: Ajit Khaparde <...> > @@ -3433,6 +3434,16 @@ bool is_bnxt_supported(struct rte_eth_dev *dev) > return is_device_supported(dev, &bnxt_rte_pmd); > } > > +static void > +bnxt_init_log(void) > +{ > + bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver"); > + if (bnxt_logtype_driver >= 0) > + rte_log_set_level(bnxt_logtype_driver, RTE_LOG_NOTICE); > +} > + > RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd); > RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map); > RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci"); > + > +RTE_INIT(bnxt_init_log); Compiler giving warning for this [1], briefly asks putting this line above "bnxt_init_log": [1] ...dpdk/drivers/net/bnxt/bnxt_ethdev.c:3518:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] RTE_INIT(bnxt_init_log); ^ <...>