DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	Gaetan Rivet <gaetan.rivet@6wind.com>,
	aconole@redhat.com, fbl@redhat.com
Subject: Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper
Date: Wed, 11 Oct 2017 13:56:42 +0200	[thread overview]
Message-ID: <20171011115642.GI13551@6wind.com> (raw)
In-Reply-To: <2075344.22PATxnhkA@xps>

On Wed, Oct 11, 2017 at 11:23:12AM +0200, Thomas Monjalon wrote:
> 05/10/2017 11:49, Adrien Mazarguil:
> > rte_flow_error_set() is a convenient helper to initialize error objects.
> > 
> > Since there is no fundamental reason to prevent applications from using it,
> > expose it through the public interface after modifying its return value
> > from positive to negative. This is done for consistency with the rest of
> > the public interface.
> > 
> > Documentation is updated accordingly.
> > 
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > ---
> > --- a/lib/librte_ether/rte_flow.h
> > +++ b/lib/librte_ether/rte_flow.h
> >  /**
> > + * Initialize flow error structure.
> > + *
> > + * @param[out] error
> > + *   Pointer to flow error structure (may be NULL).
> > + * @param code
> > + *   Related error code (rte_errno).
> > + * @param type
> > + *   Cause field and error types.
> > + * @param cause
> > + *   Object responsible for the error.
> > + * @param message
> > + *   Human-readable error message.
> > + *
> > + * @return
> > + *   Negative error code (errno value) and rte_errno is set.
> > + */
> > +static inline int
> > +rte_flow_error_set(struct rte_flow_error *error,
> > +		   int code,
> > +		   enum rte_flow_error_type type,
> > +		   const void *cause,
> > +		   const char *message)
> 
> When calling this function, the performance is not critical.
> So it must not be an inline function.
> Please move it to the .c file and add it to the .map file.

I'll do it as part of moving this patch into my upcoming series for mlx4,
since it relies on the new return value.

Now for the record, I believe that static inlines, particularly short ones
that are not expected to be modified any time soon (provided they are
defined properly that is) are harmless.

Yes, that means modifying them, depending on what they do, may cause a
global ABI breakage of the underlying library which translates to a major
version bump, however exactly the same applies to some macros (in particular
the *_MAX ones), structure and other type definitions and so on.

What I'm getting at is, making this function part of the .map file won't
help all that much with the goal of reaching a stable ABI. Making it a
normal function on the other hand successfully prevents PMDs and
applications from considering its use in their data plane (flow rules
management from the data plane is likely the next step for rte_flow).

In my opinion, performance (even if hypothetical) matters more than ABI
stability, particularly since the current pattern is for the whole ABI to be
broken every other release. I think that with DPDK, ABI stability can only
be properly guaranteed in stable/maintenance releases but that effort is
vain in the master branch, affected by way too many changes for it to ever
become reality. This doesn't mean we shouldn't even try, however we
shouldn't restrict ourselves; when the ABI needs to be broken, so be it.

(end of rant, thanks for reading)

-- 
Adrien Mazarguil
6WIND

  reply	other threads:[~2017-10-11 11:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05  9:49 [dpdk-dev] [PATCH v1 0/7] Flow API helpers enhancements Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper Adrien Mazarguil
2017-10-11  9:23   ` Thomas Monjalon
2017-10-11 11:56     ` Adrien Mazarguil [this message]
2017-10-11 19:05       ` Aaron Conole
2017-10-12 13:37         ` Neil Horman
2017-10-12 14:02         ` Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 2/7] ethdev: replace flow API object copy function Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 3/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 4/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 5/7] ethdev: enhance flow API item/action descriptions Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 6/7] ethdev: generate flow API conversion header Adrien Mazarguil
2017-10-05  9:49 ` [dpdk-dev] [PATCH v1 7/7] ethdev: update " Adrien Mazarguil
2017-10-06  1:13 ` [dpdk-dev] [PATCH v1 0/7] Flow API helpers enhancements Ferruh Yigit
2017-10-06  8:05   ` Adrien Mazarguil
2017-10-10 18:05     ` Ferruh Yigit
2017-10-11  9:57       ` Adrien Mazarguil
2017-10-11 18:07         ` Ferruh Yigit
2017-10-12 12:53           ` Adrien Mazarguil
2017-10-12 16:37             ` Ferruh Yigit
2017-10-13 10:42               ` Adrien Mazarguil
2018-08-03 13:36 ` [dpdk-dev] [PATCH v2 0/7] ethdev: add flow API object converter Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 1/7] " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 2/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 3/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 4/7] net/failsafe: switch to flow API object " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 5/7] net/bonding: " Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 6/7] ethdev: deprecate rte_flow_copy function Adrien Mazarguil
2018-08-03 13:36   ` [dpdk-dev] [PATCH v2 7/7] ethdev: add missing item/actions to flow object converter Adrien Mazarguil
2018-08-03 14:06   ` [dpdk-dev] [PATCH v2 0/7] ethdev: add flow API " Thomas Monjalon
2018-08-23 13:48   ` Ferruh Yigit
2018-08-27 15:14     ` Adrien Mazarguil
2018-08-24 10:58   ` Ferruh Yigit
2018-08-27 14:12     ` Adrien Mazarguil
2018-08-31  9:00   ` [dpdk-dev] [PATCH v3 " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 1/7] " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 2/7] ethdev: add flow API item/action name conversion Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 3/7] app/testpmd: rely on flow API conversion function Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 4/7] net/failsafe: switch to flow API object " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 5/7] net/bonding: " Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 6/7] ethdev: add missing items/actions to flow object converter Adrien Mazarguil
2018-08-31  9:01     ` [dpdk-dev] [PATCH v3 7/7] ethdev: deprecate rte_flow_copy function Adrien Mazarguil
2018-10-04 14:21       ` Ferruh Yigit
2018-08-31 11:32     ` [dpdk-dev] [PATCH v3 0/7] ethdev: add flow API object converter Nélio Laranjeiro
2018-10-03 20:31       ` Thomas Monjalon
2018-10-04 14:25         ` 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=20171011115642.GI13551@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fbl@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.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).