From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: Re: [PATCH v2] net/ixgbe: clean up rte_eth_dev_info_get Date: Mon, 6 Feb 2017 10:30:30 +0800 Message-ID: <20170206023030.GA21315@debian> References: <1485311962-62335-1-git-send-email-wenzhuo.lu@intel.com> <1486346972-30710-1-git-send-email-wenzhuo.lu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: dev@dpdk.org To: Wenzhuo Lu Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D58A3DE0 for ; Mon, 6 Feb 2017 03:31:30 +0100 (CET) Content-Disposition: inline In-Reply-To: <1486346972-30710-1-git-send-email-wenzhuo.lu@intel.com> 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 Mon, Feb 06, 2017 at 10:09:32AM +0800, Wenzhuo Lu wrote: [...] > static void ixgbe_dcb_init(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config); > -static int is_ixgbe_pmd(const char *driver_name); > +static int is_device_supported(struct rte_eth_dev *dev, struct eth_driver *drv); > Should be: static bool is_device_supported(struct rte_eth_dev *dev, struct eth_driver *drv); > /* For Virtual Function support */ > static int eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev); > @@ -4380,16 +4380,14 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, > ixgbe_add_rar(dev, addr, 0, 0); > } > > -static int > -is_ixgbe_pmd(const char *driver_name) > +static bool > +is_device_supported(struct rte_eth_dev *dev, struct eth_driver *drv) > { > - if (!strstr(driver_name, "ixgbe")) > - return -ENOTSUP; > + if (strcmp(dev->driver->pci_drv.driver.name, > + drv->pci_drv.driver.name)) > + return FALSE; > It would be better to use `false' instead of `FALSE'. Best regards, Tiwei Bie