From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 294AB5F5D for ; Fri, 16 Mar 2018 18:42:21 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 10:42:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,316,1517904000"; d="scan'208";a="212009814" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by fmsmga006.fm.intel.com with ESMTP; 16 Mar 2018 10:42:19 -0700 To: Ravi Kumar , dev@dpdk.org References: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> From: Ferruh Yigit Message-ID: <350657d3-8d92-0545-5e05-39ab1b4cadfc@intel.com> Date: Fri, 16 Mar 2018 17:42:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 01/18] net/axgbe: add minimal dev init and uninit support 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: Fri, 16 Mar 2018 17:42:22 -0000 On 3/9/2018 8:42 AM, Ravi Kumar wrote: > Signed-off-by: Ravi Kumar <...> > @@ -412,6 +412,12 @@ CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 > CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y > > # > +# Compile AMD PMD > +# > +CONFIG_RTE_LIBRTE_AXGBE_PMD=y > +CONFIG_RTE_LIBRTE_AXGBE_DEBUG_INIT=n Config file recently updated to have PMD options sorted alphabetically, can you please move config option according. <...> > +/* The set of PCI devices this driver supports */ > +#define AMD_PCI_VENDOR_ID 0x1022 > +#define AMD_PCI_AXGBE_DEVICE_ID1 0x1458 > +#define AMD_PCI_AXGBE_DEVICE_ID2 0x1459 More descriptive name can help others to find which devices are supported, instead of id1 and id2. <...> > +static int > +eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) > +{ > + PMD_INIT_FUNC_TRACE(); > + struct axgbe_port *pdata; > + struct rte_pci_device *pci_dev; > + > + pdata = (struct axgbe_port *)eth_dev->data->dev_private; > + pdata->eth_dev = eth_dev; Since there is already a RTE_PROC_PRIMARY check below, these should be below that check because secondary doesn't need to update pdata->eth_dev <...> > +RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd); > +RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map); > +RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic"); Is vfio-pci intentionally not included as dependency? > + > +RTE_INIT(axgbe_init_log); > +static void > +axgbe_init_log(void) > +{ > + axgbe_logtype_init = rte_log_register("pmd.axgbe.init"); The log string syntax updated, now it should be "pmd.net.axgbe.*" <...> > +#ifdef RTE_LIBRTE_AXGBE_DEBUG_INIT > +#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") > +#else > +#define PMD_INIT_FUNC_TRACE() do { } while (0) > +#endif Do we need this config option? The idea of dynamic logging is get rid of them. If you want to control trace logs seperately, you can create a new logtype for it can control dynamically. As long as it is not in datapath we can remove log config options. > +extern int axgbe_logtype_driver; > +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, axgbe_logtype_driver, "%s(): " fmt, \ > + __func__, ## args) > + > +#define PMD_DRV_LOG(level, fmt, args...) \ > + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) Do you need interim PMD_DRV_LOG_RAW? Why not directly define PMD_DRV_LOG? <...>