DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: clean up rte_eth_dev_info_get
Date: Mon, 6 Feb 2017 10:51:08 +0800	[thread overview]
Message-ID: <20170206025108.GA901@debian> (raw)
In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B5613B8@shsmsx102.ccr.corp.intel.com>

On Mon, Feb 06, 2017 at 10:41:28AM +0800, Lu, Wenzhuo wrote:
> Hi Tiwei,
> 
> > -----Original Message-----
> > From: Bie, Tiwei
> > Sent: Monday, February 6, 2017 10:31 AM
> > To: Lu, Wenzhuo
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: clean up rte_eth_dev_info_get
> > 
> > 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);
> O, forget to change it. Thanks.
> 
> > 
> > >  /* 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'.
> I see both 'false' and 'FALSE' are defined and used. Is there any reason that 'false' is better?
> 

I think `true' and `false' are standard keywords defined and
reserved by C. So I think it would be better to use them if
the return type is `bool'.

Best regards,
Tiwei Bie

  reply	other threads:[~2017-02-06  2:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  2:39 [dpdk-dev] [PATCH] " Wenzhuo Lu
2017-01-25  3:16 ` Tiwei Bie
2017-01-25  5:13   ` Lu, Wenzhuo
2017-01-25  5:24     ` Tiwei Bie
2017-01-30 12:15       ` Ferruh Yigit
2017-02-03  6:50         ` Lu, Wenzhuo
2017-02-03 11:52           ` Ferruh Yigit
2017-02-01 16:24 ` Ananyev, Konstantin
2017-02-01 17:40   ` Ferruh Yigit
2017-02-01 18:10     ` Ananyev, Konstantin
2017-02-01 18:18       ` Ferruh Yigit
2017-02-03  9:21       ` Iremonger, Bernard
2017-02-03  9:49         ` Ananyev, Konstantin
2017-02-03 10:02           ` Iremonger, Bernard
2017-02-03 12:00             ` Ferruh Yigit
2017-02-06  2:09 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
2017-02-06  2:30   ` Tiwei Bie
2017-02-06  2:41     ` Lu, Wenzhuo
2017-02-06  2:51       ` Tiwei Bie [this message]
2017-02-06  2:59         ` Lu, Wenzhuo
2017-02-06  3:08           ` Tiwei Bie
2017-02-06  3:45             ` Lu, Wenzhuo
2017-02-06  4:57               ` Tiwei Bie
2017-02-06  5:17                 ` Lu, Wenzhuo
2017-02-06  5:26                   ` Tiwei Bie
2017-02-07  6:33 ` [dpdk-dev] [PATCH v3] " Wenzhuo Lu
2017-02-07 14:08   ` Ferruh Yigit
2017-02-07 14:09     ` Ferruh Yigit
2017-02-08  0:54       ` Lu, Wenzhuo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170206025108.GA901@debian \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).