DPDK patches and discussions
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: David Harton <dharton@cisco.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] ethdev: add return code to rte_eth_stats_reset()
Date: Tue, 8 Aug 2017 13:03:12 +0200	[thread overview]
Message-ID: <CAATJJ0K4UF6-qEPt5KjFxu9AKhF5a1j3DM=L70Uxi6Y1Qr8=yQ@mail.gmail.com> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA640C45B4F@IRSMSX102.ger.corp.intel.com>

On Tue, Aug 8, 2017 at 11:02 AM, Van Haaren, Harry <
harry.van.haaren@intel.com> wrote:

> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Harton
> > Sent: Monday, August 7, 2017 6:39 PM
> > To: thomas@monjalon.net
> > Cc: dev@dpdk.org; David Harton <dharton@cisco.com>
> > Subject: [dpdk-dev] [PATCH v3] ethdev: add return code to
> rte_eth_stats_reset()
> >
> > Some devices do not support reset of eth stats.  An application may
> > need to know not to clear shadow stats if the device cannot.
> >
> > rte_eth_stats_reset is updated to provide a return code to share
> > whether the device supports reset or not.
> >
> > Signed-off-by: David Harton <dharton@cisco.com>
> > ---
>
> Hi,
>
> As far as I know changing the return type (void to int) of a function does
> *not* break ABI, but does "break" API as the application code should now
> check the return value. In theory the application could ignore the return
> value and current behavior is maintained.
>

After discussing with Harry on IRC it turns out we both ended up checking
the same online sources
to verify our thoughts, like [1].

Given this and several other sources it seems to be as outlined above an
API but not ABI break.
I'm not an expert and this is mostly opinion, but my personal rule mostly
is: "if in doubt bump it".
Running similar issues I was the one providing [2] for a reason, with this
here being a case that
appears safe but there eventually always seems to come up an architecture
or alternative compiler
which does some arcane register juggling differently and makes those "safe"
changes breaking people after the fact.

[1]:
https://stackoverflow.com/questions/15626579/c-abi-is-it-safe-to-change-void-function-to-return-int
[2]:
http://dpdk.org/doc/guides/contributing/versioning.html#setting-a-major-abi-version

  parent reply	other threads:[~2017-08-08 11:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 17:39 David Harton
2017-08-08  9:02 ` Van Haaren, Harry
2017-08-08 11:01   ` David Harton (dharton)
2017-08-08 11:03   ` Christian Ehrhardt [this message]
2017-08-08 13:13     ` Thomas Monjalon
2017-08-10 13:29 ` [dpdk-dev] [PATCH v4 1/2] " David Harton
2017-08-10 13:29   ` [dpdk-dev] [PATCH v4 2/2] doc: Update ABI Change for rte_eth_stats_reset David Harton
2017-08-31 22:10     ` Thomas Monjalon
2017-08-31 22:10       ` Thomas Monjalon
2017-08-31 22:16   ` [dpdk-dev] [PATCH v4 1/2] ethdev: add return code to rte_eth_stats_reset() Thomas Monjalon
2017-09-01  2:26   ` [dpdk-dev] [PATCH v5] " David Harton
2017-09-01  7:47     ` Hemant Agrawal
2017-09-19 17:14     ` Ferruh Yigit
2017-09-20 14:01       ` David Harton (dharton)
2017-09-20 16:55         ` Ferruh Yigit
2017-09-20 14:11     ` [dpdk-dev] [PATCH v6] " David C Harton
2017-09-20 16:56       ` Ferruh Yigit
2017-10-09 23:02         ` Ferruh Yigit

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='CAATJJ0K4UF6-qEPt5KjFxu9AKhF5a1j3DM=L70Uxi6Y1Qr8=yQ@mail.gmail.com' \
    --to=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=dharton@cisco.com \
    --cc=harry.van.haaren@intel.com \
    --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).