DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Matan Azrad <matan@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] ethdev: make rte_eth_is_valid_owner_id return bool
Date: Tue, 21 Aug 2018 11:31:29 -0700	[thread overview]
Message-ID: <20180821113129.6e7e680e@xeon-e3> (raw)
In-Reply-To: <AM0PR0502MB4019294B474E1AD6810B0190D2310@AM0PR0502MB4019.eurprd05.prod.outlook.com>

On Tue, 21 Aug 2018 15:48:19 +0000
Matan Azrad <matan@mellanox.com> wrote:

> Hi
> 
> From: Stephen Hemminger
> > On Tue, 21 Aug 2018 10:20:43 +0000
> > Matan Azrad <matan@mellanox.com> wrote:
> >   
> > > From: Stephen Hemminger  
> > > > Function is boolean so use that.  
> > >
> > > Ethdev is not using bool type, see also:
> > > rte_eth_dev_is_valid_port
> > > rte_eth_dev_is_removed
> > > rte_eth_dev_pool_ops_supported
> > >
> > > I think it should be a full solution to all.
> > >  
> > > > Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>  
> > 
> > I didn't want change type of visible (exported by ABI) functions.
> >   
> Since ethdev now is not using bool type I think it's better not to change it only for this API.

I hate to pick nits but there is already a bool usage in internal
function (static) in ethdev.


static bool
is_allocated(const struct rte_eth_dev *ethdev)
{
	return ethdev->data->name[0] != '\0';
}

Using bool functions doesn't really generate different code. It is is more
about using modern C conventions.

  reply	other threads:[~2018-08-21 18:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14  0:19 [dpdk-dev] [PATCH] ethdev: fix rte_eth_dev_owner_unset Stephen Hemminger
2018-08-14  5:52 ` Matan Azrad
2018-08-14 16:55   ` Stephen Hemminger
2018-08-14 19:46     ` Matan Azrad
2018-08-24 13:55       ` Ferruh Yigit
2018-08-24 14:42         ` Stephen Hemminger
2018-08-16 22:44 ` [dpdk-dev] [PATCH 0/2] ethdev: minor ownership changes Stephen Hemminger
2018-08-16 22:44   ` [dpdk-dev] [PATCH 1/2] ethdev: silence error message on rte_eth_dev_owner_unset Stephen Hemminger
2018-08-21 10:04     ` Matan Azrad
2018-08-21 15:45     ` [dpdk-dev] [PATCH v3] " Stephen Hemminger
2018-08-21 15:53       ` Matan Azrad
2018-08-27 13:01         ` Ferruh Yigit
2018-08-16 22:44   ` [dpdk-dev] [PATCH 2/2] ethdev: make rte_eth_is_valid_owner_id return bool Stephen Hemminger
2018-08-21 10:20     ` Matan Azrad
2018-08-21 15:06       ` Stephen Hemminger
2018-08-21 15:48         ` Matan Azrad
2018-08-21 18:31           ` Stephen Hemminger [this message]
2018-08-26  7:49             ` Matan Azrad

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=20180821113129.6e7e680e@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=sthemmin@microsoft.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).