DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] doc: add deprecation notice to fix ethdev API returning void
Date: Tue, 23 Jul 2019 17:52:42 +0300	[thread overview]
Message-ID: <337d5e16-befa-1260-9993-2624669c68bf@solarflare.com> (raw)
In-Reply-To: <20190723073821.6cf51bcc@hermes.lan>

On 7/23/19 5:38 PM, Stephen Hemminger wrote:
> On Tue, 23 Jul 2019 15:07:51 +0100
> Andrew Rybchenko <arybchenko@solarflare.com> wrote:
> 
>> void return value is bad for get API (like rte_eth_dev_info-get())
>> since caller does not know if the function does its job or not and
>> output value is filled in.
>>
>> void return value is bad for state changing API (like
>> rte_eth_promiscuous_enable()) since caller should use get API
>> to understand if state is really changed.
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> In general this is a good ide, but for some API's it is hard
> to think of a way it would help. For example:
> void return is ok for close routines because if close() returns
> an error the application really has no choice about what to do.

Yes, I agree. But application can always ignore return value.
Long-long time ago it was a surprise to me that libc close() has
non-void return value.

I intentionally provided everything which makes sense to me to
raise discussion. I was unsure in stop, close and owner delete
functions.

  reply	other threads:[~2019-07-23 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 14:07 Andrew Rybchenko
2019-07-23 14:22 ` Ferruh Yigit
2019-08-06 11:24   ` Thomas Monjalon
2019-08-10 20:29     ` Thomas Monjalon
2019-07-23 14:38 ` Stephen Hemminger
2019-07-23 14:52   ` Andrew Rybchenko [this message]
2019-07-24  9:17 ` Jerin Jacob Kollanukkaran

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=337d5e16-befa-1260-9993-2624669c68bf@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).