From: Matan Azrad <matan@mellanox.com>
To: Stephen Hemminger <stephen@networkplumber.org>
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: Sun, 26 Aug 2018 07:49:53 +0000 [thread overview]
Message-ID: <AM0PR0502MB4019C4750ED786BAC391B379D2340@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180821113129.6e7e680e@xeon-e3>
From: Stephen Hemminger
> 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.
Agree, but I think it should be the same API at least as rte_eth_dev_is_valid_port, just for ethdev convention.
Let's give to the maintainer the decision.
prev parent reply other threads:[~2018-08-26 7:49 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
2018-08-26 7:49 ` Matan Azrad [this message]
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=AM0PR0502MB4019C4750ED786BAC391B379D2340@AM0PR0502MB4019.eurprd05.prod.outlook.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
--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).